diff --git a/examples/test_vpc_v1_examples.py b/examples/test_vpc_v1_examples.py
index 9197716..c72accb 100644
--- a/examples/test_vpc_v1_examples.py
+++ b/examples/test_vpc_v1_examples.py
@@ -961,6 +961,112 @@ def test_update_image_example(self):
except ApiException as e:
pytest.fail(str(e))
+ @needscredentials
+ def test_list_image_export_jobs_example(self):
+ """
+ list_image_export_jobs request example
+ """
+ try:
+ print('\nlist_image_export_jobs() result:')
+ # begin-list_image_export_jobs
+
+ response = vpc_service.list_image_export_jobs(
+ image_id=data['imageId']
+ )
+ image_export_job_unpaginated_collection = response.get_result()
+
+ # end-list_image_export_jobs
+ assert image_export_job_unpaginated_collection is not None
+ except ApiException as e:
+ pytest.fail(str(e))
+
+ @needscredentials
+ def test_create_image_export_job_example(self):
+ """
+ create_image_export_job request example
+ """
+ try:
+ print('\ncreate_image_export_job() result:')
+ # begin-create_image_export_job
+
+ cloud_object_storage_bucket_identity_model = {
+ 'name': 'bucket-27200-lwx4cfvcue',
+ }
+
+ image_export_job = vpc_service.create_image_export_job(
+ image_id=data['imageId'],
+ name='my-image-export-job',
+ storage_bucket=cloud_object_storage_bucket_identity_model
+ ).get_result()
+
+ # end-create_image_export_job
+ assert image_export_job is not None
+ data['imageExportJobId']=image_export_job['id']
+ except ApiException as e:
+ pytest.fail(str(e))
+
+ @needscredentials
+ def test_get_image_export_job_example(self):
+ """
+ get_image_export_job request example
+ """
+ try:
+ print('\nget_image_export_job() result:')
+ # begin-get_image_export_job
+
+ image_export_job = vpc_service.get_image_export_job(
+ image_id=data['imageId'],
+ id=data['imageExportJobId']
+ ).get_result()
+
+ # end-get_image_export_job
+ assert image_export_job is not None
+ except ApiException as e:
+ pytest.fail(str(e))
+
+ @needscredentials
+ def test_update_image_export_job_example(self):
+ """
+ update_image_export_job request example
+ """
+ try:
+ print('\nupdate_image_export_job() result:')
+ # begin-update_image_export_job
+
+ image_export_job_patch_model = {
+ 'name' : 'my-image-export-job-updated'
+ }
+
+ image_export_job = vpc_service.update_image_export_job(
+ image_id=data['imageId'],
+ id=data['imageExportJobId'],
+ image_export_job_patch=image_export_job_patch_model
+ ).get_result()
+
+ # end-update_image_export_job
+ assert image_export_job is not None
+ except ApiException as e:
+ pytest.fail(str(e))
+
+ @needscredentials
+ def test_delete_image_export_job_example(self):
+ """
+ delete_image_export_job request example
+ """
+ try:
+ # begin-delete_image_export_job
+
+ response = vpc_service.delete_image_export_job(
+ image_id=data['imageId'],
+ id=data['imageExportJobId']
+ )
+
+ # end-delete_image_export_job
+ print('\ndelete_image_export_job() response status code: ', response.get_status_code())
+
+ except ApiException as e:
+ pytest.fail(str(e))
+
@needscredentials
def test_list_operating_systems_example(self):
"""
diff --git a/ibm_vpc/vpc_v1.py b/ibm_vpc/vpc_v1.py
index ce7b005..b7b8b24 100644
--- a/ibm_vpc/vpc_v1.py
+++ b/ibm_vpc/vpc_v1.py
@@ -14,14 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# IBM OpenAPI SDK Code Generator Version: 3.68.2-ac7def68-20230310-195410
+# IBM OpenAPI SDK Code Generator Version: 3.69.0-370d6400-20230329-174648
"""
The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision
and manage virtual server instances, along with subnets, volumes, load balancers, and
more.
-API Version: 2023-03-28
+API Version: 2023-05-02
"""
from datetime import datetime
@@ -43,6 +43,7 @@
# Service
##############################################################################
+
class VpcV1(BaseService):
"""The vpc V1 service."""
@@ -50,11 +51,12 @@ class VpcV1(BaseService):
DEFAULT_SERVICE_NAME = 'vpc'
@classmethod
- def new_instance(cls,
- version: str = '2023-03-28',
- service_name: str = DEFAULT_SERVICE_NAME,
- generation: int = 2,
- ) -> 'VpcV1':
+ def new_instance(
+ cls,
+ version: str = '2023-05-02',
+ service_name: str = DEFAULT_SERVICE_NAME,
+ generation: int = 2,
+ ) -> 'VpcV1':
"""
Return a new client for the vpc service using the specified parameters and
external configuration.
@@ -75,11 +77,12 @@ def new_instance(cls,
service.configure_service(service_name)
return service
- def __init__(self,
- version: str = '2023-03-28',
- authenticator: Authenticator = None,
- generation: int = 2,
- ) -> None:
+ def __init__(
+ self,
+ version: str = '2023-05-02',
+ authenticator: Authenticator = None,
+ generation: int = 2,
+ ) -> None:
"""
Construct a new client for the vpc service.
@@ -94,25 +97,22 @@ def __init__(self,
if version is None:
raise ValueError('version must be provided')
- BaseService.__init__(self,
- service_url=self.DEFAULT_SERVICE_URL,
- authenticator=authenticator)
+ BaseService.__init__(self, service_url=self.DEFAULT_SERVICE_URL, authenticator=authenticator)
self.generation = generation
self.version = version
-
#########################
# VPCs
#########################
-
- def list_vpcs(self,
+ def list_vpcs(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
classic_access: bool = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPCs.
@@ -135,9 +135,11 @@ def list_vpcs(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpcs')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpcs',
+ )
headers.update(sdk_headers)
params = {
@@ -155,22 +157,24 @@ def list_vpcs(self,
headers['Accept'] = 'application/json'
url = '/vpcs'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpc(self,
+ def create_vpc(
+ self,
*,
address_prefix_management: str = None,
classic_access: bool = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a VPC.
@@ -206,9 +210,11 @@ def create_vpc(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpc')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpc',
+ )
headers.update(sdk_headers)
params = {
@@ -232,19 +238,21 @@ def create_vpc(self,
headers['Accept'] = 'application/json'
url = '/vpcs'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpc(self,
+ def delete_vpc(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPC.
@@ -264,9 +272,11 @@ def delete_vpc(self,
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_vpc')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpc',
+ )
headers.update(sdk_headers)
params = {
@@ -282,18 +292,20 @@ def delete_vpc(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc(self,
+ def get_vpc(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC.
@@ -309,9 +321,11 @@ def get_vpc(self,
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_vpc')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc',
+ )
headers.update(sdk_headers)
params = {
@@ -328,19 +342,21 @@ def get_vpc(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpc(self,
+ def update_vpc(
+ self,
id: str,
vpc_patch: 'VPCPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPC.
@@ -361,9 +377,11 @@ def update_vpc(self,
if isinstance(vpc_patch, VPCPatch):
vpc_patch = convert_model(vpc_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpc')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpc',
+ )
headers.update(sdk_headers)
params = {
@@ -383,19 +401,21 @@ def update_vpc(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_default_network_acl(self,
+ def get_vpc_default_network_acl(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC's default network ACL.
@@ -413,9 +433,11 @@ def get_vpc_default_network_acl(self,
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_vpc_default_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_default_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -432,18 +454,20 @@ def get_vpc_default_network_acl(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{id}/default_network_acl'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_default_routing_table(self,
+ def get_vpc_default_routing_table(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC's default routing table.
@@ -461,9 +485,11 @@ def get_vpc_default_routing_table(self,
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_vpc_default_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_default_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -480,18 +506,20 @@ def get_vpc_default_routing_table(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{id}/default_routing_table'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_default_security_group(self,
+ def get_vpc_default_security_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC's default security group.
@@ -509,9 +537,11 @@ def get_vpc_default_security_group(self,
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_vpc_default_security_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_default_security_group',
+ )
headers.update(sdk_headers)
params = {
@@ -528,21 +558,23 @@ def get_vpc_default_security_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{id}/default_security_group'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpc_address_prefixes(self,
+ def list_vpc_address_prefixes(
+ self,
vpc_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all address prefixes for a VPC.
@@ -561,9 +593,11 @@ def list_vpc_address_prefixes(self,
if not vpc_id:
raise ValueError('vpc_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpc_address_prefixes')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpc_address_prefixes',
+ )
headers.update(sdk_headers)
params = {
@@ -582,23 +616,25 @@ def list_vpc_address_prefixes(self,
path_param_values = self.encode_path_vars(vpc_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/address_prefixes'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpc_address_prefix(self,
+ def create_vpc_address_prefix(
+ self,
vpc_id: str,
cidr: str,
zone: 'ZoneIdentity',
*,
is_default: bool = None,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an address prefix for a VPC.
@@ -638,9 +674,11 @@ def create_vpc_address_prefix(self,
raise ValueError('zone must be provided')
zone = convert_model(zone)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpc_address_prefix')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpc_address_prefix',
+ )
headers.update(sdk_headers)
params = {
@@ -667,20 +705,22 @@ def create_vpc_address_prefix(self,
path_param_values = self.encode_path_vars(vpc_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/address_prefixes'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpc_address_prefix(self,
+ def delete_vpc_address_prefix(
+ self,
vpc_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an address prefix.
@@ -700,9 +740,11 @@ def delete_vpc_address_prefix(self,
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_vpc_address_prefix')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpc_address_prefix',
+ )
headers.update(sdk_headers)
params = {
@@ -718,19 +760,21 @@ def delete_vpc_address_prefix(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/address_prefixes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_address_prefix(self,
+ def get_vpc_address_prefix(
+ self,
vpc_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an address prefix.
@@ -749,9 +793,11 @@ def get_vpc_address_prefix(self,
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_vpc_address_prefix')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_address_prefix',
+ )
headers.update(sdk_headers)
params = {
@@ -768,20 +814,22 @@ def get_vpc_address_prefix(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/address_prefixes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpc_address_prefix(self,
+ def update_vpc_address_prefix(
+ self,
vpc_id: str,
id: str,
address_prefix_patch: 'AddressPrefixPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an address prefix.
@@ -807,9 +855,11 @@ def update_vpc_address_prefix(self,
if isinstance(address_prefix_patch, AddressPrefixPatch):
address_prefix_patch = convert_model(address_prefix_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpc_address_prefix')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpc_address_prefix',
+ )
headers.update(sdk_headers)
params = {
@@ -829,23 +879,25 @@ def update_vpc_address_prefix(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/address_prefixes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpc_routes(self,
+ def list_vpc_routes(
+ self,
vpc_id: str,
*,
zone_name: str = None,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all routes in a VPC's default routing table.
@@ -874,9 +926,11 @@ def list_vpc_routes(self,
if not vpc_id:
raise ValueError('vpc_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpc_routes')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpc_routes',
+ )
headers.update(sdk_headers)
params = {
@@ -896,16 +950,18 @@ def list_vpc_routes(self,
path_param_values = self.encode_path_vars(vpc_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routes'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpc_route(self,
+ def create_vpc_route(
+ self,
vpc_id: str,
destination: str,
zone: 'ZoneIdentity',
@@ -914,7 +970,7 @@ def create_vpc_route(self,
name: str = None,
next_hop: 'RoutePrototypeNextHop' = None,
priority: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a route in a VPC's default routing table.
@@ -944,18 +1000,18 @@ def create_vpc_route(self,
reserved for system-provided routes, and are not allowed. If unspecified,
the name will be a hyphenated list of randomly-selected words.
:param RoutePrototypeNextHop next_hop: (optional) If `action` is `deliver`,
- the next hop that packets will be delivered to. For other `action`
- values, it must be omitted or specified as `0.0.0.0`.
+ the next hop that packets will be delivered to. For other
+ `action` values, it must be omitted or specified as `0.0.0.0`.
+ At most two routes per `zone` in a table can have the same `destination`
+ and `priority`,
+ and only when each route has an `action` of `deliver` and `next_hop` is an
+ IP address.
:param int priority: (optional) The priority of this route. Smaller values
have higher priority.
If a routing table contains multiple routes with the same `zone` and
`destination`, the route with the highest priority (smallest value) is
selected. If two routes have the same `destination` and `priority`, traffic
is distributed between them.
- At most two routes per `zone` in a table can have the same `destination`
- and
- `priority`, and only if both routes have an `action` of `deliver` and the
- `next_hop` is an IP address.
: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 `Route` object
@@ -975,9 +1031,11 @@ def create_vpc_route(self,
if next_hop is not None:
next_hop = convert_model(next_hop)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpc_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpc_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1006,20 +1064,22 @@ def create_vpc_route(self,
path_param_values = self.encode_path_vars(vpc_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routes'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpc_route(self,
+ def delete_vpc_route(
+ self,
vpc_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPC route.
@@ -1042,9 +1102,11 @@ def delete_vpc_route(self,
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_vpc_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpc_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1060,19 +1122,21 @@ def delete_vpc_route(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_route(self,
+ def get_vpc_route(
+ self,
vpc_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC route.
@@ -1095,9 +1159,11 @@ def get_vpc_route(self,
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_vpc_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1114,20 +1180,22 @@ def get_vpc_route(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpc_route(self,
+ def update_vpc_route(
+ self,
vpc_id: str,
id: str,
route_patch: 'RoutePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPC route.
@@ -1157,9 +1225,11 @@ def update_vpc_route(self,
if isinstance(route_patch, RoutePatch):
route_patch = convert_model(route_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpc_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpc_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1179,23 +1249,25 @@ def update_vpc_route(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpc_routing_tables(self,
+ def list_vpc_routing_tables(
+ self,
vpc_id: str,
*,
start: str = None,
limit: int = None,
is_default: bool = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all routing tables for a VPC.
@@ -1221,9 +1293,11 @@ def list_vpc_routing_tables(self,
if not vpc_id:
raise ValueError('vpc_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpc_routing_tables')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpc_routing_tables',
+ )
headers.update(sdk_headers)
params = {
@@ -1243,16 +1317,18 @@ def list_vpc_routing_tables(self,
path_param_values = self.encode_path_vars(vpc_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpc_routing_table(self,
+ def create_vpc_routing_table(
+ self,
vpc_id: str,
*,
accept_routes_from: List['ResourceFilter'] = None,
@@ -1262,7 +1338,7 @@ def create_vpc_routing_table(self,
route_transit_gateway_ingress: bool = None,
route_vpc_zone_ingress: bool = None,
routes: List['RoutePrototype'] = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a routing table for a VPC.
@@ -1346,9 +1422,11 @@ def create_vpc_routing_table(self,
if routes is not None:
routes = [convert_model(x) for x in routes]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpc_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpc_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -1378,22 +1456,24 @@ def create_vpc_routing_table(self,
path_param_values = self.encode_path_vars(vpc_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpc_routing_table(self,
+ def delete_vpc_routing_table(
+ self,
vpc_id: str,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPC routing table.
@@ -1418,9 +1498,11 @@ def delete_vpc_routing_table(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_vpc_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpc_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -1436,19 +1518,21 @@ def delete_vpc_routing_table(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_routing_table(self,
+ def get_vpc_routing_table(
+ self,
vpc_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC routing table.
@@ -1468,9 +1552,11 @@ def get_vpc_routing_table(self,
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_vpc_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -1487,22 +1573,24 @@ def get_vpc_routing_table(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpc_routing_table(self,
+ def update_vpc_routing_table(
+ self,
vpc_id: str,
id: str,
routing_table_patch: 'RoutingTablePatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPC routing table.
@@ -1533,9 +1621,11 @@ def update_vpc_routing_table(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpc_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpc_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -1555,23 +1645,25 @@ def update_vpc_routing_table(self,
path_param_values = self.encode_path_vars(vpc_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpc_routing_table_routes(self,
+ def list_vpc_routing_table_routes(
+ self,
vpc_id: str,
routing_table_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all routes in a VPC routing table.
@@ -1599,9 +1691,11 @@ def list_vpc_routing_table_routes(self,
if not routing_table_id:
raise ValueError('routing_table_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpc_routing_table_routes')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpc_routing_table_routes',
+ )
headers.update(sdk_headers)
params = {
@@ -1620,16 +1714,18 @@ def list_vpc_routing_table_routes(self,
path_param_values = self.encode_path_vars(vpc_id, routing_table_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpc_routing_table_route(self,
+ def create_vpc_routing_table_route(
+ self,
vpc_id: str,
routing_table_id: str,
destination: str,
@@ -1639,7 +1735,7 @@ def create_vpc_routing_table_route(self,
name: str = None,
next_hop: 'RoutePrototypeNextHop' = None,
priority: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a route in a VPC routing table.
@@ -1669,18 +1765,18 @@ def create_vpc_routing_table_route(self,
reserved for system-provided routes, and are not allowed. If unspecified,
the name will be a hyphenated list of randomly-selected words.
:param RoutePrototypeNextHop next_hop: (optional) If `action` is `deliver`,
- the next hop that packets will be delivered to. For other `action`
- values, it must be omitted or specified as `0.0.0.0`.
+ the next hop that packets will be delivered to. For other
+ `action` values, it must be omitted or specified as `0.0.0.0`.
+ At most two routes per `zone` in a table can have the same `destination`
+ and `priority`,
+ and only when each route has an `action` of `deliver` and `next_hop` is an
+ IP address.
:param int priority: (optional) The priority of this route. Smaller values
have higher priority.
If a routing table contains multiple routes with the same `zone` and
`destination`, the route with the highest priority (smallest value) is
selected. If two routes have the same `destination` and `priority`, traffic
is distributed between them.
- At most two routes per `zone` in a table can have the same `destination`
- and
- `priority`, and only if both routes have an `action` of `deliver` and the
- `next_hop` is an IP address.
: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 `Route` object
@@ -1698,9 +1794,11 @@ def create_vpc_routing_table_route(self,
if next_hop is not None:
next_hop = convert_model(next_hop)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpc_routing_table_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpc_routing_table_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1729,21 +1827,23 @@ def create_vpc_routing_table_route(self,
path_param_values = self.encode_path_vars(vpc_id, routing_table_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpc_routing_table_route(self,
+ def delete_vpc_routing_table_route(
+ self,
vpc_id: str,
routing_table_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPC routing table route.
@@ -1766,9 +1866,11 @@ def delete_vpc_routing_table_route(self,
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_vpc_routing_table_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpc_routing_table_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1784,20 +1886,22 @@ def delete_vpc_routing_table_route(self,
path_param_values = self.encode_path_vars(vpc_id, routing_table_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpc_routing_table_route(self,
+ def get_vpc_routing_table_route(
+ self,
vpc_id: str,
routing_table_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPC routing table route.
@@ -1820,9 +1924,11 @@ def get_vpc_routing_table_route(self,
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_vpc_routing_table_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpc_routing_table_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1839,21 +1945,23 @@ def get_vpc_routing_table_route(self,
path_param_values = self.encode_path_vars(vpc_id, routing_table_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpc_routing_table_route(self,
+ def update_vpc_routing_table_route(
+ self,
vpc_id: str,
routing_table_id: str,
id: str,
route_patch: 'RoutePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPC routing table route.
@@ -1883,9 +1991,11 @@ def update_vpc_routing_table_route(self,
if isinstance(route_patch, RoutePatch):
route_patch = convert_model(route_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpc_routing_table_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpc_routing_table_route',
+ )
headers.update(sdk_headers)
params = {
@@ -1905,11 +2015,13 @@ def update_vpc_routing_table_route(self,
path_param_values = self.encode_path_vars(vpc_id, routing_table_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -1918,15 +2030,15 @@ def update_vpc_routing_table_route(self,
# Subnets
#########################
-
- def list_subnets(self,
+ def list_subnets(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
routing_table_id: str = None,
routing_table_name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all subnets.
@@ -1950,9 +2062,11 @@ def list_subnets(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_subnets')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_subnets',
+ )
headers.update(sdk_headers)
params = {
@@ -1971,18 +2085,20 @@ def list_subnets(self,
headers['Accept'] = 'application/json'
url = '/subnets'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_subnet(self,
+ def create_subnet(
+ self,
subnet_prototype: 'SubnetPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a subnet.
@@ -2003,9 +2119,11 @@ def create_subnet(self,
if isinstance(subnet_prototype, SubnetPrototype):
subnet_prototype = convert_model(subnet_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_subnet')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_subnet',
+ )
headers.update(sdk_headers)
params = {
@@ -2022,19 +2140,21 @@ def create_subnet(self,
headers['Accept'] = 'application/json'
url = '/subnets'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_subnet(self,
+ def delete_subnet(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a subnet.
@@ -2055,9 +2175,11 @@ def delete_subnet(self,
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_subnet')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_subnet',
+ )
headers.update(sdk_headers)
params = {
@@ -2073,18 +2195,20 @@ def delete_subnet(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_subnet(self,
+ def get_subnet(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a subnet.
@@ -2100,9 +2224,11 @@ def get_subnet(self,
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_subnet')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_subnet',
+ )
headers.update(sdk_headers)
params = {
@@ -2119,19 +2245,21 @@ def get_subnet(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_subnet(self,
+ def update_subnet(
+ self,
id: str,
subnet_patch: 'SubnetPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a subnet.
@@ -2154,9 +2282,11 @@ def update_subnet(self,
if isinstance(subnet_patch, SubnetPatch):
subnet_patch = convert_model(subnet_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_subnet')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_subnet',
+ )
headers.update(sdk_headers)
params = {
@@ -2176,19 +2306,21 @@ def update_subnet(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_subnet_network_acl(self,
+ def get_subnet_network_acl(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a subnet's attached network ACL.
@@ -2205,9 +2337,11 @@ def get_subnet_network_acl(self,
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_subnet_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_subnet_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -2224,19 +2358,21 @@ def get_subnet_network_acl(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/network_acl'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def replace_subnet_network_acl(self,
+ def replace_subnet_network_acl(
+ self,
id: str,
network_acl_identity: 'NetworkACLIdentity',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Replace the network ACL for a subnet.
@@ -2258,9 +2394,11 @@ def replace_subnet_network_acl(self,
if isinstance(network_acl_identity, NetworkACLIdentity):
network_acl_identity = convert_model(network_acl_identity)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='replace_subnet_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='replace_subnet_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -2280,19 +2418,21 @@ def replace_subnet_network_acl(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/network_acl'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def unset_subnet_public_gateway(self,
+ def unset_subnet_public_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Detach a public gateway from a subnet.
@@ -2309,9 +2449,11 @@ def unset_subnet_public_gateway(self,
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='unset_subnet_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='unset_subnet_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -2327,18 +2469,20 @@ def unset_subnet_public_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/public_gateway'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_subnet_public_gateway(self,
+ def get_subnet_public_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a subnet's attached public gateway.
@@ -2355,9 +2499,11 @@ def get_subnet_public_gateway(self,
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_subnet_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_subnet_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -2374,19 +2520,21 @@ def get_subnet_public_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/public_gateway'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def set_subnet_public_gateway(self,
+ def set_subnet_public_gateway(
+ self,
id: str,
public_gateway_identity: 'PublicGatewayIdentity',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Attach a public gateway to a subnet.
@@ -2410,9 +2558,11 @@ def set_subnet_public_gateway(self,
if isinstance(public_gateway_identity, PublicGatewayIdentity):
public_gateway_identity = convert_model(public_gateway_identity)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='set_subnet_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='set_subnet_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -2432,19 +2582,21 @@ def set_subnet_public_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/public_gateway'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_subnet_routing_table(self,
+ def get_subnet_routing_table(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a subnet's attached routing table.
@@ -2461,9 +2613,11 @@ def get_subnet_routing_table(self,
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_subnet_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_subnet_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -2480,19 +2634,21 @@ def get_subnet_routing_table(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/routing_table'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def replace_subnet_routing_table(self,
+ def replace_subnet_routing_table(
+ self,
id: str,
routing_table_identity: 'RoutingTableIdentity',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Replace the routing table for a subnet.
@@ -2518,9 +2674,11 @@ def replace_subnet_routing_table(self,
if isinstance(routing_table_identity, RoutingTableIdentity):
routing_table_identity = convert_model(routing_table_identity)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='replace_subnet_routing_table')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='replace_subnet_routing_table',
+ )
headers.update(sdk_headers)
params = {
@@ -2540,23 +2698,25 @@ def replace_subnet_routing_table(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{id}/routing_table'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_subnet_reserved_ips(self,
+ def list_subnet_reserved_ips(
+ self,
subnet_id: str,
*,
start: str = None,
limit: int = None,
sort: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all reserved IPs in a subnet.
@@ -2581,9 +2741,11 @@ def list_subnet_reserved_ips(self,
if not subnet_id:
raise ValueError('subnet_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_subnet_reserved_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_subnet_reserved_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -2603,23 +2765,25 @@ def list_subnet_reserved_ips(self,
path_param_values = self.encode_path_vars(subnet_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{subnet_id}/reserved_ips'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_subnet_reserved_ip(self,
+ def create_subnet_reserved_ip(
+ self,
subnet_id: str,
*,
address: str = None,
auto_delete: bool = None,
name: str = None,
target: 'ReservedIPTargetPrototype' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Reserve an IP in a subnet.
@@ -2656,9 +2820,11 @@ def create_subnet_reserved_ip(self,
if target is not None:
target = convert_model(target)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_subnet_reserved_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_subnet_reserved_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -2685,20 +2851,22 @@ def create_subnet_reserved_ip(self,
path_param_values = self.encode_path_vars(subnet_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{subnet_id}/reserved_ips'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_subnet_reserved_ip(self,
+ def delete_subnet_reserved_ip(
+ self,
subnet_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a reserved IP.
@@ -2720,9 +2888,11 @@ def delete_subnet_reserved_ip(self,
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_subnet_reserved_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_subnet_reserved_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -2738,19 +2908,21 @@ def delete_subnet_reserved_ip(self,
path_param_values = self.encode_path_vars(subnet_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{subnet_id}/reserved_ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_subnet_reserved_ip(self,
+ def get_subnet_reserved_ip(
+ self,
subnet_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a reserved IP.
@@ -2770,9 +2942,11 @@ def get_subnet_reserved_ip(self,
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_subnet_reserved_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_subnet_reserved_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -2789,20 +2963,22 @@ def get_subnet_reserved_ip(self,
path_param_values = self.encode_path_vars(subnet_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{subnet_id}/reserved_ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_subnet_reserved_ip(self,
+ def update_subnet_reserved_ip(
+ self,
subnet_id: str,
id: str,
reserved_ip_patch: 'ReservedIPPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a reserved IP.
@@ -2829,9 +3005,11 @@ def update_subnet_reserved_ip(self,
if isinstance(reserved_ip_patch, ReservedIPPatch):
reserved_ip_patch = convert_model(reserved_ip_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_subnet_reserved_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_subnet_reserved_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -2851,11 +3029,13 @@ def update_subnet_reserved_ip(self,
path_param_values = self.encode_path_vars(subnet_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/subnets/{subnet_id}/reserved_ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -2864,15 +3044,15 @@ def update_subnet_reserved_ip(self,
# Images
#########################
-
- def list_images(self,
+ def list_images(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
name: str = None,
visibility: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all images.
@@ -2899,9 +3079,11 @@ def list_images(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_images')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_images',
+ )
headers.update(sdk_headers)
params = {
@@ -2920,18 +3102,20 @@ def list_images(self,
headers['Accept'] = 'application/json'
url = '/images'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_image(self,
+ def create_image(
+ self,
image_prototype: 'ImagePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an image.
@@ -2953,9 +3137,11 @@ def create_image(self,
if isinstance(image_prototype, ImagePrototype):
image_prototype = convert_model(image_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_image')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_image',
+ )
headers.update(sdk_headers)
params = {
@@ -2972,26 +3158,28 @@ def create_image(self,
headers['Accept'] = 'application/json'
url = '/images'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_image(self,
+ def delete_image(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an image.
- This request deletes an image. This operation cannot be reversed. A
- system-provided image is not allowed to be deleted. Additionally, an image cannot
- be deleted if it:
+ This request deletes an image. Any active image export jobs will be completed
+ first. This operation cannot be reversed. A system-provided image is not allowed
+ to be deleted. Additionally, an image cannot be deleted if it:
- has a `status` of `deleting`
- has a `status` of `pending` with a `status_reasons` code of
`image_request_in_progress`
@@ -3006,9 +3194,11 @@ def delete_image(self,
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_image')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_image',
+ )
headers.update(sdk_headers)
params = {
@@ -3024,18 +3214,20 @@ def delete_image(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/images/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_image(self,
+ def get_image(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an image.
@@ -3051,9 +3243,11 @@ def get_image(self,
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_image')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_image',
+ )
headers.update(sdk_headers)
params = {
@@ -3070,19 +3264,21 @@ def get_image(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/images/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_image(self,
+ def update_image(
+ self,
id: str,
image_patch: 'ImagePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an image.
@@ -3106,9 +3302,11 @@ def update_image(self,
if isinstance(image_patch, ImagePatch):
image_patch = convert_model(image_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_image')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_image',
+ )
headers.update(sdk_headers)
params = {
@@ -3128,21 +3326,346 @@ def update_image(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/images/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
+ def list_image_export_jobs(
+ self,
+ image_id: str,
+ *,
+ name: str = None,
+ **kwargs,
+ ) -> DetailedResponse:
+ """
+ List all image export jobs.
- def list_operating_systems(self,
+ This request lists all export jobs for an image. Each job tracks the exporting of
+ the image to another location, such as a bucket within cloud object storage.
+ The jobs will be sorted by their `created_at` property values, with newest jobs
+ first. Jobs with identical `created_at` property values will in turn be sorted by
+ ascending
+ `name` property values.
+
+ :param str image_id: The image identifier.
+ :param str name: (optional) Filters the collection to resources with the
+ exact specified name.
+ :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 `ImageExportJobUnpaginatedCollection` object
+ """
+
+ if not image_id:
+ raise ValueError('image_id must be provided')
+ headers = {}
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_image_export_jobs',
+ )
+ headers.update(sdk_headers)
+
+ params = {
+ 'version': self.version,
+ 'generation': self.generation,
+ 'name': name,
+ }
+
+ if 'headers' in kwargs:
+ headers.update(kwargs.get('headers'))
+ del kwargs['headers']
+ headers['Accept'] = 'application/json'
+
+ path_param_keys = ['image_id']
+ path_param_values = self.encode_path_vars(image_id)
+ path_param_dict = dict(zip(path_param_keys, path_param_values))
+ url = '/images/{image_id}/export_jobs'.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_image_export_job(
+ self,
+ image_id: str,
+ storage_bucket: 'CloudObjectStorageBucketIdentity',
+ *,
+ format: str = None,
+ name: str = None,
+ **kwargs,
+ ) -> DetailedResponse:
+ """
+ Create an image export job.
+
+ This request creates and queues a new export job for the image specified in the
+ URL using the image export job prototype object. The image must be owned by the
+ account and be in the `available`, `deprecated`, or `unusable` state. The
+ prototype object is structured in the same way as a retrieved image export job,
+ and contains the information necessary to create and queue the new image export
+ job.
+
+ :param str image_id: The image identifier.
+ :param CloudObjectStorageBucketIdentity storage_bucket: The Cloud Object
+ Storage bucket to export the image to. The bucket must exist and an IAM
+ service authorization must grant `Image Service for VPC` of
+ `VPC Infrastructure Services` writer access to the bucket.
+ :param str format: (optional) The format to use for the exported image. If
+ the image is encrypted, only `qcow2` is supported.
+ :param str name: (optional) The name for this image export job. The name
+ must not be used by another export job for the image. If unspecified, the
+ name will be a hyphenated list of randomly-selected words prefixed with the
+ first 16 characters of the parent image name.
+ The exported image object name in Cloud Object Storage
+ (`storage_object.name` in the response) will be based on this name. The
+ object name will be unique within the bucket.
+ :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 `ImageExportJob` object
+ """
+
+ if not image_id:
+ raise ValueError('image_id must be provided')
+ if storage_bucket is None:
+ raise ValueError('storage_bucket must be provided')
+ storage_bucket = convert_model(storage_bucket)
+ headers = {}
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_image_export_job',
+ )
+ headers.update(sdk_headers)
+
+ params = {
+ 'version': self.version,
+ 'generation': self.generation,
+ }
+
+ data = {
+ 'storage_bucket': storage_bucket,
+ 'format': format,
+ 'name': name,
+ }
+ 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 = ['image_id']
+ path_param_values = self.encode_path_vars(image_id)
+ path_param_dict = dict(zip(path_param_keys, path_param_values))
+ url = '/images/{image_id}/export_jobs'.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_image_export_job(
+ self,
+ image_id: str,
+ id: str,
+ **kwargs,
+ ) -> DetailedResponse:
+ """
+ Delete an image export job.
+
+ This request deletes an image export job. This operation cannot be reversed. If
+ the job has not completed, the job will be canceled, and the incomplete exported
+ image object deleted. If the job has completed, the exported image object will not
+ be deleted.
+
+ :param str image_id: The image identifier.
+ :param str id: The image export job identifier.
+ :param dict headers: A `dict` containing the request headers
+ :return: A `DetailedResponse` containing the result, headers and HTTP status code.
+ :rtype: DetailedResponse
+ """
+
+ if not image_id:
+ raise ValueError('image_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_image_export_job',
+ )
+ headers.update(sdk_headers)
+
+ params = {
+ 'version': self.version,
+ 'generation': self.generation,
+ }
+
+ if 'headers' in kwargs:
+ headers.update(kwargs.get('headers'))
+ del kwargs['headers']
+
+ path_param_keys = ['image_id', 'id']
+ path_param_values = self.encode_path_vars(image_id, id)
+ path_param_dict = dict(zip(path_param_keys, path_param_values))
+ url = '/images/{image_id}/export_jobs/{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_image_export_job(
+ self,
+ image_id: str,
+ id: str,
+ **kwargs,
+ ) -> DetailedResponse:
+ """
+ Retrieve an image export job.
+
+ This request retrieves a single image export job specified by the identifier in
+ the URL.
+
+ :param str image_id: The image identifier.
+ :param str id: The image export job 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 `ImageExportJob` object
+ """
+
+ if not image_id:
+ raise ValueError('image_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_image_export_job',
+ )
+ 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 = ['image_id', 'id']
+ path_param_values = self.encode_path_vars(image_id, id)
+ path_param_dict = dict(zip(path_param_keys, path_param_values))
+ url = '/images/{image_id}/export_jobs/{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_image_export_job(
+ self,
+ image_id: str,
+ id: str,
+ image_export_job_patch: 'ImageExportJobPatch',
+ **kwargs,
+ ) -> DetailedResponse:
+ """
+ Update an image export job.
+
+ This request updates an image export job with the information in a provided image
+ export job patch. The image export job patch object is structured in the same way
+ as a retrieved image export job and contains only the information to be updated.
+
+ :param str image_id: The image identifier.
+ :param str id: The image export job identifier.
+ :param ImageExportJobPatch image_export_job_patch: The image export job
+ patch.
+ :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 `ImageExportJob` object
+ """
+
+ if not image_id:
+ raise ValueError('image_id must be provided')
+ if not id:
+ raise ValueError('id must be provided')
+ if image_export_job_patch is None:
+ raise ValueError('image_export_job_patch must be provided')
+ if isinstance(image_export_job_patch, ImageExportJobPatch):
+ image_export_job_patch = convert_model(image_export_job_patch)
+ headers = {}
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_image_export_job',
+ )
+ headers.update(sdk_headers)
+
+ params = {
+ 'version': self.version,
+ 'generation': self.generation,
+ }
+
+ data = json.dumps(image_export_job_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 = ['image_id', 'id']
+ path_param_values = self.encode_path_vars(image_id, id)
+ path_param_dict = dict(zip(path_param_keys, path_param_values))
+ url = '/images/{image_id}/export_jobs/{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 list_operating_systems(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all operating systems.
@@ -3158,9 +3681,11 @@ def list_operating_systems(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_operating_systems')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_operating_systems',
+ )
headers.update(sdk_headers)
params = {
@@ -3176,18 +3701,20 @@ def list_operating_systems(self,
headers['Accept'] = 'application/json'
url = '/operating_systems'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_operating_system(self,
+ def get_operating_system(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an operating system.
@@ -3203,9 +3730,11 @@ def get_operating_system(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_operating_system')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_operating_system',
+ )
headers.update(sdk_headers)
params = {
@@ -3222,10 +3751,12 @@ def get_operating_system(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/operating_systems/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
@@ -3234,12 +3765,12 @@ def get_operating_system(self,
# Keys
#########################
-
- def list_keys(self,
+ def list_keys(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all keys.
@@ -3256,9 +3787,11 @@ def list_keys(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_keys')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_keys',
+ )
headers.update(sdk_headers)
params = {
@@ -3274,22 +3807,24 @@ def list_keys(self,
headers['Accept'] = 'application/json'
url = '/keys'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_key(self,
+ def create_key(
+ self,
public_key: str,
*,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
type: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a key.
@@ -3321,9 +3856,11 @@ def create_key(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_key')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_key',
+ )
headers.update(sdk_headers)
params = {
@@ -3347,19 +3884,21 @@ def create_key(self,
headers['Accept'] = 'application/json'
url = '/keys'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_key(self,
+ def delete_key(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a key.
@@ -3375,9 +3914,11 @@ def delete_key(self,
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_key')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_key',
+ )
headers.update(sdk_headers)
params = {
@@ -3393,18 +3934,20 @@ def delete_key(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/keys/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_key(self,
+ def get_key(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a key.
@@ -3420,9 +3963,11 @@ def get_key(self,
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_key')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_key',
+ )
headers.update(sdk_headers)
params = {
@@ -3439,19 +3984,21 @@ def get_key(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/keys/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_key(self,
+ def update_key(
+ self,
id: str,
key_patch: 'KeyPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a key.
@@ -3472,9 +4019,11 @@ def update_key(self,
if isinstance(key_patch, KeyPatch):
key_patch = convert_model(key_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_key')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_key',
+ )
headers.update(sdk_headers)
params = {
@@ -3494,11 +4043,13 @@ def update_key(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/keys/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -3507,9 +4058,9 @@ def update_key(self,
# Instances
#########################
-
- def list_instance_profiles(self,
- **kwargs
+ def list_instance_profiles(
+ self,
+ **kwargs,
) -> DetailedResponse:
"""
List all instance profiles.
@@ -3525,9 +4076,11 @@ def list_instance_profiles(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_profiles')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_profiles',
+ )
headers.update(sdk_headers)
params = {
@@ -3541,18 +4094,20 @@ def list_instance_profiles(self,
headers['Accept'] = 'application/json'
url = '/instance/profiles'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_profile(self,
+ def get_instance_profile(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance profile.
@@ -3568,9 +4123,11 @@ def get_instance_profile(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_instance_profile')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_profile',
+ )
headers.update(sdk_headers)
params = {
@@ -3587,17 +4144,19 @@ def get_instance_profile(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance/profiles/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_templates(self,
- **kwargs
+ def list_instance_templates(
+ self,
+ **kwargs,
) -> DetailedResponse:
"""
List all instance templates.
@@ -3610,9 +4169,11 @@ def list_instance_templates(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_templates')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_templates',
+ )
headers.update(sdk_headers)
params = {
@@ -3626,18 +4187,20 @@ def list_instance_templates(self,
headers['Accept'] = 'application/json'
url = '/instance/templates'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_template(self,
+ def create_instance_template(
+ self,
instance_template_prototype: 'InstanceTemplatePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an instance template.
@@ -3661,9 +4224,11 @@ def create_instance_template(self,
if isinstance(instance_template_prototype, InstanceTemplatePrototype):
instance_template_prototype = convert_model(instance_template_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_template')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_template',
+ )
headers.update(sdk_headers)
params = {
@@ -3680,19 +4245,21 @@ def create_instance_template(self,
headers['Accept'] = 'application/json'
url = '/instance/templates'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_template(self,
+ def delete_instance_template(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance template.
@@ -3708,9 +4275,11 @@ def delete_instance_template(self,
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_instance_template')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_template',
+ )
headers.update(sdk_headers)
params = {
@@ -3726,18 +4295,20 @@ def delete_instance_template(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance/templates/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_template(self,
+ def get_instance_template(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance template.
@@ -3754,9 +4325,11 @@ def get_instance_template(self,
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_instance_template')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_template',
+ )
headers.update(sdk_headers)
params = {
@@ -3773,19 +4346,21 @@ def get_instance_template(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance/templates/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_template(self,
+ def update_instance_template(
+ self,
id: str,
instance_template_patch: 'InstanceTemplatePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance template.
@@ -3810,9 +4385,11 @@ def update_instance_template(self,
if isinstance(instance_template_patch, InstanceTemplatePatch):
instance_template_patch = convert_model(instance_template_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_template')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_template',
+ )
headers.update(sdk_headers)
params = {
@@ -3832,17 +4409,19 @@ def update_instance_template(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance/templates/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instances(self,
+ def list_instances(
+ self,
*,
start: str = None,
limit: int = None,
@@ -3857,7 +4436,7 @@ def list_instances(self,
placement_group_id: str = None,
placement_group_crn: str = None,
placement_group_name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all instances.
@@ -3895,9 +4474,11 @@ def list_instances(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instances')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instances',
+ )
headers.update(sdk_headers)
params = {
@@ -3924,18 +4505,20 @@ def list_instances(self,
headers['Accept'] = 'application/json'
url = '/instances'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance(self,
+ def create_instance(
+ self,
instance_prototype: 'InstancePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an instance.
@@ -3956,9 +4539,11 @@ def create_instance(self,
if isinstance(instance_prototype, InstancePrototype):
instance_prototype = convert_model(instance_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance',
+ )
headers.update(sdk_headers)
params = {
@@ -3975,19 +4560,21 @@ def create_instance(self,
headers['Accept'] = 'application/json'
url = '/instances'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance(self,
+ def delete_instance(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance.
@@ -3997,7 +4584,7 @@ def delete_instance(self,
disassociated. All flow log collectors with `auto_delete` set to `true` targeting
the instance and/or the instance's network interfaces are automatically deleted.
- :param str id: The instance identifier.
+ :param str id: The virtual server instance identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
@@ -4006,9 +4593,11 @@ def delete_instance(self,
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_instance')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance',
+ )
headers.update(sdk_headers)
params = {
@@ -4024,25 +4613,27 @@ def delete_instance(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance(self,
+ def get_instance(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance.
This request retrieves a single instance specified by the identifier in the URL.
- :param str id: The instance identifier.
+ :param str id: The virtual server instance 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 `Instance` object
@@ -4051,9 +4642,11 @@ def get_instance(self,
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_instance')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance',
+ )
headers.update(sdk_headers)
params = {
@@ -4070,19 +4663,21 @@ def get_instance(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance(self,
+ def update_instance(
+ self,
id: str,
instance_patch: 'InstancePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance.
@@ -4091,7 +4686,7 @@ def update_instance(self,
patch. The instance patch object is structured in the same way as a retrieved
instance and contains only the information to be updated.
- :param str id: The instance identifier.
+ :param str id: The virtual server instance identifier.
:param InstancePatch instance_patch: The instance patch.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -4105,9 +4700,11 @@ def update_instance(self,
if isinstance(instance_patch, InstancePatch):
instance_patch = convert_model(instance_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance',
+ )
headers.update(sdk_headers)
params = {
@@ -4127,19 +4724,21 @@ def update_instance(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_initialization(self,
+ def get_instance_initialization(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve initialization configuration for an instance.
@@ -4156,9 +4755,11 @@ def get_instance_initialization(self,
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_instance_initialization')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_initialization',
+ )
headers.update(sdk_headers)
params = {
@@ -4175,21 +4776,23 @@ def get_instance_initialization(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{id}/initialization'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_action(self,
+ def create_instance_action(
+ self,
instance_id: str,
type: str,
*,
force: bool = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an instance action.
@@ -4197,7 +4800,7 @@ def create_instance_action(self,
This request creates a new action which will be queued up to run as soon as any
pending or running actions have completed.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str type: The type of action.
:param bool force: (optional) If set to true, the action will be forced
immediately, and all queued actions deleted. Ignored for the start action.
@@ -4211,9 +4814,11 @@ def create_instance_action(self,
if type is None:
raise ValueError('type must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_action')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_action',
+ )
headers.update(sdk_headers)
params = {
@@ -4238,22 +4843,24 @@ def create_instance_action(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/actions'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_console_access_token(self,
+ def create_instance_console_access_token(
+ self,
instance_id: str,
console_type: str,
*,
force: bool = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a console access token for an instance.
@@ -4264,7 +4871,7 @@ def create_instance_console_access_token(self,
The access token is only valid for a short period of time, and a maximum of one
token is valid for a given instance at a time.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str console_type: The instance console type for which this token may
be used.
:param bool force: (optional) Indicates whether to disconnect an existing
@@ -4280,9 +4887,11 @@ def create_instance_console_access_token(self,
if console_type is None:
raise ValueError('console_type must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_console_access_token')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_console_access_token',
+ )
headers.update(sdk_headers)
params = {
@@ -4307,19 +4916,21 @@ def create_instance_console_access_token(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/console_access_token'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_disks(self,
+ def list_instance_disks(
+ self,
instance_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all disks on an instance.
@@ -4329,7 +4940,7 @@ def list_instance_disks(self,
instance storage. By default, the listed disks are sorted by their `created_at`
property values, with the newest disk first.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance 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 `InstanceDiskCollection` object
@@ -4338,9 +4949,11 @@ def list_instance_disks(self,
if not instance_id:
raise ValueError('instance_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_disks')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_disks',
+ )
headers.update(sdk_headers)
params = {
@@ -4357,19 +4970,21 @@ def list_instance_disks(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/disks'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_disk(self,
+ def get_instance_disk(
+ self,
instance_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance disk.
@@ -4377,7 +4992,7 @@ def get_instance_disk(self,
This request retrieves a single instance disk specified by the identifier in the
URL.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The instance disk identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -4389,9 +5004,11 @@ def get_instance_disk(self,
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_instance_disk')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_disk',
+ )
headers.update(sdk_headers)
params = {
@@ -4408,27 +5025,29 @@ def get_instance_disk(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/disks/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_disk(self,
+ def update_instance_disk(
+ self,
instance_id: str,
id: str,
instance_disk_patch: 'InstanceDiskPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance disk.
This request updates the instance disk with the information in a provided patch.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The instance disk identifier.
:param InstanceDiskPatch instance_disk_patch: The instance disk patch.
:param dict headers: A `dict` containing the request headers
@@ -4445,9 +5064,11 @@ def update_instance_disk(self,
if isinstance(instance_disk_patch, InstanceDiskPatch):
instance_disk_patch = convert_model(instance_disk_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_disk')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_disk',
+ )
headers.update(sdk_headers)
params = {
@@ -4467,19 +5088,21 @@ def update_instance_disk(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/disks/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_network_interfaces(self,
+ def list_instance_network_interfaces(
+ self,
instance_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all network interfaces on an instance.
@@ -4490,7 +5113,7 @@ def list_instance_network_interfaces(self,
network interfaces can be created to attach to multiple subnets. Multiple
interfaces may also attach to the same subnet.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance 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 `NetworkInterfaceUnpaginatedCollection` object
@@ -4499,9 +5122,11 @@ def list_instance_network_interfaces(self,
if not instance_id:
raise ValueError('instance_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_network_interfaces')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_network_interfaces',
+ )
headers.update(sdk_headers)
params = {
@@ -4518,16 +5143,18 @@ def list_instance_network_interfaces(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_network_interface(self,
+ def create_instance_network_interface(
+ self,
instance_id: str,
subnet: 'SubnetIdentity',
*,
@@ -4535,7 +5162,7 @@ def create_instance_network_interface(self,
name: str = None,
primary_ip: 'NetworkInterfaceIPPrototype' = None,
security_groups: List['SecurityGroupIdentity'] = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a network interface on an instance.
@@ -4547,7 +5174,7 @@ def create_instance_network_interface(self,
already attached to another network interface. Addresses on the network interface
must be within the specified subnet's CIDR blocks.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param SubnetIdentity subnet: The associated subnet.
:param bool allow_ip_spoofing: (optional) Indicates whether source IP
spoofing is allowed on this interface. If false, source IP spoofing is
@@ -4582,9 +5209,11 @@ def create_instance_network_interface(self,
if security_groups is not None:
security_groups = [convert_model(x) for x in security_groups]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -4612,20 +5241,22 @@ def create_instance_network_interface(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_network_interface(self,
+ def delete_instance_network_interface(
+ self,
instance_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a network interface.
@@ -4636,7 +5267,7 @@ def delete_instance_network_interface(self,
interface are automatically deleted. The primary network interface is not allowed
to be deleted.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The network interface identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -4648,9 +5279,11 @@ def delete_instance_network_interface(self,
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_instance_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -4666,19 +5299,21 @@ def delete_instance_network_interface(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_network_interface(self,
+ def get_instance_network_interface(
+ self,
instance_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a network interface.
@@ -4686,7 +5321,7 @@ def get_instance_network_interface(self,
This request retrieves a single network interface specified by the identifier in
the URL.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The network interface identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -4698,9 +5333,11 @@ def get_instance_network_interface(self,
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_instance_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -4717,20 +5354,22 @@ def get_instance_network_interface(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_network_interface(self,
+ def update_instance_network_interface(
+ self,
instance_id: str,
id: str,
network_interface_patch: 'NetworkInterfacePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a network interface.
@@ -4740,7 +5379,7 @@ def update_instance_network_interface(self,
in the same way as a retrieved network interface and needs to contain only the
information to be updated.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The network interface identifier.
:param NetworkInterfacePatch network_interface_patch: The network interface
patch.
@@ -4758,9 +5397,11 @@ def update_instance_network_interface(self,
if isinstance(network_interface_patch, NetworkInterfacePatch):
network_interface_patch = convert_model(network_interface_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -4780,27 +5421,29 @@ def update_instance_network_interface(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_network_interface_floating_ips(self,
+ def list_instance_network_interface_floating_ips(
+ self,
instance_id: str,
network_interface_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all floating IPs associated with a network interface.
This request lists all floating IPs associated with a network interface.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -4812,9 +5455,11 @@ def list_instance_network_interface_floating_ips(self,
if not network_interface_id:
raise ValueError('network_interface_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_network_interface_floating_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_network_interface_floating_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -4831,20 +5476,22 @@ def list_instance_network_interface_floating_ips(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def remove_instance_network_interface_floating_ip(self,
+ def remove_instance_network_interface_floating_ip(
+ self,
instance_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Disassociate a floating IP from a network interface.
@@ -4852,7 +5499,7 @@ def remove_instance_network_interface_floating_ip(self,
This request disassociates the specified floating IP from the specified network
interface.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param str id: The floating IP identifier.
:param dict headers: A `dict` containing the request headers
@@ -4867,9 +5514,11 @@ def remove_instance_network_interface_floating_ip(self,
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='remove_instance_network_interface_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='remove_instance_network_interface_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -4885,20 +5534,22 @@ def remove_instance_network_interface_floating_ip(self,
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)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_network_interface_floating_ip(self,
+ def get_instance_network_interface_floating_ip(
+ self,
instance_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve associated floating IP.
@@ -4906,7 +5557,7 @@ def get_instance_network_interface_floating_ip(self,
This request retrieves a specified floating IP address if it is associated with
the network interface and instance specified in the URL.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param str id: The floating IP identifier.
:param dict headers: A `dict` containing the request headers
@@ -4921,9 +5572,11 @@ def get_instance_network_interface_floating_ip(self,
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_instance_network_interface_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_network_interface_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -4940,20 +5593,22 @@ def get_instance_network_interface_floating_ip(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def add_instance_network_interface_floating_ip(self,
+ def add_instance_network_interface_floating_ip(
+ self,
instance_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Associate a floating IP with a network interface.
@@ -4963,7 +5618,7 @@ def add_instance_network_interface_floating_ip(self,
existing floating IP must not be required by another resource, such as a public
gateway. A request body is not required, and if provided, is ignored.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param str id: The floating IP identifier.
:param dict headers: A `dict` containing the request headers
@@ -4978,9 +5633,11 @@ def add_instance_network_interface_floating_ip(self,
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='add_instance_network_interface_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='add_instance_network_interface_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -4997,29 +5654,31 @@ def add_instance_network_interface_floating_ip(self,
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)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_network_interface_ips(self,
+ def list_instance_network_interface_ips(
+ self,
instance_id: str,
network_interface_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all reserved IPs bound to a network interface.
This request lists all reserved IPs bound to a network interface.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param str start: (optional) A server-provided token determining what
resource to start the page on.
@@ -5034,9 +5693,11 @@ def list_instance_network_interface_ips(self,
if not network_interface_id:
raise ValueError('network_interface_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_network_interface_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_network_interface_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -5055,20 +5716,22 @@ def list_instance_network_interface_ips(self,
path_param_values = self.encode_path_vars(instance_id, network_interface_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/ips'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_network_interface_ip(self,
+ def get_instance_network_interface_ip(
+ self,
instance_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve bound reserved IP.
@@ -5076,7 +5739,7 @@ def get_instance_network_interface_ip(self,
This request retrieves the specified reserved IP address if it is bound to the
network interface and instance specified in the URL.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param str id: The reserved IP identifier.
:param dict headers: A `dict` containing the request headers
@@ -5091,9 +5754,11 @@ def get_instance_network_interface_ip(self,
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_instance_network_interface_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_network_interface_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -5110,18 +5775,20 @@ def get_instance_network_interface_ip(self,
path_param_values = self.encode_path_vars(instance_id, network_interface_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_volume_attachments(self,
+ def list_instance_volume_attachments(
+ self,
instance_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all volumes attachments on an instance.
@@ -5130,7 +5797,7 @@ def list_instance_volume_attachments(self,
connects a volume to an instance. Each instance may have many volume attachments
but each volume attachment connects exactly one instance to exactly one volume.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance 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 `VolumeAttachmentCollection` object
@@ -5139,9 +5806,11 @@ def list_instance_volume_attachments(self,
if not instance_id:
raise ValueError('instance_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_volume_attachments')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_volume_attachments',
+ )
headers.update(sdk_headers)
params = {
@@ -5158,22 +5827,24 @@ def list_instance_volume_attachments(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/volume_attachments'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_volume_attachment(self,
+ def create_instance_volume_attachment(
+ self,
instance_id: str,
volume: 'VolumeAttachmentPrototypeVolume',
*,
delete_volume_on_instance_delete: bool = None,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a volume attachment on an instance.
@@ -5184,7 +5855,7 @@ def create_instance_volume_attachment(self,
way as a retrieved volume attachment, and contains the information necessary to
create the new volume attachment.
- :param str instance_id: The instance identifier.
+ :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 bool delete_volume_on_instance_delete: (optional) Indicates whether
@@ -5203,9 +5874,11 @@ def create_instance_volume_attachment(self,
raise ValueError('volume must be provided')
volume = convert_model(volume)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_volume_attachment')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_volume_attachment',
+ )
headers.update(sdk_headers)
params = {
@@ -5231,20 +5904,22 @@ def create_instance_volume_attachment(self,
path_param_values = self.encode_path_vars(instance_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/volume_attachments'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_volume_attachment(self,
+ def delete_instance_volume_attachment(
+ self,
instance_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a volume attachment.
@@ -5253,7 +5928,7 @@ def delete_instance_volume_attachment(self,
new volume attachment may subsequently be created for the volume. For this
request to succeed, the volume must not be busy.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The volume attachment identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -5265,9 +5940,11 @@ def delete_instance_volume_attachment(self,
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_instance_volume_attachment')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_volume_attachment',
+ )
headers.update(sdk_headers)
params = {
@@ -5283,19 +5960,21 @@ def delete_instance_volume_attachment(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/volume_attachments/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_volume_attachment(self,
+ def get_instance_volume_attachment(
+ self,
instance_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a volume attachment.
@@ -5303,7 +5982,7 @@ def get_instance_volume_attachment(self,
This request retrieves a single volume attachment specified by the identifier in
the URL.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The volume attachment identifier.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -5315,9 +5994,11 @@ def get_instance_volume_attachment(self,
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_instance_volume_attachment')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_volume_attachment',
+ )
headers.update(sdk_headers)
params = {
@@ -5334,20 +6015,22 @@ def get_instance_volume_attachment(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/volume_attachments/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_volume_attachment(self,
+ def update_instance_volume_attachment(
+ self,
instance_id: str,
id: str,
volume_attachment_patch: 'VolumeAttachmentPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a volume attachment.
@@ -5357,7 +6040,7 @@ def update_instance_volume_attachment(self,
same way as a retrieved volume attachment and needs to contain only the
information to be updated.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str id: The volume attachment identifier.
:param VolumeAttachmentPatch volume_attachment_patch: The volume attachment
patch.
@@ -5375,9 +6058,11 @@ def update_instance_volume_attachment(self,
if isinstance(volume_attachment_patch, VolumeAttachmentPatch):
volume_attachment_patch = convert_model(volume_attachment_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_volume_attachment')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_volume_attachment',
+ )
headers.update(sdk_headers)
params = {
@@ -5397,11 +6082,13 @@ def update_instance_volume_attachment(self,
path_param_values = self.encode_path_vars(instance_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instances/{instance_id}/volume_attachments/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -5410,12 +6097,12 @@ def update_instance_volume_attachment(self,
# Instance groups
#########################
-
- def list_instance_groups(self,
+ def list_instance_groups(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all instance groups.
@@ -5431,9 +6118,11 @@ def list_instance_groups(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_groups')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_groups',
+ )
headers.update(sdk_headers)
params = {
@@ -5449,16 +6138,18 @@ def list_instance_groups(self,
headers['Accept'] = 'application/json'
url = '/instance_groups'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_group(self,
+ def create_instance_group(
+ self,
instance_template: 'InstanceTemplateIdentity',
subnets: List['SubnetIdentity'],
*,
@@ -5468,7 +6159,7 @@ def create_instance_group(self,
membership_count: int = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an instance group.
@@ -5523,9 +6214,11 @@ def create_instance_group(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_group',
+ )
headers.update(sdk_headers)
params = {
@@ -5553,19 +6246,21 @@ def create_instance_group(self,
headers['Accept'] = 'application/json'
url = '/instance_groups'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group(self,
+ def delete_instance_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance group.
@@ -5582,9 +6277,11 @@ def delete_instance_group(self,
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_instance_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group',
+ )
headers.update(sdk_headers)
params = {
@@ -5600,18 +6297,20 @@ def delete_instance_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_group(self,
+ def get_instance_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance group.
@@ -5627,9 +6326,11 @@ def get_instance_group(self,
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_instance_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_group',
+ )
headers.update(sdk_headers)
params = {
@@ -5646,19 +6347,21 @@ def get_instance_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_group(self,
+ def update_instance_group(
+ self,
id: str,
instance_group_patch: 'InstanceGroupPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance group.
@@ -5681,9 +6384,11 @@ def update_instance_group(self,
if isinstance(instance_group_patch, InstanceGroupPatch):
instance_group_patch = convert_model(instance_group_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_group',
+ )
headers.update(sdk_headers)
params = {
@@ -5703,19 +6408,21 @@ def update_instance_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group_load_balancer(self,
+ def delete_instance_group_load_balancer(
+ self,
instance_group_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance group load balancer.
@@ -5732,9 +6439,11 @@ def delete_instance_group_load_balancer(self,
if not instance_group_id:
raise ValueError('instance_group_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_instance_group_load_balancer')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group_load_balancer',
+ )
headers.update(sdk_headers)
params = {
@@ -5750,21 +6459,23 @@ def delete_instance_group_load_balancer(self,
path_param_values = self.encode_path_vars(instance_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/load_balancer'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_group_managers(self,
+ def list_instance_group_managers(
+ self,
instance_group_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all managers for an instance group.
@@ -5783,9 +6494,11 @@ def list_instance_group_managers(self,
if not instance_group_id:
raise ValueError('instance_group_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_group_managers')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_group_managers',
+ )
headers.update(sdk_headers)
params = {
@@ -5804,19 +6517,21 @@ def list_instance_group_managers(self,
path_param_values = self.encode_path_vars(instance_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/managers'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_group_manager(self,
+ def create_instance_group_manager(
+ self,
instance_group_id: str,
instance_group_manager_prototype: 'InstanceGroupManagerPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a manager for an instance group.
@@ -5838,9 +6553,11 @@ def create_instance_group_manager(self,
if isinstance(instance_group_manager_prototype, InstanceGroupManagerPrototype):
instance_group_manager_prototype = convert_model(instance_group_manager_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_group_manager')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_group_manager',
+ )
headers.update(sdk_headers)
params = {
@@ -5860,20 +6577,22 @@ def create_instance_group_manager(self,
path_param_values = self.encode_path_vars(instance_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/managers'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group_manager(self,
+ def delete_instance_group_manager(
+ self,
instance_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance group manager.
@@ -5892,9 +6611,11 @@ def delete_instance_group_manager(self,
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_instance_group_manager')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group_manager',
+ )
headers.update(sdk_headers)
params = {
@@ -5910,19 +6631,21 @@ def delete_instance_group_manager(self,
path_param_values = self.encode_path_vars(instance_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/managers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_group_manager(self,
+ def get_instance_group_manager(
+ self,
instance_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance group manager.
@@ -5942,9 +6665,11 @@ def get_instance_group_manager(self,
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_instance_group_manager')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_group_manager',
+ )
headers.update(sdk_headers)
params = {
@@ -5961,20 +6686,22 @@ def get_instance_group_manager(self,
path_param_values = self.encode_path_vars(instance_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/managers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_group_manager(self,
+ def update_instance_group_manager(
+ self,
instance_group_id: str,
id: str,
instance_group_manager_patch: 'InstanceGroupManagerPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance group manager.
@@ -6000,9 +6727,11 @@ def update_instance_group_manager(self,
if isinstance(instance_group_manager_patch, InstanceGroupManagerPatch):
instance_group_manager_patch = convert_model(instance_group_manager_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_group_manager')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_group_manager',
+ )
headers.update(sdk_headers)
params = {
@@ -6022,23 +6751,25 @@ def update_instance_group_manager(self,
path_param_values = self.encode_path_vars(instance_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/managers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_group_manager_actions(self,
+ def list_instance_group_manager_actions(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all actions for an instance group manager.
@@ -6061,9 +6792,11 @@ def list_instance_group_manager_actions(self,
if not instance_group_manager_id:
raise ValueError('instance_group_manager_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_group_manager_actions')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_group_manager_actions',
+ )
headers.update(sdk_headers)
params = {
@@ -6082,20 +6815,22 @@ def list_instance_group_manager_actions(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_group_manager_action(self,
+ def create_instance_group_manager_action(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
instance_group_manager_action_prototype: 'InstanceGroupManagerActionPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an instance group manager action.
@@ -6122,9 +6857,11 @@ def create_instance_group_manager_action(self,
if isinstance(instance_group_manager_action_prototype, InstanceGroupManagerActionPrototype):
instance_group_manager_action_prototype = convert_model(instance_group_manager_action_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_group_manager_action')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_group_manager_action',
+ )
headers.update(sdk_headers)
params = {
@@ -6144,21 +6881,23 @@ def create_instance_group_manager_action(self,
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)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group_manager_action(self,
+ def delete_instance_group_manager_action(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete specified instance group manager action.
@@ -6182,9 +6921,11 @@ def delete_instance_group_manager_action(self,
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_instance_group_manager_action')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group_manager_action',
+ )
headers.update(sdk_headers)
params = {
@@ -6200,20 +6941,22 @@ def delete_instance_group_manager_action(self,
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)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_group_manager_action(self,
+ def get_instance_group_manager_action(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve specified instance group manager action.
@@ -6237,9 +6980,11 @@ def get_instance_group_manager_action(self,
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_instance_group_manager_action')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_group_manager_action',
+ )
headers.update(sdk_headers)
params = {
@@ -6256,21 +7001,23 @@ def get_instance_group_manager_action(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_group_manager_action(self,
+ def update_instance_group_manager_action(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
id: str,
instance_group_manager_action_patch: 'InstanceGroupManagerActionPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update specified instance group manager action.
@@ -6299,9 +7046,11 @@ def update_instance_group_manager_action(self,
if isinstance(instance_group_manager_action_patch, InstanceGroupManagerActionPatch):
instance_group_manager_action_patch = convert_model(instance_group_manager_action_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_group_manager_action')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_group_manager_action',
+ )
headers.update(sdk_headers)
params = {
@@ -6321,23 +7070,25 @@ def update_instance_group_manager_action(self,
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)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_group_manager_policies(self,
+ def list_instance_group_manager_policies(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all policies for an instance group manager.
@@ -6360,9 +7111,11 @@ def list_instance_group_manager_policies(self,
if not instance_group_manager_id:
raise ValueError('instance_group_manager_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_group_manager_policies')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_group_manager_policies',
+ )
headers.update(sdk_headers)
params = {
@@ -6381,20 +7134,22 @@ def list_instance_group_manager_policies(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_instance_group_manager_policy(self,
+ def create_instance_group_manager_policy(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
instance_group_manager_policy_prototype: 'InstanceGroupManagerPolicyPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a policy for an instance group manager.
@@ -6421,9 +7176,11 @@ def create_instance_group_manager_policy(self,
if isinstance(instance_group_manager_policy_prototype, InstanceGroupManagerPolicyPrototype):
instance_group_manager_policy_prototype = convert_model(instance_group_manager_policy_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_instance_group_manager_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_instance_group_manager_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -6443,21 +7200,23 @@ def create_instance_group_manager_policy(self,
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)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group_manager_policy(self,
+ def delete_instance_group_manager_policy(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance group manager policy.
@@ -6481,9 +7240,11 @@ def delete_instance_group_manager_policy(self,
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_instance_group_manager_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group_manager_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -6499,20 +7260,22 @@ def delete_instance_group_manager_policy(self,
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)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_group_manager_policy(self,
+ def get_instance_group_manager_policy(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance group manager policy.
@@ -6536,9 +7299,11 @@ def get_instance_group_manager_policy(self,
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_instance_group_manager_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_group_manager_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -6555,21 +7320,23 @@ def get_instance_group_manager_policy(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_group_manager_policy(self,
+ def update_instance_group_manager_policy(
+ self,
instance_group_id: str,
instance_group_manager_id: str,
id: str,
instance_group_manager_policy_patch: 'InstanceGroupManagerPolicyPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance group manager policy.
@@ -6598,9 +7365,11 @@ def update_instance_group_manager_policy(self,
if isinstance(instance_group_manager_policy_patch, InstanceGroupManagerPolicyPatch):
instance_group_manager_policy_patch = convert_model(instance_group_manager_policy_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_group_manager_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_group_manager_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -6620,19 +7389,21 @@ def update_instance_group_manager_policy(self,
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)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group_memberships(self,
+ def delete_instance_group_memberships(
+ self,
instance_group_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete all memberships from an instance group.
@@ -6651,9 +7422,11 @@ def delete_instance_group_memberships(self,
if not instance_group_id:
raise ValueError('instance_group_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_instance_group_memberships')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group_memberships',
+ )
headers.update(sdk_headers)
params = {
@@ -6669,21 +7442,23 @@ def delete_instance_group_memberships(self,
path_param_values = self.encode_path_vars(instance_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/memberships'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_instance_group_memberships(self,
+ def list_instance_group_memberships(
+ self,
instance_group_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all memberships for an instance group.
@@ -6702,9 +7477,11 @@ def list_instance_group_memberships(self,
if not instance_group_id:
raise ValueError('instance_group_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_instance_group_memberships')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_instance_group_memberships',
+ )
headers.update(sdk_headers)
params = {
@@ -6723,19 +7500,21 @@ def list_instance_group_memberships(self,
path_param_values = self.encode_path_vars(instance_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/memberships'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_instance_group_membership(self,
+ def delete_instance_group_membership(
+ self,
instance_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an instance group membership.
@@ -6756,9 +7535,11 @@ def delete_instance_group_membership(self,
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_instance_group_membership')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_instance_group_membership',
+ )
headers.update(sdk_headers)
params = {
@@ -6774,19 +7555,21 @@ def delete_instance_group_membership(self,
path_param_values = self.encode_path_vars(instance_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/memberships/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_instance_group_membership(self,
+ def get_instance_group_membership(
+ self,
instance_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an instance group membership.
@@ -6806,9 +7589,11 @@ def get_instance_group_membership(self,
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_instance_group_membership')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_instance_group_membership',
+ )
headers.update(sdk_headers)
params = {
@@ -6825,20 +7610,22 @@ def get_instance_group_membership(self,
path_param_values = self.encode_path_vars(instance_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/memberships/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_instance_group_membership(self,
+ def update_instance_group_membership(
+ self,
instance_group_id: str,
id: str,
instance_group_membership_patch: 'InstanceGroupMembershipPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an instance group membership.
@@ -6864,9 +7651,11 @@ def update_instance_group_membership(self,
if isinstance(instance_group_membership_patch, InstanceGroupMembershipPatch):
instance_group_membership_patch = convert_model(instance_group_membership_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_instance_group_membership')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_instance_group_membership',
+ )
headers.update(sdk_headers)
params = {
@@ -6886,11 +7675,13 @@ def update_instance_group_membership(self,
path_param_values = self.encode_path_vars(instance_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/instance_groups/{instance_group_id}/memberships/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -6899,15 +7690,15 @@ def update_instance_group_membership(self,
# Dedicated hosts
#########################
-
- def list_dedicated_host_groups(self,
+ def list_dedicated_host_groups(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
zone_name: str = None,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all dedicated host groups.
@@ -6931,9 +7722,11 @@ def list_dedicated_host_groups(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_dedicated_host_groups')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_dedicated_host_groups',
+ )
headers.update(sdk_headers)
params = {
@@ -6952,35 +7745,37 @@ def list_dedicated_host_groups(self,
headers['Accept'] = 'application/json'
url = '/dedicated_host/groups'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_dedicated_host_group(self,
+ def create_dedicated_host_group(
+ self,
+ class_: str,
+ family: str,
+ zone: 'ZoneIdentity',
*,
- class_: str = None,
- family: str = None,
- zone: 'ZoneIdentity' = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a dedicated host group.
This request creates a new dedicated host group.
- :param str class_: (optional) The dedicated host profile class for hosts in
- this group.
- :param str family: (optional) The dedicated host profile family for hosts
- in this group.
- :param ZoneIdentity zone: (optional) The zone this dedicated host group
- will reside in.
+ :param str class_: The dedicated host profile class for hosts in this
+ group.
+ :param str family: The dedicated host profile family for hosts in this
+ group.
+ :param ZoneIdentity zone: The zone this dedicated host group will reside
+ in.
:param str name: (optional) The name for this dedicated host group. The
name must not be used by another dedicated host group in the region. If
unspecified, the name will be a hyphenated list of randomly-selected words.
@@ -6993,14 +7788,21 @@ def create_dedicated_host_group(self,
:rtype: DetailedResponse with `dict` result representing a `DedicatedHostGroup` object
"""
- if zone is not None:
- zone = convert_model(zone)
+ if class_ is None:
+ raise ValueError('class_ must be provided')
+ if family is None:
+ raise ValueError('family must be provided')
+ if zone is None:
+ raise ValueError('zone must be provided')
+ zone = convert_model(zone)
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_dedicated_host_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_dedicated_host_group',
+ )
headers.update(sdk_headers)
params = {
@@ -7025,19 +7827,21 @@ def create_dedicated_host_group(self,
headers['Accept'] = 'application/json'
url = '/dedicated_host/groups'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_dedicated_host_group(self,
+ def delete_dedicated_host_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a dedicated host group.
@@ -7053,9 +7857,11 @@ def delete_dedicated_host_group(self,
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_dedicated_host_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_dedicated_host_group',
+ )
headers.update(sdk_headers)
params = {
@@ -7071,18 +7877,20 @@ def delete_dedicated_host_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_host/groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_dedicated_host_group(self,
+ def get_dedicated_host_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a dedicated host group.
@@ -7099,9 +7907,11 @@ def get_dedicated_host_group(self,
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_dedicated_host_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_dedicated_host_group',
+ )
headers.update(sdk_headers)
params = {
@@ -7118,19 +7928,21 @@ def get_dedicated_host_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_host/groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_dedicated_host_group(self,
+ def update_dedicated_host_group(
+ self,
id: str,
dedicated_host_group_patch: 'DedicatedHostGroupPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a dedicated host group.
@@ -7155,9 +7967,11 @@ def update_dedicated_host_group(self,
if isinstance(dedicated_host_group_patch, DedicatedHostGroupPatch):
dedicated_host_group_patch = convert_model(dedicated_host_group_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_dedicated_host_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_dedicated_host_group',
+ )
headers.update(sdk_headers)
params = {
@@ -7177,21 +7991,23 @@ def update_dedicated_host_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_host/groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_dedicated_host_profiles(self,
+ def list_dedicated_host_profiles(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all dedicated host profiles.
@@ -7210,9 +8026,11 @@ def list_dedicated_host_profiles(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_dedicated_host_profiles')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_dedicated_host_profiles',
+ )
headers.update(sdk_headers)
params = {
@@ -7228,18 +8046,20 @@ def list_dedicated_host_profiles(self,
headers['Accept'] = 'application/json'
url = '/dedicated_host/profiles'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_dedicated_host_profile(self,
+ def get_dedicated_host_profile(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a dedicated host profile.
@@ -7256,9 +8076,11 @@ def get_dedicated_host_profile(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_dedicated_host_profile')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_dedicated_host_profile',
+ )
headers.update(sdk_headers)
params = {
@@ -7275,16 +8097,18 @@ def get_dedicated_host_profile(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_host/profiles/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_dedicated_hosts(self,
+ def list_dedicated_hosts(
+ self,
*,
dedicated_host_group_id: str = None,
start: str = None,
@@ -7292,7 +8116,7 @@ def list_dedicated_hosts(self,
resource_group_id: str = None,
zone_name: str = None,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all dedicated hosts.
@@ -7316,9 +8140,11 @@ def list_dedicated_hosts(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_dedicated_hosts')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_dedicated_hosts',
+ )
headers.update(sdk_headers)
params = {
@@ -7338,18 +8164,20 @@ def list_dedicated_hosts(self,
headers['Accept'] = 'application/json'
url = '/dedicated_hosts'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_dedicated_host(self,
+ def create_dedicated_host(
+ self,
dedicated_host_prototype: 'DedicatedHostPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a dedicated host.
@@ -7368,9 +8196,11 @@ def create_dedicated_host(self,
if isinstance(dedicated_host_prototype, DedicatedHostPrototype):
dedicated_host_prototype = convert_model(dedicated_host_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_dedicated_host')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_dedicated_host',
+ )
headers.update(sdk_headers)
params = {
@@ -7387,19 +8217,21 @@ def create_dedicated_host(self,
headers['Accept'] = 'application/json'
url = '/dedicated_hosts'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_dedicated_host_disks(self,
+ def list_dedicated_host_disks(
+ self,
dedicated_host_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all disks on a dedicated host.
@@ -7418,9 +8250,11 @@ def list_dedicated_host_disks(self,
if not dedicated_host_id:
raise ValueError('dedicated_host_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_dedicated_host_disks')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_dedicated_host_disks',
+ )
headers.update(sdk_headers)
params = {
@@ -7437,19 +8271,21 @@ def list_dedicated_host_disks(self,
path_param_values = self.encode_path_vars(dedicated_host_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_hosts/{dedicated_host_id}/disks'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_dedicated_host_disk(self,
+ def get_dedicated_host_disk(
+ self,
dedicated_host_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a dedicated host disk.
@@ -7469,9 +8305,11 @@ def get_dedicated_host_disk(self,
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_dedicated_host_disk')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_dedicated_host_disk',
+ )
headers.update(sdk_headers)
params = {
@@ -7488,20 +8326,22 @@ def get_dedicated_host_disk(self,
path_param_values = self.encode_path_vars(dedicated_host_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_hosts/{dedicated_host_id}/disks/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_dedicated_host_disk(self,
+ def update_dedicated_host_disk(
+ self,
dedicated_host_id: str,
id: str,
dedicated_host_disk_patch: 'DedicatedHostDiskPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a dedicated host disk.
@@ -7527,9 +8367,11 @@ def update_dedicated_host_disk(self,
if isinstance(dedicated_host_disk_patch, DedicatedHostDiskPatch):
dedicated_host_disk_patch = convert_model(dedicated_host_disk_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_dedicated_host_disk')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_dedicated_host_disk',
+ )
headers.update(sdk_headers)
params = {
@@ -7549,19 +8391,21 @@ def update_dedicated_host_disk(self,
path_param_values = self.encode_path_vars(dedicated_host_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_hosts/{dedicated_host_id}/disks/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_dedicated_host(self,
+ def delete_dedicated_host(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a dedicated host.
@@ -7577,9 +8421,11 @@ def delete_dedicated_host(self,
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_dedicated_host')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_dedicated_host',
+ )
headers.update(sdk_headers)
params = {
@@ -7595,18 +8441,20 @@ def delete_dedicated_host(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_hosts/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_dedicated_host(self,
+ def get_dedicated_host(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a dedicated host.
@@ -7623,9 +8471,11 @@ def get_dedicated_host(self,
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_dedicated_host')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_dedicated_host',
+ )
headers.update(sdk_headers)
params = {
@@ -7642,19 +8492,21 @@ def get_dedicated_host(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_hosts/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_dedicated_host(self,
+ def update_dedicated_host(
+ self,
id: str,
dedicated_host_patch: 'DedicatedHostPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a dedicated host.
@@ -7677,9 +8529,11 @@ def update_dedicated_host(self,
if isinstance(dedicated_host_patch, DedicatedHostPatch):
dedicated_host_patch = convert_model(dedicated_host_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_dedicated_host')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_dedicated_host',
+ )
headers.update(sdk_headers)
params = {
@@ -7699,11 +8553,13 @@ def update_dedicated_host(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/dedicated_hosts/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -7712,15 +8568,15 @@ def update_dedicated_host(self,
# Backup policies
#########################
-
- def list_backup_policies(self,
+ def list_backup_policies(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
name: str = None,
tag: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all backup policies.
@@ -7744,9 +8600,11 @@ def list_backup_policies(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_backup_policies')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_backup_policies',
+ )
headers.update(sdk_headers)
params = {
@@ -7765,23 +8623,25 @@ def list_backup_policies(self,
headers['Accept'] = 'application/json'
url = '/backup_policies'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_backup_policy(self,
+ def create_backup_policy(
+ self,
+ match_user_tags: List[str],
*,
- match_user_tags: List[str] = None,
match_resource_types: List[str] = None,
name: str = None,
plans: List['BackupPolicyPlanPrototype'] = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a backup policy.
@@ -7790,9 +8650,9 @@ def create_backup_policy(self,
The prototype object is structured in the same way as a retrieved backup policy,
and contains the information necessary to create the new backup policy.
- :param List[str] match_user_tags: (optional) 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 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 List[str] match_resource_types: (optional) A 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.
@@ -7810,14 +8670,18 @@ def create_backup_policy(self,
:rtype: DetailedResponse with `dict` result representing a `BackupPolicy` object
"""
+ if match_user_tags is None:
+ raise ValueError('match_user_tags must be provided')
if plans is not None:
plans = [convert_model(x) for x in plans]
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_backup_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_backup_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -7842,17 +8706,19 @@ def create_backup_policy(self,
headers['Accept'] = 'application/json'
url = '/backup_policies'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_backup_policy_jobs(self,
+ def list_backup_policy_jobs(
+ self,
backup_policy_id: str,
*,
status: str = None,
@@ -7863,7 +8729,7 @@ def list_backup_policy_jobs(self,
source_id: str = None,
target_snapshots_id: str = None,
target_snapshots_crn: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all jobs for a backup policy.
@@ -7898,9 +8764,11 @@ def list_backup_policy_jobs(self,
if not backup_policy_id:
raise ValueError('backup_policy_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_backup_policy_jobs')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_backup_policy_jobs',
+ )
headers.update(sdk_headers)
params = {
@@ -7925,19 +8793,21 @@ def list_backup_policy_jobs(self,
path_param_values = self.encode_path_vars(backup_policy_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/jobs'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_backup_policy_job(self,
+ def get_backup_policy_job(
+ self,
backup_policy_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a backup policy job.
@@ -7957,9 +8827,11 @@ def get_backup_policy_job(self,
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_backup_policy_job')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_backup_policy_job',
+ )
headers.update(sdk_headers)
params = {
@@ -7976,20 +8848,22 @@ def get_backup_policy_job(self,
path_param_values = self.encode_path_vars(backup_policy_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/jobs/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_backup_policy_plans(self,
+ def list_backup_policy_plans(
+ self,
backup_policy_id: str,
*,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all plans for a backup policy.
@@ -8008,9 +8882,11 @@ def list_backup_policy_plans(self,
if not backup_policy_id:
raise ValueError('backup_policy_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_backup_policy_plans')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_backup_policy_plans',
+ )
headers.update(sdk_headers)
params = {
@@ -8028,16 +8904,18 @@ def list_backup_policy_plans(self,
path_param_values = self.encode_path_vars(backup_policy_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/plans'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_backup_policy_plan(self,
+ def create_backup_policy_plan(
+ self,
backup_policy_id: str,
cron_spec: str,
*,
@@ -8047,7 +8925,7 @@ def create_backup_policy_plan(self,
copy_user_tags: bool = None,
deletion_trigger: 'BackupPolicyPlanDeletionTriggerPrototype' = None,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a plan for a backup policy.
@@ -8094,9 +8972,11 @@ def create_backup_policy_plan(self,
if deletion_trigger is not None:
deletion_trigger = convert_model(deletion_trigger)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_backup_policy_plan')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_backup_policy_plan',
+ )
headers.update(sdk_headers)
params = {
@@ -8126,22 +9006,24 @@ def create_backup_policy_plan(self,
path_param_values = self.encode_path_vars(backup_policy_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/plans'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_backup_policy_plan(self,
+ def delete_backup_policy_plan(
+ self,
backup_policy_id: str,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a backup policy plan.
@@ -8170,9 +9052,11 @@ def delete_backup_policy_plan(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_backup_policy_plan')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_backup_policy_plan',
+ )
headers.update(sdk_headers)
params = {
@@ -8189,19 +9073,21 @@ def delete_backup_policy_plan(self,
path_param_values = self.encode_path_vars(backup_policy_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/plans/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_backup_policy_plan(self,
+ def get_backup_policy_plan(
+ self,
backup_policy_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a backup policy plan.
@@ -8221,9 +9107,11 @@ def get_backup_policy_plan(self,
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_backup_policy_plan')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_backup_policy_plan',
+ )
headers.update(sdk_headers)
params = {
@@ -8240,22 +9128,24 @@ def get_backup_policy_plan(self,
path_param_values = self.encode_path_vars(backup_policy_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/plans/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_backup_policy_plan(self,
+ def update_backup_policy_plan(
+ self,
backup_policy_id: str,
id: str,
backup_policy_plan_patch: 'BackupPolicyPlanPatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a backup policy plan.
@@ -8287,9 +9177,11 @@ def update_backup_policy_plan(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_backup_policy_plan')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_backup_policy_plan',
+ )
headers.update(sdk_headers)
params = {
@@ -8309,21 +9201,23 @@ def update_backup_policy_plan(self,
path_param_values = self.encode_path_vars(backup_policy_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{backup_policy_id}/plans/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_backup_policy(self,
+ def delete_backup_policy(
+ self,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a backup policy.
@@ -8346,9 +9240,11 @@ def delete_backup_policy(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_backup_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_backup_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -8365,18 +9261,20 @@ def delete_backup_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_backup_policy(self,
+ def get_backup_policy(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a backup policy.
@@ -8393,9 +9291,11 @@ def get_backup_policy(self,
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_backup_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_backup_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -8412,21 +9312,23 @@ def get_backup_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_backup_policy(self,
+ def update_backup_policy(
+ self,
id: str,
backup_policy_patch: 'BackupPolicyPatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a backup policy.
@@ -8454,9 +9356,11 @@ def update_backup_policy(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_backup_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_backup_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -8476,11 +9380,13 @@ def update_backup_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/backup_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -8489,12 +9395,12 @@ def update_backup_policy(self,
# Placement groups
#########################
-
- def list_placement_groups(self,
+ def list_placement_groups(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all placement groups.
@@ -8510,9 +9416,11 @@ def list_placement_groups(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_placement_groups')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_placement_groups',
+ )
headers.update(sdk_headers)
params = {
@@ -8528,21 +9436,23 @@ def list_placement_groups(self,
headers['Accept'] = 'application/json'
url = '/placement_groups'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_placement_group(self,
+ def create_placement_group(
+ self,
strategy: str,
*,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a placement group.
@@ -8573,9 +9483,11 @@ def create_placement_group(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_placement_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_placement_group',
+ )
headers.update(sdk_headers)
params = {
@@ -8598,19 +9510,21 @@ def create_placement_group(self,
headers['Accept'] = 'application/json'
url = '/placement_groups'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_placement_group(self,
+ def delete_placement_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a placement group.
@@ -8628,9 +9542,11 @@ def delete_placement_group(self,
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_placement_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_placement_group',
+ )
headers.update(sdk_headers)
params = {
@@ -8646,18 +9562,20 @@ def delete_placement_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/placement_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_placement_group(self,
+ def get_placement_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a placement group.
@@ -8674,9 +9592,11 @@ def get_placement_group(self,
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_placement_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_placement_group',
+ )
headers.update(sdk_headers)
params = {
@@ -8693,19 +9613,21 @@ def get_placement_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/placement_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_placement_group(self,
+ def update_placement_group(
+ self,
id: str,
placement_group_patch: 'PlacementGroupPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a placement group.
@@ -8729,9 +9651,11 @@ def update_placement_group(self,
if isinstance(placement_group_patch, PlacementGroupPatch):
placement_group_patch = convert_model(placement_group_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_placement_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_placement_group',
+ )
headers.update(sdk_headers)
params = {
@@ -8751,11 +9675,13 @@ def update_placement_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/placement_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -8764,12 +9690,12 @@ def update_placement_group(self,
# Bare metal servers
#########################
-
- def list_bare_metal_server_profiles(self,
+ def list_bare_metal_server_profiles(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all bare metal server profiles.
@@ -8788,9 +9714,11 @@ def list_bare_metal_server_profiles(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_bare_metal_server_profiles')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_bare_metal_server_profiles',
+ )
headers.update(sdk_headers)
params = {
@@ -8806,18 +9734,20 @@ def list_bare_metal_server_profiles(self,
headers['Accept'] = 'application/json'
url = '/bare_metal_server/profiles'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server_profile(self,
+ def get_bare_metal_server_profile(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a bare metal server profile.
@@ -8834,9 +9764,11 @@ def get_bare_metal_server_profile(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_bare_metal_server_profile')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server_profile',
+ )
headers.update(sdk_headers)
params = {
@@ -8853,16 +9785,18 @@ def get_bare_metal_server_profile(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_server/profiles/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_bare_metal_servers(self,
+ def list_bare_metal_servers(
+ self,
*,
start: str = None,
limit: int = None,
@@ -8874,7 +9808,7 @@ def list_bare_metal_servers(self,
network_interfaces_subnet_id: str = None,
network_interfaces_subnet_crn: str = None,
network_interfaces_subnet_name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all bare metal servers.
@@ -8906,9 +9840,11 @@ def list_bare_metal_servers(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_bare_metal_servers')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_bare_metal_servers',
+ )
headers.update(sdk_headers)
params = {
@@ -8932,16 +9868,18 @@ def list_bare_metal_servers(self,
headers['Accept'] = 'application/json'
url = '/bare_metal_servers'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_bare_metal_server(self,
+ def create_bare_metal_server(
+ self,
initialization: 'BareMetalServerInitializationPrototype',
primary_network_interface: 'BareMetalServerPrimaryNetworkInterfacePrototype',
profile: 'BareMetalServerProfileIdentity',
@@ -8953,7 +9891,7 @@ def create_bare_metal_server(self,
resource_group: 'ResourceGroupIdentity' = None,
trusted_platform_module: 'BareMetalServerTrustedPlatformModulePrototype' = None,
vpc: 'VPCIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a bare metal server.
@@ -8965,8 +9903,8 @@ def create_bare_metal_server(self,
:param BareMetalServerInitializationPrototype initialization:
:param BareMetalServerPrimaryNetworkInterfacePrototype
- primary_network_interface: Primary network interface for the bare metal
- server.
+ primary_network_interface: The primary network interface to create for the
+ bare metal server.
:param BareMetalServerProfileIdentity profile: The
[profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile)
to use for this bare metal server.
@@ -9017,9 +9955,11 @@ def create_bare_metal_server(self,
if vpc is not None:
vpc = convert_model(vpc)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -9049,22 +9989,24 @@ def create_bare_metal_server(self,
headers['Accept'] = 'application/json'
url = '/bare_metal_servers'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_bare_metal_server_console_access_token(self,
+ def create_bare_metal_server_console_access_token(
+ self,
bare_metal_server_id: str,
console_type: str,
*,
force: bool = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a console access token for a bare metal server.
@@ -9093,9 +10035,11 @@ def create_bare_metal_server_console_access_token(self,
if console_type is None:
raise ValueError('console_type must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_bare_metal_server_console_access_token')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_bare_metal_server_console_access_token',
+ )
headers.update(sdk_headers)
params = {
@@ -9120,19 +10064,21 @@ def create_bare_metal_server_console_access_token(self,
path_param_values = self.encode_path_vars(bare_metal_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/console_access_token'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_bare_metal_server_disks(self,
+ def list_bare_metal_server_disks(
+ self,
bare_metal_server_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all disks on a bare metal server.
@@ -9150,9 +10096,11 @@ def list_bare_metal_server_disks(self,
if not bare_metal_server_id:
raise ValueError('bare_metal_server_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_bare_metal_server_disks')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_bare_metal_server_disks',
+ )
headers.update(sdk_headers)
params = {
@@ -9169,19 +10117,21 @@ def list_bare_metal_server_disks(self,
path_param_values = self.encode_path_vars(bare_metal_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/disks'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server_disk(self,
+ def get_bare_metal_server_disk(
+ self,
bare_metal_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a bare metal server disk.
@@ -9200,9 +10150,11 @@ def get_bare_metal_server_disk(self,
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_bare_metal_server_disk')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server_disk',
+ )
headers.update(sdk_headers)
params = {
@@ -9219,20 +10171,22 @@ def get_bare_metal_server_disk(self,
path_param_values = self.encode_path_vars(bare_metal_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/disks/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_bare_metal_server_disk(self,
+ def update_bare_metal_server_disk(
+ self,
bare_metal_server_id: str,
id: str,
bare_metal_server_disk_patch: 'BareMetalServerDiskPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a bare metal server disk.
@@ -9258,9 +10212,11 @@ def update_bare_metal_server_disk(self,
if isinstance(bare_metal_server_disk_patch, BareMetalServerDiskPatch):
bare_metal_server_disk_patch = convert_model(bare_metal_server_disk_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_bare_metal_server_disk')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_bare_metal_server_disk',
+ )
headers.update(sdk_headers)
params = {
@@ -9280,22 +10236,24 @@ def update_bare_metal_server_disk(self,
path_param_values = self.encode_path_vars(bare_metal_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/disks/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_bare_metal_server_network_interfaces(self,
+ def list_bare_metal_server_network_interfaces(
+ self,
bare_metal_server_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all network interfaces on a bare metal server.
@@ -9318,9 +10276,11 @@ def list_bare_metal_server_network_interfaces(self,
if not bare_metal_server_id:
raise ValueError('bare_metal_server_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_bare_metal_server_network_interfaces')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_bare_metal_server_network_interfaces',
+ )
headers.update(sdk_headers)
params = {
@@ -9339,19 +10299,21 @@ def list_bare_metal_server_network_interfaces(self,
path_param_values = self.encode_path_vars(bare_metal_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_bare_metal_server_network_interface(self,
+ def create_bare_metal_server_network_interface(
+ self,
bare_metal_server_id: str,
bare_metal_server_network_interface_prototype: 'BareMetalServerNetworkInterfacePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a network interface on a bare metal server.
@@ -9379,9 +10341,11 @@ def create_bare_metal_server_network_interface(self,
if isinstance(bare_metal_server_network_interface_prototype, BareMetalServerNetworkInterfacePrototype):
bare_metal_server_network_interface_prototype = convert_model(bare_metal_server_network_interface_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_bare_metal_server_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_bare_metal_server_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -9401,20 +10365,22 @@ def create_bare_metal_server_network_interface(self,
path_param_values = self.encode_path_vars(bare_metal_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_bare_metal_server_network_interface(self,
+ def delete_bare_metal_server_network_interface(
+ self,
bare_metal_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a network interface.
@@ -9435,9 +10401,11 @@ def delete_bare_metal_server_network_interface(self,
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_bare_metal_server_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_bare_metal_server_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -9453,19 +10421,21 @@ def delete_bare_metal_server_network_interface(self,
path_param_values = self.encode_path_vars(bare_metal_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server_network_interface(self,
+ def get_bare_metal_server_network_interface(
+ self,
bare_metal_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a network interface.
@@ -9485,9 +10455,11 @@ def get_bare_metal_server_network_interface(self,
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_bare_metal_server_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -9504,20 +10476,22 @@ def get_bare_metal_server_network_interface(self,
path_param_values = self.encode_path_vars(bare_metal_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_bare_metal_server_network_interface(self,
+ def update_bare_metal_server_network_interface(
+ self,
bare_metal_server_id: str,
id: str,
bare_metal_server_network_interface_patch: 'BareMetalServerNetworkInterfacePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a network interface.
@@ -9545,9 +10519,11 @@ def update_bare_metal_server_network_interface(self,
if isinstance(bare_metal_server_network_interface_patch, BareMetalServerNetworkInterfacePatch):
bare_metal_server_network_interface_patch = convert_model(bare_metal_server_network_interface_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_bare_metal_server_network_interface')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_bare_metal_server_network_interface',
+ )
headers.update(sdk_headers)
params = {
@@ -9567,20 +10543,22 @@ def update_bare_metal_server_network_interface(self,
path_param_values = self.encode_path_vars(bare_metal_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_bare_metal_server_network_interface_floating_ips(self,
+ def list_bare_metal_server_network_interface_floating_ips(
+ self,
bare_metal_server_id: str,
network_interface_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all floating IPs associated with a network interface.
@@ -9599,9 +10577,11 @@ def list_bare_metal_server_network_interface_floating_ips(self,
if not network_interface_id:
raise ValueError('network_interface_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_bare_metal_server_network_interface_floating_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_bare_metal_server_network_interface_floating_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -9618,20 +10598,22 @@ def list_bare_metal_server_network_interface_floating_ips(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def remove_bare_metal_server_network_interface_floating_ip(self,
+ def remove_bare_metal_server_network_interface_floating_ip(
+ self,
bare_metal_server_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Disassociate a floating IP from a network interface.
@@ -9654,9 +10636,11 @@ def remove_bare_metal_server_network_interface_floating_ip(self,
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='remove_bare_metal_server_network_interface_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='remove_bare_metal_server_network_interface_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -9672,26 +10656,28 @@ def remove_bare_metal_server_network_interface_floating_ip(self,
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)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server_network_interface_floating_ip(self,
+ def get_bare_metal_server_network_interface_floating_ip(
+ self,
bare_metal_server_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve associated floating IP.
- This request retrieves a specified floating IP address if it is associated with
- the network interface and bare metal server specified in the URL.
+ This request retrieves a specified floating IP if it is associated with the
+ network interface and bare metal server specified in the URL.
:param str bare_metal_server_id: The bare metal server identifier.
:param str network_interface_id: The network interface identifier.
@@ -9708,9 +10694,11 @@ def get_bare_metal_server_network_interface_floating_ip(self,
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_bare_metal_server_network_interface_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server_network_interface_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -9727,20 +10715,22 @@ def get_bare_metal_server_network_interface_floating_ip(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def add_bare_metal_server_network_interface_floating_ip(self,
+ def add_bare_metal_server_network_interface_floating_ip(
+ self,
bare_metal_server_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Associate a floating IP with a network interface.
@@ -9767,9 +10757,11 @@ def add_bare_metal_server_network_interface_floating_ip(self,
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='add_bare_metal_server_network_interface_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='add_bare_metal_server_network_interface_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -9786,19 +10778,21 @@ def add_bare_metal_server_network_interface_floating_ip(self,
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)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_bare_metal_server_network_interface_ips(self,
+ def list_bare_metal_server_network_interface_ips(
+ self,
bare_metal_server_id: str,
network_interface_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all reserved IPs bound to a network interface.
@@ -9817,9 +10811,11 @@ def list_bare_metal_server_network_interface_ips(self,
if not network_interface_id:
raise ValueError('network_interface_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_bare_metal_server_network_interface_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_bare_metal_server_network_interface_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -9836,20 +10832,22 @@ def list_bare_metal_server_network_interface_ips(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server_network_interface_ip(self,
+ def get_bare_metal_server_network_interface_ip(
+ self,
bare_metal_server_id: str,
network_interface_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve bound reserved IP.
@@ -9872,9 +10870,11 @@ def get_bare_metal_server_network_interface_ip(self,
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_bare_metal_server_network_interface_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server_network_interface_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -9891,18 +10891,20 @@ def get_bare_metal_server_network_interface_ip(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_bare_metal_server(self,
+ def delete_bare_metal_server(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a bare metal server.
@@ -9920,9 +10922,11 @@ def delete_bare_metal_server(self,
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_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -9938,18 +10942,20 @@ def delete_bare_metal_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server(self,
+ def get_bare_metal_server(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a bare metal server.
@@ -9966,9 +10972,11 @@ def get_bare_metal_server(self,
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_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -9985,19 +10993,21 @@ def get_bare_metal_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_bare_metal_server(self,
+ def update_bare_metal_server(
+ self,
id: str,
bare_metal_server_patch: 'BareMetalServerPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a bare metal server.
@@ -10021,9 +11031,11 @@ def update_bare_metal_server(self,
if isinstance(bare_metal_server_patch, BareMetalServerPatch):
bare_metal_server_patch = convert_model(bare_metal_server_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -10043,19 +11055,21 @@ def update_bare_metal_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_bare_metal_server_initialization(self,
+ def get_bare_metal_server_initialization(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve initialization configuration for a bare metal server.
@@ -10074,9 +11088,11 @@ def get_bare_metal_server_initialization(self,
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_bare_metal_server_initialization')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_bare_metal_server_initialization',
+ )
headers.update(sdk_headers)
params = {
@@ -10093,18 +11109,20 @@ def get_bare_metal_server_initialization(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}/initialization'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def restart_bare_metal_server(self,
+ def restart_bare_metal_server(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Restart a bare metal server.
@@ -10121,9 +11139,11 @@ def restart_bare_metal_server(self,
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='restart_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='restart_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -10139,18 +11159,20 @@ def restart_bare_metal_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}/restart'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def start_bare_metal_server(self,
+ def start_bare_metal_server(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Start a bare metal server.
@@ -10167,9 +11189,11 @@ def start_bare_metal_server(self,
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='start_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='start_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -10185,19 +11209,21 @@ def start_bare_metal_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}/start'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def stop_bare_metal_server(self,
+ def stop_bare_metal_server(
+ self,
id: str,
type: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Stop a bare metal server.
@@ -10220,9 +11246,11 @@ def stop_bare_metal_server(self,
if type is None:
raise ValueError('type must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='stop_bare_metal_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='stop_bare_metal_server',
+ )
headers.update(sdk_headers)
params = {
@@ -10245,11 +11273,13 @@ def stop_bare_metal_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/bare_metal_servers/{id}/stop'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -10258,12 +11288,12 @@ def stop_bare_metal_server(self,
# Volumes
#########################
-
- def list_volume_profiles(self,
+ def list_volume_profiles(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all volume profiles.
@@ -10282,9 +11312,11 @@ def list_volume_profiles(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_volume_profiles')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_volume_profiles',
+ )
headers.update(sdk_headers)
params = {
@@ -10300,18 +11332,20 @@ def list_volume_profiles(self,
headers['Accept'] = 'application/json'
url = '/volume/profiles'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_volume_profile(self,
+ def get_volume_profile(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a volume profile.
@@ -10327,9 +11361,11 @@ def get_volume_profile(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_volume_profile')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_volume_profile',
+ )
headers.update(sdk_headers)
params = {
@@ -10346,16 +11382,18 @@ def get_volume_profile(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/volume/profiles/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_volumes(self,
+ def list_volumes(
+ self,
*,
start: str = None,
limit: int = None,
@@ -10365,7 +11403,7 @@ def list_volumes(self,
operating_system_family: str = None,
operating_system_architecture: str = None,
zone_name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all volumes.
@@ -10400,9 +11438,11 @@ def list_volumes(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_volumes')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_volumes',
+ )
headers.update(sdk_headers)
params = {
@@ -10424,18 +11464,20 @@ def list_volumes(self,
headers['Accept'] = 'application/json'
url = '/volumes'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_volume(self,
+ def create_volume(
+ self,
volume_prototype: 'VolumePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a volume.
@@ -10455,9 +11497,11 @@ def create_volume(self,
if isinstance(volume_prototype, VolumePrototype):
volume_prototype = convert_model(volume_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_volume')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_volume',
+ )
headers.update(sdk_headers)
params = {
@@ -10474,21 +11518,23 @@ def create_volume(self,
headers['Accept'] = 'application/json'
url = '/volumes'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_volume(self,
+ def delete_volume(
+ self,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a volume.
@@ -10509,9 +11555,11 @@ def delete_volume(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_volume')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_volume',
+ )
headers.update(sdk_headers)
params = {
@@ -10527,18 +11575,20 @@ def delete_volume(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/volumes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_volume(self,
+ def get_volume(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a volume.
@@ -10554,9 +11604,11 @@ def get_volume(self,
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_volume')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_volume',
+ )
headers.update(sdk_headers)
params = {
@@ -10573,21 +11625,23 @@ def get_volume(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/volumes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_volume(self,
+ def update_volume(
+ self,
id: str,
volume_patch: 'VolumePatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a volume.
@@ -10615,9 +11669,11 @@ def update_volume(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_volume')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_volume',
+ )
headers.update(sdk_headers)
params = {
@@ -10637,11 +11693,13 @@ def update_volume(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/volumes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -10650,10 +11708,10 @@ def update_volume(self,
# Snapshots
#########################
-
- def delete_snapshots(self,
+ def delete_snapshots(
+ self,
source_volume_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a filtered collection of snapshots.
@@ -10670,9 +11728,11 @@ def delete_snapshots(self,
if not source_volume_id:
raise ValueError('source_volume_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_snapshots')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_snapshots',
+ )
headers.update(sdk_headers)
params = {
@@ -10686,16 +11746,18 @@ def delete_snapshots(self,
del kwargs['headers']
url = '/snapshots'
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_snapshots(self,
+ def list_snapshots(
+ self,
*,
start: str = None,
limit: int = None,
@@ -10709,7 +11771,7 @@ def list_snapshots(self,
sort: str = None,
backup_policy_plan_id: str = None,
clones_zone_name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all snapshots.
@@ -10755,9 +11817,11 @@ def list_snapshots(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_snapshots')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_snapshots',
+ )
headers.update(sdk_headers)
params = {
@@ -10783,18 +11847,20 @@ def list_snapshots(self,
headers['Accept'] = 'application/json'
url = '/snapshots'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_snapshot(self,
+ def create_snapshot(
+ self,
snapshot_prototype: 'SnapshotPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a snapshot.
@@ -10814,9 +11880,11 @@ def create_snapshot(self,
if isinstance(snapshot_prototype, SnapshotPrototype):
snapshot_prototype = convert_model(snapshot_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_snapshot')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_snapshot',
+ )
headers.update(sdk_headers)
params = {
@@ -10833,21 +11901,23 @@ def create_snapshot(self,
headers['Accept'] = 'application/json'
url = '/snapshots'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_snapshot(self,
+ def delete_snapshot(
+ self,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a snapshot.
@@ -10867,9 +11937,11 @@ def delete_snapshot(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_snapshot')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_snapshot',
+ )
headers.update(sdk_headers)
params = {
@@ -10885,18 +11957,20 @@ def delete_snapshot(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_snapshot(self,
+ def get_snapshot(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a snapshot.
@@ -10912,9 +11986,11 @@ def get_snapshot(self,
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_snapshot')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_snapshot',
+ )
headers.update(sdk_headers)
params = {
@@ -10931,21 +12007,23 @@ def get_snapshot(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_snapshot(self,
+ def update_snapshot(
+ self,
id: str,
snapshot_patch: 'SnapshotPatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a snapshot.
@@ -10971,9 +12049,11 @@ def update_snapshot(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_snapshot')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_snapshot',
+ )
headers.update(sdk_headers)
params = {
@@ -10993,19 +12073,21 @@ def update_snapshot(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_snapshot_clones(self,
+ def list_snapshot_clones(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all clones for a snapshot.
@@ -11022,9 +12104,11 @@ def list_snapshot_clones(self,
if not id:
raise ValueError('id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_snapshot_clones')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_snapshot_clones',
+ )
headers.update(sdk_headers)
params = {
@@ -11041,19 +12125,21 @@ def list_snapshot_clones(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}/clones'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_snapshot_clone(self,
+ def delete_snapshot_clone(
+ self,
id: str,
zone_name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a snapshot clone.
@@ -11073,9 +12159,11 @@ def delete_snapshot_clone(self,
if not zone_name:
raise ValueError('zone_name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_snapshot_clone')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_snapshot_clone',
+ )
headers.update(sdk_headers)
params = {
@@ -11091,19 +12179,21 @@ def delete_snapshot_clone(self,
path_param_values = self.encode_path_vars(id, zone_name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}/clones/{zone_name}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_snapshot_clone(self,
+ def get_snapshot_clone(
+ self,
id: str,
zone_name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a snapshot clone.
@@ -11123,9 +12213,11 @@ def get_snapshot_clone(self,
if not zone_name:
raise ValueError('zone_name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_snapshot_clone')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_snapshot_clone',
+ )
headers.update(sdk_headers)
params = {
@@ -11142,19 +12234,21 @@ def get_snapshot_clone(self,
path_param_values = self.encode_path_vars(id, zone_name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}/clones/{zone_name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_snapshot_clone(self,
+ def create_snapshot_clone(
+ self,
id: str,
zone_name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a clone for a snapshot.
@@ -11175,9 +12269,11 @@ def create_snapshot_clone(self,
if not zone_name:
raise ValueError('zone_name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_snapshot_clone')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_snapshot_clone',
+ )
headers.update(sdk_headers)
params = {
@@ -11194,10 +12290,12 @@ def create_snapshot_clone(self,
path_param_values = self.encode_path_vars(id, zone_name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/snapshots/{id}/clones/{zone_name}'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
@@ -11206,9 +12304,9 @@ def create_snapshot_clone(self,
# Geography
#########################
-
- def list_regions(self,
- **kwargs
+ def list_regions(
+ self,
+ **kwargs,
) -> DetailedResponse:
"""
List all regions.
@@ -11226,9 +12324,11 @@ def list_regions(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_regions')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_regions',
+ )
headers.update(sdk_headers)
params = {
@@ -11242,18 +12342,20 @@ def list_regions(self,
headers['Accept'] = 'application/json'
url = '/regions'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_region(self,
+ def get_region(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a region.
@@ -11269,9 +12371,11 @@ def get_region(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_region')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_region',
+ )
headers.update(sdk_headers)
params = {
@@ -11288,18 +12392,20 @@ def get_region(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/regions/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_region_zones(self,
+ def list_region_zones(
+ self,
region_name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all zones in a region.
@@ -11317,9 +12423,11 @@ def list_region_zones(self,
if not region_name:
raise ValueError('region_name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_region_zones')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_region_zones',
+ )
headers.update(sdk_headers)
params = {
@@ -11336,19 +12444,21 @@ def list_region_zones(self,
path_param_values = self.encode_path_vars(region_name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/regions/{region_name}/zones'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_region_zone(self,
+ def get_region_zone(
+ self,
region_name: str,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a zone.
@@ -11368,9 +12478,11 @@ def get_region_zone(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_region_zone')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_region_zone',
+ )
headers.update(sdk_headers)
params = {
@@ -11387,10 +12499,12 @@ def get_region_zone(self,
path_param_values = self.encode_path_vars(region_name, name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/regions/{region_name}/zones/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
@@ -11399,13 +12513,13 @@ def get_region_zone(self,
# Public gateways
#########################
-
- def list_public_gateways(self,
+ def list_public_gateways(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all public gateways.
@@ -11426,9 +12540,11 @@ def list_public_gateways(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_public_gateways')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_public_gateways',
+ )
headers.update(sdk_headers)
params = {
@@ -11445,23 +12561,25 @@ def list_public_gateways(self,
headers['Accept'] = 'application/json'
url = '/public_gateways'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_public_gateway(self,
+ def create_public_gateway(
+ self,
vpc: 'VPCIdentity',
zone: 'ZoneIdentity',
*,
floating_ip: 'PublicGatewayFloatingIPPrototype' = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a public gateway.
@@ -11500,9 +12618,11 @@ def create_public_gateway(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -11527,19 +12647,21 @@ def create_public_gateway(self,
headers['Accept'] = 'application/json'
url = '/public_gateways'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_public_gateway(self,
+ def delete_public_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a public gateway.
@@ -11558,9 +12680,11 @@ def delete_public_gateway(self,
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_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -11576,18 +12700,20 @@ def delete_public_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/public_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_public_gateway(self,
+ def get_public_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a public gateway.
@@ -11604,9 +12730,11 @@ def get_public_gateway(self,
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_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -11623,19 +12751,21 @@ def get_public_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/public_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_public_gateway(self,
+ def update_public_gateway(
+ self,
id: str,
public_gateway_patch: 'PublicGatewayPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a public gateway.
@@ -11656,9 +12786,11 @@ def update_public_gateway(self,
if isinstance(public_gateway_patch, PublicGatewayPatch):
public_gateway_patch = convert_model(public_gateway_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_public_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_public_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -11678,11 +12810,13 @@ def update_public_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/public_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -11691,14 +12825,14 @@ def update_public_gateway(self,
# Floating IPs
#########################
-
- def list_floating_ips(self,
+ def list_floating_ips(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
sort: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all floating IPs.
@@ -11722,9 +12856,11 @@ def list_floating_ips(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_floating_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_floating_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -11742,18 +12878,20 @@ def list_floating_ips(self,
headers['Accept'] = 'application/json'
url = '/floating_ips'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_floating_ip(self,
+ def create_floating_ip(
+ self,
floating_ip_prototype: 'FloatingIPPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Reserve a floating IP.
@@ -11772,9 +12910,11 @@ def create_floating_ip(self,
if isinstance(floating_ip_prototype, FloatingIPPrototype):
floating_ip_prototype = convert_model(floating_ip_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -11791,19 +12931,21 @@ def create_floating_ip(self,
headers['Accept'] = 'application/json'
url = '/floating_ips'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_floating_ip(self,
+ def delete_floating_ip(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a floating IP.
@@ -11821,9 +12963,11 @@ def delete_floating_ip(self,
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_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -11839,18 +12983,20 @@ def delete_floating_ip(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/floating_ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_floating_ip(self,
+ def get_floating_ip(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a floating IP.
@@ -11867,9 +13013,11 @@ def get_floating_ip(self,
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_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -11886,19 +13034,21 @@ def get_floating_ip(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/floating_ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_floating_ip(self,
+ def update_floating_ip(
+ self,
id: str,
floating_ip_patch: 'FloatingIPPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a floating IP.
@@ -11919,9 +13069,11 @@ def update_floating_ip(self,
if isinstance(floating_ip_patch, FloatingIPPatch):
floating_ip_patch = convert_model(floating_ip_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_floating_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_floating_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -11941,11 +13093,13 @@ def update_floating_ip(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/floating_ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -11954,13 +13108,13 @@ def update_floating_ip(self,
# Network ACLs
#########################
-
- def list_network_acls(self,
+ def list_network_acls(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all network ACLs.
@@ -11981,9 +13135,11 @@ def list_network_acls(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_network_acls')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_network_acls',
+ )
headers.update(sdk_headers)
params = {
@@ -12000,19 +13156,20 @@ def list_network_acls(self,
headers['Accept'] = 'application/json'
url = '/network_acls'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_network_acl(self,
- *,
- network_acl_prototype: 'NetworkACLPrototype' = None,
- **kwargs
+ def create_network_acl(
+ self,
+ network_acl_prototype: 'NetworkACLPrototype',
+ **kwargs,
) -> DetailedResponse:
"""
Create a network ACL.
@@ -12021,19 +13178,23 @@ def create_network_acl(self,
object. The prototype object is structured in the same way as a retrieved network
ACL, and contains the information necessary to create the new network ACL.
- :param NetworkACLPrototype network_acl_prototype: (optional) The network
- ACL prototype object.
+ :param NetworkACLPrototype network_acl_prototype: The network ACL prototype
+ object.
: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 `NetworkACL` object
"""
- if network_acl_prototype is not None and isinstance(network_acl_prototype, NetworkACLPrototype):
+ if network_acl_prototype is None:
+ raise ValueError('network_acl_prototype must be provided')
+ if isinstance(network_acl_prototype, NetworkACLPrototype):
network_acl_prototype = convert_model(network_acl_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -12050,19 +13211,21 @@ def create_network_acl(self,
headers['Accept'] = 'application/json'
url = '/network_acls'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_network_acl(self,
+ def delete_network_acl(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a network ACL.
@@ -12080,9 +13243,11 @@ def delete_network_acl(self,
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_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -12098,18 +13263,20 @@ def delete_network_acl(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_network_acl(self,
+ def get_network_acl(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a network ACL.
@@ -12126,9 +13293,11 @@ def get_network_acl(self,
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_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -12145,19 +13314,21 @@ def get_network_acl(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_network_acl(self,
+ def update_network_acl(
+ self,
id: str,
network_acl_patch: 'NetworkACLPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a network ACL.
@@ -12178,9 +13349,11 @@ def update_network_acl(self,
if isinstance(network_acl_patch, NetworkACLPatch):
network_acl_patch = convert_model(network_acl_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_network_acl')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_network_acl',
+ )
headers.update(sdk_headers)
params = {
@@ -12200,23 +13373,25 @@ def update_network_acl(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_network_acl_rules(self,
+ def list_network_acl_rules(
+ self,
network_acl_id: str,
*,
start: str = None,
limit: int = None,
direction: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all rules for a network ACL.
@@ -12239,9 +13414,11 @@ def list_network_acl_rules(self,
if not network_acl_id:
raise ValueError('network_acl_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_network_acl_rules')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_network_acl_rules',
+ )
headers.update(sdk_headers)
params = {
@@ -12261,19 +13438,21 @@ def list_network_acl_rules(self,
path_param_values = self.encode_path_vars(network_acl_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{network_acl_id}/rules'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_network_acl_rule(self,
+ def create_network_acl_rule(
+ self,
network_acl_id: str,
network_acl_rule_prototype: 'NetworkACLRulePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a rule for a network ACL.
@@ -12297,9 +13476,11 @@ def create_network_acl_rule(self,
if isinstance(network_acl_rule_prototype, NetworkACLRulePrototype):
network_acl_rule_prototype = convert_model(network_acl_rule_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_network_acl_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_network_acl_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12319,20 +13500,22 @@ def create_network_acl_rule(self,
path_param_values = self.encode_path_vars(network_acl_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{network_acl_id}/rules'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_network_acl_rule(self,
+ def delete_network_acl_rule(
+ self,
network_acl_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a network ACL rule.
@@ -12351,9 +13534,11 @@ def delete_network_acl_rule(self,
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_network_acl_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_network_acl_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12369,19 +13554,21 @@ def delete_network_acl_rule(self,
path_param_values = self.encode_path_vars(network_acl_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{network_acl_id}/rules/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_network_acl_rule(self,
+ def get_network_acl_rule(
+ self,
network_acl_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a network ACL rule.
@@ -12400,9 +13587,11 @@ def get_network_acl_rule(self,
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_network_acl_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_network_acl_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12419,20 +13608,22 @@ def get_network_acl_rule(self,
path_param_values = self.encode_path_vars(network_acl_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{network_acl_id}/rules/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_network_acl_rule(self,
+ def update_network_acl_rule(
+ self,
network_acl_id: str,
id: str,
network_acl_rule_patch: 'NetworkACLRulePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a network ACL rule.
@@ -12459,9 +13650,11 @@ def update_network_acl_rule(self,
if isinstance(network_acl_rule_patch, NetworkACLRulePatch):
network_acl_rule_patch = convert_model(network_acl_rule_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_network_acl_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_network_acl_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12481,11 +13674,13 @@ def update_network_acl_rule(self,
path_param_values = self.encode_path_vars(network_acl_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/network_acls/{network_acl_id}/rules/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -12494,8 +13689,8 @@ def update_network_acl_rule(self,
# Security groups
#########################
-
- def list_security_groups(self,
+ def list_security_groups(
+ self,
*,
start: str = None,
limit: int = None,
@@ -12503,7 +13698,7 @@ def list_security_groups(self,
vpc_id: str = None,
vpc_crn: str = None,
vpc_name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all security groups.
@@ -12532,9 +13727,11 @@ def list_security_groups(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_security_groups')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_security_groups',
+ )
headers.update(sdk_headers)
params = {
@@ -12554,22 +13751,24 @@ def list_security_groups(self,
headers['Accept'] = 'application/json'
url = '/security_groups'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_security_group(self,
+ def create_security_group(
+ self,
vpc: 'VPCIdentity',
*,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
rules: List['SecurityGroupRulePrototype'] = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a security group.
@@ -12605,9 +13804,11 @@ def create_security_group(self,
if rules is not None:
rules = [convert_model(x) for x in rules]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_security_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_security_group',
+ )
headers.update(sdk_headers)
params = {
@@ -12631,19 +13832,21 @@ def create_security_group(self,
headers['Accept'] = 'application/json'
url = '/security_groups'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_security_group(self,
+ def delete_security_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a security group.
@@ -12661,9 +13864,11 @@ def delete_security_group(self,
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_security_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_security_group',
+ )
headers.update(sdk_headers)
params = {
@@ -12679,18 +13884,20 @@ def delete_security_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_security_group(self,
+ def get_security_group(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a security group.
@@ -12707,9 +13914,11 @@ def get_security_group(self,
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_security_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_security_group',
+ )
headers.update(sdk_headers)
params = {
@@ -12726,19 +13935,21 @@ def get_security_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_security_group(self,
+ def update_security_group(
+ self,
id: str,
security_group_patch: 'SecurityGroupPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a security group.
@@ -12761,9 +13972,11 @@ def update_security_group(self,
if isinstance(security_group_patch, SecurityGroupPatch):
security_group_patch = convert_model(security_group_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_security_group')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_security_group',
+ )
headers.update(sdk_headers)
params = {
@@ -12783,19 +13996,21 @@ def update_security_group(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_security_group_rules(self,
+ def list_security_group_rules(
+ self,
security_group_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all rules in a security group.
@@ -12813,9 +14028,11 @@ def list_security_group_rules(self,
if not security_group_id:
raise ValueError('security_group_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_security_group_rules')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_security_group_rules',
+ )
headers.update(sdk_headers)
params = {
@@ -12832,19 +14049,21 @@ def list_security_group_rules(self,
path_param_values = self.encode_path_vars(security_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/rules'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_security_group_rule(self,
+ def create_security_group_rule(
+ self,
security_group_id: str,
security_group_rule_prototype: 'SecurityGroupRulePrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a rule for a security group.
@@ -12874,9 +14093,11 @@ def create_security_group_rule(self,
if isinstance(security_group_rule_prototype, SecurityGroupRulePrototype):
security_group_rule_prototype = convert_model(security_group_rule_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_security_group_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_security_group_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12896,20 +14117,22 @@ def create_security_group_rule(self,
path_param_values = self.encode_path_vars(security_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/rules'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_security_group_rule(self,
+ def delete_security_group_rule(
+ self,
security_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a security group rule.
@@ -12930,9 +14153,11 @@ def delete_security_group_rule(self,
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_security_group_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_security_group_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12948,19 +14173,21 @@ def delete_security_group_rule(self,
path_param_values = self.encode_path_vars(security_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/rules/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_security_group_rule(self,
+ def get_security_group_rule(
+ self,
security_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a security group rule.
@@ -12980,9 +14207,11 @@ def get_security_group_rule(self,
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_security_group_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_security_group_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -12999,20 +14228,22 @@ def get_security_group_rule(self,
path_param_values = self.encode_path_vars(security_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/rules/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_security_group_rule(self,
+ def update_security_group_rule(
+ self,
security_group_id: str,
id: str,
security_group_rule_patch: 'SecurityGroupRulePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a security group rule.
@@ -13039,9 +14270,11 @@ def update_security_group_rule(self,
if isinstance(security_group_rule_patch, SecurityGroupRulePatch):
security_group_rule_patch = convert_model(security_group_rule_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_security_group_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_security_group_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -13061,22 +14294,24 @@ def update_security_group_rule(self,
path_param_values = self.encode_path_vars(security_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/rules/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_security_group_targets(self,
+ def list_security_group_targets(
+ self,
security_group_id: str,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all targets associated with a security group.
@@ -13096,9 +14331,11 @@ def list_security_group_targets(self,
if not security_group_id:
raise ValueError('security_group_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_security_group_targets')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_security_group_targets',
+ )
headers.update(sdk_headers)
params = {
@@ -13117,19 +14354,21 @@ def list_security_group_targets(self,
path_param_values = self.encode_path_vars(security_group_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/targets'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_security_group_target_binding(self,
+ def delete_security_group_target_binding(
+ self,
security_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Remove a target from a security group.
@@ -13137,11 +14376,11 @@ def delete_security_group_target_binding(self,
This request removes a target from a security group. For this request to succeed,
the target must be attached to at least one other security group. The specified
target identifier can be:
- - An instance network interface identifier
- A bare metal server network interface identifier
- A VPN server identifier
- An application load balancer identifier
- An endpoint gateway identifier
+ - An instance network interface identifier
Security groups are stateful, so any changes to a target's security groups are
applied to new connections. Existing connections are not affected.
@@ -13157,9 +14396,11 @@ def delete_security_group_target_binding(self,
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_security_group_target_binding')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_security_group_target_binding',
+ )
headers.update(sdk_headers)
params = {
@@ -13175,19 +14416,21 @@ def delete_security_group_target_binding(self,
path_param_values = self.encode_path_vars(security_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/targets/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_security_group_target(self,
+ def get_security_group_target(
+ self,
security_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a security group target.
@@ -13207,9 +14450,11 @@ def get_security_group_target(self,
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_security_group_target')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_security_group_target',
+ )
headers.update(sdk_headers)
params = {
@@ -13226,30 +14471,32 @@ def get_security_group_target(self,
path_param_values = self.encode_path_vars(security_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/targets/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_security_group_target_binding(self,
+ def create_security_group_target_binding(
+ self,
security_group_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Add a target to a security group.
This request adds a resource to an existing security group. The specified target
identifier can be:
- - An instance network interface identifier
- A bare metal server network interface identifier
- A VPN server identifier
- An application load balancer identifier
- An endpoint gateway identifier
+ - An instance network interface identifier
When a target is added to a security group, the security group rules are applied
to the target. A request body is not required, and if provided, is ignored.
@@ -13265,9 +14512,11 @@ def create_security_group_target_binding(self,
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='create_security_group_target_binding')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_security_group_target_binding',
+ )
headers.update(sdk_headers)
params = {
@@ -13284,10 +14533,12 @@ def create_security_group_target_binding(self,
path_param_values = self.encode_path_vars(security_group_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/security_groups/{security_group_id}/targets/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
@@ -13296,12 +14547,12 @@ def create_security_group_target_binding(self,
# VPN gateways
#########################
-
- def list_ike_policies(self,
+ def list_ike_policies(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all IKE policies.
@@ -13317,9 +14568,11 @@ def list_ike_policies(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_ike_policies')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_ike_policies',
+ )
headers.update(sdk_headers)
params = {
@@ -13335,16 +14588,18 @@ def list_ike_policies(self,
headers['Accept'] = 'application/json'
url = '/ike_policies'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_ike_policy(self,
+ def create_ike_policy(
+ self,
authentication_algorithm: str,
dh_group: int,
encryption_algorithm: str,
@@ -13353,7 +14608,7 @@ def create_ike_policy(self,
key_lifetime: int = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an IKE policy.
@@ -13391,9 +14646,11 @@ def create_ike_policy(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_ike_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_ike_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13420,19 +14677,21 @@ def create_ike_policy(self,
headers['Accept'] = 'application/json'
url = '/ike_policies'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_ike_policy(self,
+ def delete_ike_policy(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an IKE policy.
@@ -13450,9 +14709,11 @@ def delete_ike_policy(self,
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_ike_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_ike_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13468,18 +14729,20 @@ def delete_ike_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ike_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_ike_policy(self,
+ def get_ike_policy(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an IKE policy.
@@ -13495,9 +14758,11 @@ def get_ike_policy(self,
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_ike_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_ike_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13514,19 +14779,21 @@ def get_ike_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ike_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_ike_policy(self,
+ def update_ike_policy(
+ self,
id: str,
ike_policy_patch: 'IKEPolicyPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an IKE policy.
@@ -13547,9 +14814,11 @@ def update_ike_policy(self,
if isinstance(ike_policy_patch, IKEPolicyPatch):
ike_policy_patch = convert_model(ike_policy_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_ike_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_ike_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13569,19 +14838,21 @@ def update_ike_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ike_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_ike_policy_connections(self,
+ def list_ike_policy_connections(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPN gateway connections that use a specified IKE policy.
@@ -13597,9 +14868,11 @@ def list_ike_policy_connections(self,
if not id:
raise ValueError('id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_ike_policy_connections')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_ike_policy_connections',
+ )
headers.update(sdk_headers)
params = {
@@ -13616,20 +14889,22 @@ def list_ike_policy_connections(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ike_policies/{id}/connections'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_ipsec_policies(self,
+ def list_ipsec_policies(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all IPsec policies.
@@ -13645,9 +14920,11 @@ def list_ipsec_policies(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_ipsec_policies')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_ipsec_policies',
+ )
headers.update(sdk_headers)
params = {
@@ -13663,16 +14940,18 @@ def list_ipsec_policies(self,
headers['Accept'] = 'application/json'
url = '/ipsec_policies'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_ipsec_policy(self,
+ def create_ipsec_policy(
+ self,
authentication_algorithm: str,
encryption_algorithm: str,
pfs: str,
@@ -13680,7 +14959,7 @@ def create_ipsec_policy(self,
key_lifetime: int = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an IPsec policy.
@@ -13720,9 +14999,11 @@ def create_ipsec_policy(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_ipsec_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_ipsec_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13748,19 +15029,21 @@ def create_ipsec_policy(self,
headers['Accept'] = 'application/json'
url = '/ipsec_policies'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_ipsec_policy(self,
+ def delete_ipsec_policy(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an IPsec policy.
@@ -13778,9 +15061,11 @@ def delete_ipsec_policy(self,
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_ipsec_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_ipsec_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13796,18 +15081,20 @@ def delete_ipsec_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ipsec_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_ipsec_policy(self,
+ def get_ipsec_policy(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an IPsec policy.
@@ -13824,9 +15111,11 @@ def get_ipsec_policy(self,
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_ipsec_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_ipsec_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13843,19 +15132,21 @@ def get_ipsec_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ipsec_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_ipsec_policy(self,
+ def update_ipsec_policy(
+ self,
id: str,
i_psec_policy_patch: 'IPsecPolicyPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an IPsec policy.
@@ -13876,9 +15167,11 @@ def update_ipsec_policy(self,
if isinstance(i_psec_policy_patch, IPsecPolicyPatch):
i_psec_policy_patch = convert_model(i_psec_policy_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_ipsec_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_ipsec_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -13898,19 +15191,21 @@ def update_ipsec_policy(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ipsec_policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_ipsec_policy_connections(self,
+ def list_ipsec_policy_connections(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPN gateway connections that use a specified IPsec policy.
@@ -13926,9 +15221,11 @@ def list_ipsec_policy_connections(self,
if not id:
raise ValueError('id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_ipsec_policy_connections')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_ipsec_policy_connections',
+ )
headers.update(sdk_headers)
params = {
@@ -13945,23 +15242,25 @@ def list_ipsec_policy_connections(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/ipsec_policies/{id}/connections'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpn_gateways(self,
+ def list_vpn_gateways(
+ self,
*,
start: str = None,
limit: int = None,
resource_group_id: str = None,
sort: str = None,
mode: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPN gateways.
@@ -13986,9 +15285,11 @@ def list_vpn_gateways(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_gateways')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_gateways',
+ )
headers.update(sdk_headers)
params = {
@@ -14007,18 +15308,20 @@ def list_vpn_gateways(self,
headers['Accept'] = 'application/json'
url = '/vpn_gateways'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpn_gateway(self,
+ def create_vpn_gateway(
+ self,
vpn_gateway_prototype: 'VPNGatewayPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a VPN gateway.
@@ -14037,9 +15340,11 @@ def create_vpn_gateway(self,
if isinstance(vpn_gateway_prototype, VPNGatewayPrototype):
vpn_gateway_prototype = convert_model(vpn_gateway_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpn_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpn_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -14056,19 +15361,21 @@ def create_vpn_gateway(self,
headers['Accept'] = 'application/json'
url = '/vpn_gateways'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpn_gateway(self,
+ def delete_vpn_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPN gateway.
@@ -14087,9 +15394,11 @@ def delete_vpn_gateway(self,
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_vpn_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpn_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -14105,18 +15414,20 @@ def delete_vpn_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpn_gateway(self,
+ def get_vpn_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPN gateway.
@@ -14133,9 +15444,11 @@ def get_vpn_gateway(self,
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_vpn_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpn_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -14152,19 +15465,21 @@ def get_vpn_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpn_gateway(self,
+ def update_vpn_gateway(
+ self,
id: str,
vpn_gateway_patch: 'VPNGatewayPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPN gateway.
@@ -14185,9 +15500,11 @@ def update_vpn_gateway(self,
if isinstance(vpn_gateway_patch, VPNGatewayPatch):
vpn_gateway_patch = convert_model(vpn_gateway_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpn_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpn_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -14207,21 +15524,23 @@ def update_vpn_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpn_gateway_connections(self,
+ def list_vpn_gateway_connections(
+ self,
vpn_gateway_id: str,
*,
status: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all connections of a VPN gateway.
@@ -14239,9 +15558,11 @@ def list_vpn_gateway_connections(self,
if not vpn_gateway_id:
raise ValueError('vpn_gateway_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_gateway_connections')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_gateway_connections',
+ )
headers.update(sdk_headers)
params = {
@@ -14259,19 +15580,21 @@ def list_vpn_gateway_connections(self,
path_param_values = self.encode_path_vars(vpn_gateway_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpn_gateway_connection(self,
+ def create_vpn_gateway_connection(
+ self,
vpn_gateway_id: str,
vpn_gateway_connection_prototype: 'VPNGatewayConnectionPrototype',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a connection for a VPN gateway.
@@ -14293,9 +15616,11 @@ def create_vpn_gateway_connection(self,
if isinstance(vpn_gateway_connection_prototype, VPNGatewayConnectionPrototype):
vpn_gateway_connection_prototype = convert_model(vpn_gateway_connection_prototype)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpn_gateway_connection')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpn_gateway_connection',
+ )
headers.update(sdk_headers)
params = {
@@ -14315,20 +15640,22 @@ def create_vpn_gateway_connection(self,
path_param_values = self.encode_path_vars(vpn_gateway_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpn_gateway_connection(self,
+ def delete_vpn_gateway_connection(
+ self,
vpn_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPN gateway connection.
@@ -14349,9 +15676,11 @@ def delete_vpn_gateway_connection(self,
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_vpn_gateway_connection')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpn_gateway_connection',
+ )
headers.update(sdk_headers)
params = {
@@ -14367,19 +15696,21 @@ def delete_vpn_gateway_connection(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpn_gateway_connection(self,
+ def get_vpn_gateway_connection(
+ self,
vpn_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPN gateway connection.
@@ -14399,9 +15730,11 @@ def get_vpn_gateway_connection(self,
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_vpn_gateway_connection')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpn_gateway_connection',
+ )
headers.update(sdk_headers)
params = {
@@ -14418,20 +15751,22 @@ def get_vpn_gateway_connection(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpn_gateway_connection(self,
+ def update_vpn_gateway_connection(
+ self,
vpn_gateway_id: str,
id: str,
vpn_gateway_connection_patch: 'VPNGatewayConnectionPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPN gateway connection.
@@ -14456,9 +15791,11 @@ def update_vpn_gateway_connection(self,
if isinstance(vpn_gateway_connection_patch, VPNGatewayConnectionPatch):
vpn_gateway_connection_patch = convert_model(vpn_gateway_connection_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpn_gateway_connection')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpn_gateway_connection',
+ )
headers.update(sdk_headers)
params = {
@@ -14478,20 +15815,22 @@ def update_vpn_gateway_connection(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpn_gateway_connection_local_cidrs(self,
+ def list_vpn_gateway_connection_local_cidrs(
+ self,
vpn_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all local CIDRs for a VPN gateway connection.
@@ -14511,9 +15850,11 @@ def list_vpn_gateway_connection_local_cidrs(self,
if not id:
raise ValueError('id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_gateway_connection_local_cidrs')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_gateway_connection_local_cidrs',
+ )
headers.update(sdk_headers)
params = {
@@ -14530,21 +15871,23 @@ def list_vpn_gateway_connection_local_cidrs(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def remove_vpn_gateway_connection_local_cidr(self,
+ def remove_vpn_gateway_connection_local_cidr(
+ self,
vpn_gateway_id: str,
id: str,
cidr_prefix: str,
prefix_length: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Remove a local CIDR from a VPN gateway connection.
@@ -14570,9 +15913,11 @@ def remove_vpn_gateway_connection_local_cidr(self,
if not prefix_length:
raise ValueError('prefix_length must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='remove_vpn_gateway_connection_local_cidr')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='remove_vpn_gateway_connection_local_cidr',
+ )
headers.update(sdk_headers)
params = {
@@ -14588,21 +15933,23 @@ def remove_vpn_gateway_connection_local_cidr(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr_prefix, prefix_length)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def check_vpn_gateway_connection_local_cidr(self,
+ def check_vpn_gateway_connection_local_cidr(
+ self,
vpn_gateway_id: str,
id: str,
cidr_prefix: str,
prefix_length: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Check if the specified local CIDR exists on a VPN gateway connection.
@@ -14629,9 +15976,11 @@ def check_vpn_gateway_connection_local_cidr(self,
if not prefix_length:
raise ValueError('prefix_length must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='check_vpn_gateway_connection_local_cidr')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='check_vpn_gateway_connection_local_cidr',
+ )
headers.update(sdk_headers)
params = {
@@ -14647,21 +15996,23 @@ def check_vpn_gateway_connection_local_cidr(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr_prefix, prefix_length)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def add_vpn_gateway_connection_local_cidr(self,
+ def add_vpn_gateway_connection_local_cidr(
+ self,
vpn_gateway_id: str,
id: str,
cidr_prefix: str,
prefix_length: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Set a local CIDR on a VPN gateway connection.
@@ -14689,9 +16040,11 @@ def add_vpn_gateway_connection_local_cidr(self,
if not prefix_length:
raise ValueError('prefix_length must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='add_vpn_gateway_connection_local_cidr')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='add_vpn_gateway_connection_local_cidr',
+ )
headers.update(sdk_headers)
params = {
@@ -14707,19 +16060,21 @@ def add_vpn_gateway_connection_local_cidr(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr_prefix, prefix_length)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpn_gateway_connection_peer_cidrs(self,
+ def list_vpn_gateway_connection_peer_cidrs(
+ self,
vpn_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all peer CIDRs for a VPN gateway connection.
@@ -14739,9 +16094,11 @@ def list_vpn_gateway_connection_peer_cidrs(self,
if not id:
raise ValueError('id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_gateway_connection_peer_cidrs')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_gateway_connection_peer_cidrs',
+ )
headers.update(sdk_headers)
params = {
@@ -14758,21 +16115,23 @@ def list_vpn_gateway_connection_peer_cidrs(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def remove_vpn_gateway_connection_peer_cidr(self,
+ def remove_vpn_gateway_connection_peer_cidr(
+ self,
vpn_gateway_id: str,
id: str,
cidr_prefix: str,
prefix_length: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Remove a peer CIDR from a VPN gateway connection.
@@ -14798,9 +16157,11 @@ def remove_vpn_gateway_connection_peer_cidr(self,
if not prefix_length:
raise ValueError('prefix_length must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='remove_vpn_gateway_connection_peer_cidr')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='remove_vpn_gateway_connection_peer_cidr',
+ )
headers.update(sdk_headers)
params = {
@@ -14816,21 +16177,23 @@ def remove_vpn_gateway_connection_peer_cidr(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr_prefix, prefix_length)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def check_vpn_gateway_connection_peer_cidr(self,
+ def check_vpn_gateway_connection_peer_cidr(
+ self,
vpn_gateway_id: str,
id: str,
cidr_prefix: str,
prefix_length: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Check if the specified peer CIDR exists on a VPN gateway connection.
@@ -14857,9 +16220,11 @@ def check_vpn_gateway_connection_peer_cidr(self,
if not prefix_length:
raise ValueError('prefix_length must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='check_vpn_gateway_connection_peer_cidr')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='check_vpn_gateway_connection_peer_cidr',
+ )
headers.update(sdk_headers)
params = {
@@ -14875,21 +16240,23 @@ def check_vpn_gateway_connection_peer_cidr(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr_prefix, prefix_length)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def add_vpn_gateway_connection_peer_cidr(self,
+ def add_vpn_gateway_connection_peer_cidr(
+ self,
vpn_gateway_id: str,
id: str,
cidr_prefix: str,
prefix_length: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Set a peer CIDR on a VPN gateway connection.
@@ -14917,9 +16284,11 @@ def add_vpn_gateway_connection_peer_cidr(self,
if not prefix_length:
raise ValueError('prefix_length must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='add_vpn_gateway_connection_peer_cidr')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='add_vpn_gateway_connection_peer_cidr',
+ )
headers.update(sdk_headers)
params = {
@@ -14935,10 +16304,12 @@ def add_vpn_gateway_connection_peer_cidr(self,
path_param_values = self.encode_path_vars(vpn_gateway_id, id, cidr_prefix, prefix_length)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
@@ -14947,15 +16318,15 @@ def add_vpn_gateway_connection_peer_cidr(self,
# VPN servers
#########################
-
- def list_vpn_servers(self,
+ def list_vpn_servers(
+ self,
*,
name: str = None,
start: str = None,
limit: int = None,
resource_group_id: str = None,
sort: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPN servers.
@@ -14980,9 +16351,11 @@ def list_vpn_servers(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_servers')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_servers',
+ )
headers.update(sdk_headers)
params = {
@@ -15001,16 +16374,18 @@ def list_vpn_servers(self,
headers['Accept'] = 'application/json'
url = '/vpn_servers'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpn_server(self,
+ def create_vpn_server(
+ self,
certificate: 'CertificateInstanceIdentity',
client_authentication: List['VPNServerAuthenticationPrototype'],
client_ip_pool: str,
@@ -15024,7 +16399,7 @@ def create_vpn_server(self,
protocol: str = None,
resource_group: 'ResourceGroupIdentity' = None,
security_groups: List['SecurityGroupIdentity'] = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a VPN server.
@@ -15093,9 +16468,11 @@ def create_vpn_server(self,
if security_groups is not None:
security_groups = [convert_model(x) for x in security_groups]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpn_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpn_server',
+ )
headers.update(sdk_headers)
params = {
@@ -15127,21 +16504,23 @@ def create_vpn_server(self,
headers['Accept'] = 'application/json'
url = '/vpn_servers'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpn_server(self,
+ def delete_vpn_server(
+ self,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPN server.
@@ -15161,9 +16540,11 @@ def delete_vpn_server(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_vpn_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpn_server',
+ )
headers.update(sdk_headers)
params = {
@@ -15179,18 +16560,20 @@ def delete_vpn_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpn_server(self,
+ def get_vpn_server(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPN server.
@@ -15206,9 +16589,11 @@ def get_vpn_server(self,
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_vpn_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpn_server',
+ )
headers.update(sdk_headers)
params = {
@@ -15225,21 +16610,23 @@ def get_vpn_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpn_server(self,
+ def update_vpn_server(
+ self,
id: str,
vpn_server_patch: 'VPNServerPatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPN server.
@@ -15267,9 +16654,11 @@ def update_vpn_server(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpn_server')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpn_server',
+ )
headers.update(sdk_headers)
params = {
@@ -15289,19 +16678,21 @@ def update_vpn_server(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpn_server_client_configuration(self,
+ def get_vpn_server_client_configuration(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve client configuration.
@@ -15319,9 +16710,11 @@ def get_vpn_server_client_configuration(self,
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_vpn_server_client_configuration')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpn_server_client_configuration',
+ )
headers.update(sdk_headers)
params = {
@@ -15338,22 +16731,24 @@ def get_vpn_server_client_configuration(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{id}/client_configuration'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpn_server_clients(self,
+ def list_vpn_server_clients(
+ self,
vpn_server_id: str,
*,
start: str = None,
limit: int = None,
sort: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPN clients for a VPN server.
@@ -15377,9 +16772,11 @@ def list_vpn_server_clients(self,
if not vpn_server_id:
raise ValueError('vpn_server_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_server_clients')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_server_clients',
+ )
headers.update(sdk_headers)
params = {
@@ -15399,19 +16796,21 @@ def list_vpn_server_clients(self,
path_param_values = self.encode_path_vars(vpn_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/clients'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpn_server_client(self,
+ def delete_vpn_server_client(
+ self,
vpn_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPN client.
@@ -15432,9 +16831,11 @@ def delete_vpn_server_client(self,
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_vpn_server_client')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpn_server_client',
+ )
headers.update(sdk_headers)
params = {
@@ -15450,19 +16851,21 @@ def delete_vpn_server_client(self,
path_param_values = self.encode_path_vars(vpn_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/clients/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpn_server_client(self,
+ def get_vpn_server_client(
+ self,
vpn_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPN client.
@@ -15481,9 +16884,11 @@ def get_vpn_server_client(self,
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_vpn_server_client')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpn_server_client',
+ )
headers.update(sdk_headers)
params = {
@@ -15500,19 +16905,21 @@ def get_vpn_server_client(self,
path_param_values = self.encode_path_vars(vpn_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/clients/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def disconnect_vpn_client(self,
+ def disconnect_vpn_client(
+ self,
vpn_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Disconnect a VPN client.
@@ -15534,9 +16941,11 @@ def disconnect_vpn_client(self,
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='disconnect_vpn_client')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='disconnect_vpn_client',
+ )
headers.update(sdk_headers)
params = {
@@ -15552,22 +16961,24 @@ def disconnect_vpn_client(self,
path_param_values = self.encode_path_vars(vpn_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/clients/{id}/disconnect'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_vpn_server_routes(self,
+ def list_vpn_server_routes(
+ self,
vpn_server_id: str,
*,
start: str = None,
limit: int = None,
sort: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all VPN routes for a VPN server.
@@ -15594,9 +17005,11 @@ def list_vpn_server_routes(self,
if not vpn_server_id:
raise ValueError('vpn_server_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_vpn_server_routes')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_vpn_server_routes',
+ )
headers.update(sdk_headers)
params = {
@@ -15616,22 +17029,24 @@ def list_vpn_server_routes(self,
path_param_values = self.encode_path_vars(vpn_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/routes'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_vpn_server_route(self,
+ def create_vpn_server_route(
+ self,
vpn_server_id: str,
destination: str,
*,
action: str = None,
name: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a VPN route for a VPN server.
@@ -15669,9 +17084,11 @@ def create_vpn_server_route(self,
if destination is None:
raise ValueError('destination must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_vpn_server_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_vpn_server_route',
+ )
headers.update(sdk_headers)
params = {
@@ -15697,20 +17114,22 @@ def create_vpn_server_route(self,
path_param_values = self.encode_path_vars(vpn_server_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/routes'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_vpn_server_route(self,
+ def delete_vpn_server_route(
+ self,
vpn_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a VPN route.
@@ -15729,9 +17148,11 @@ def delete_vpn_server_route(self,
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_vpn_server_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_vpn_server_route',
+ )
headers.update(sdk_headers)
params = {
@@ -15747,19 +17168,21 @@ def delete_vpn_server_route(self,
path_param_values = self.encode_path_vars(vpn_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_vpn_server_route(self,
+ def get_vpn_server_route(
+ self,
vpn_server_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a VPN route.
@@ -15778,9 +17201,11 @@ def get_vpn_server_route(self,
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_vpn_server_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_vpn_server_route',
+ )
headers.update(sdk_headers)
params = {
@@ -15797,20 +17222,22 @@ def get_vpn_server_route(self,
path_param_values = self.encode_path_vars(vpn_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_vpn_server_route(self,
+ def update_vpn_server_route(
+ self,
vpn_server_id: str,
id: str,
vpn_server_route_patch: 'VPNServerRoutePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a VPN route.
@@ -15836,9 +17263,11 @@ def update_vpn_server_route(self,
if isinstance(vpn_server_route_patch, VPNServerRoutePatch):
vpn_server_route_patch = convert_model(vpn_server_route_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_vpn_server_route')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_vpn_server_route',
+ )
headers.update(sdk_headers)
params = {
@@ -15858,11 +17287,13 @@ def update_vpn_server_route(self,
path_param_values = self.encode_path_vars(vpn_server_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/vpn_servers/{vpn_server_id}/routes/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -15871,12 +17302,12 @@ def update_vpn_server_route(self,
# Load balancers
#########################
-
- def list_load_balancer_profiles(self,
+ def list_load_balancer_profiles(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all load balancer profiles.
@@ -15894,9 +17325,11 @@ def list_load_balancer_profiles(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancer_profiles')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancer_profiles',
+ )
headers.update(sdk_headers)
params = {
@@ -15912,18 +17345,20 @@ def list_load_balancer_profiles(self,
headers['Accept'] = 'application/json'
url = '/load_balancer/profiles'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_profile(self,
+ def get_load_balancer_profile(
+ self,
name: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer profile.
@@ -15939,9 +17374,11 @@ def get_load_balancer_profile(self,
if not name:
raise ValueError('name must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='get_load_balancer_profile')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_profile',
+ )
headers.update(sdk_headers)
params = {
@@ -15958,20 +17395,22 @@ def get_load_balancer_profile(self,
path_param_values = self.encode_path_vars(name)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancer/profiles/{name}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_load_balancers(self,
+ def list_load_balancers(
+ self,
*,
start: str = None,
limit: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all load balancers.
@@ -15987,9 +17426,11 @@ def list_load_balancers(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancers')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancers',
+ )
headers.update(sdk_headers)
params = {
@@ -16005,16 +17446,18 @@ def list_load_balancers(self,
headers['Accept'] = 'application/json'
url = '/load_balancers'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_load_balancer(self,
+ def create_load_balancer(
+ self,
is_public: bool,
subnets: List['SubnetIdentity'],
*,
@@ -16028,7 +17471,7 @@ def create_load_balancer(self,
resource_group: 'ResourceGroupIdentity' = None,
route_mode: bool = None,
security_groups: List['SecurityGroupIdentity'] = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a load balancer.
@@ -16045,7 +17488,13 @@ def create_load_balancer(self,
specified.
:param LoadBalancerLoggingDatapathPrototype datapath: (optional) The
datapath logging configuration for this load balancer.
- :param LoadBalancerDNSPrototype dns: (optional)
+ :param LoadBalancerDNSPrototype dns: (optional) The DNS configuration for
+ this load balancer.
+ If unspecified, DNS `A` records for this load balancer's `hostname`
+ property will be added
+ to the public DNS zone `lb.appdomain.cloud`. Otherwise, those DNS `A`
+ records will be
+ added to the specified `zone`.
:param List[LoadBalancerListenerPrototypeLoadBalancerContext] listeners:
(optional) The listeners of this load balancer.
:param LoadBalancerLoggingPrototype logging: (optional) The logging
@@ -16102,9 +17551,11 @@ def create_load_balancer(self,
if security_groups is not None:
security_groups = [convert_model(x) for x in security_groups]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_load_balancer')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_load_balancer',
+ )
headers.update(sdk_headers)
params = {
@@ -16136,21 +17587,23 @@ def create_load_balancer(self,
headers['Accept'] = 'application/json'
url = '/load_balancers'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_load_balancer(self,
+ def delete_load_balancer(
+ self,
id: str,
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a load balancer.
@@ -16171,9 +17624,11 @@ def delete_load_balancer(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='delete_load_balancer')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_load_balancer',
+ )
headers.update(sdk_headers)
params = {
@@ -16189,18 +17644,20 @@ def delete_load_balancer(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer(self,
+ def get_load_balancer(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer.
@@ -16217,9 +17674,11 @@ def get_load_balancer(self,
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_load_balancer')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer',
+ )
headers.update(sdk_headers)
params = {
@@ -16236,21 +17695,23 @@ def get_load_balancer(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_load_balancer(self,
+ def update_load_balancer(
+ self,
id: str,
load_balancer_patch: 'LoadBalancerPatch',
*,
if_match: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a load balancer.
@@ -16279,9 +17740,11 @@ def update_load_balancer(self,
headers = {
'If-Match': if_match,
}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_load_balancer')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_load_balancer',
+ )
headers.update(sdk_headers)
params = {
@@ -16301,19 +17764,21 @@ def update_load_balancer(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_statistics(self,
+ def get_load_balancer_statistics(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all statistics of a load balancer.
@@ -16329,9 +17794,11 @@ def get_load_balancer_statistics(self,
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_load_balancer_statistics')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_statistics',
+ )
headers.update(sdk_headers)
params = {
@@ -16348,18 +17815,20 @@ def get_load_balancer_statistics(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{id}/statistics'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_load_balancer_listeners(self,
+ def list_load_balancer_listeners(
+ self,
load_balancer_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all listeners for a load balancer.
@@ -16375,9 +17844,11 @@ def list_load_balancer_listeners(self,
if not load_balancer_id:
raise ValueError('load_balancer_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancer_listeners')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancer_listeners',
+ )
headers.update(sdk_headers)
params = {
@@ -16394,16 +17865,18 @@ def list_load_balancer_listeners(self,
path_param_values = self.encode_path_vars(load_balancer_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_load_balancer_listener(self,
+ def create_load_balancer_listener(
+ self,
load_balancer_id: str,
protocol: str,
*,
@@ -16417,7 +17890,7 @@ def create_load_balancer_listener(self,
port: int = None,
port_max: int = None,
port_min: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a listener for a load balancer.
@@ -16514,9 +17987,11 @@ def create_load_balancer_listener(self,
if policies is not None:
policies = [convert_model(x) for x in policies]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_load_balancer_listener')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_load_balancer_listener',
+ )
headers.update(sdk_headers)
params = {
@@ -16550,20 +18025,22 @@ def create_load_balancer_listener(self,
path_param_values = self.encode_path_vars(load_balancer_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_load_balancer_listener(self,
+ def delete_load_balancer_listener(
+ self,
load_balancer_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a load balancer listener.
@@ -16584,9 +18061,11 @@ def delete_load_balancer_listener(self,
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_load_balancer_listener')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_load_balancer_listener',
+ )
headers.update(sdk_headers)
params = {
@@ -16602,19 +18081,21 @@ def delete_load_balancer_listener(self,
path_param_values = self.encode_path_vars(load_balancer_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_listener(self,
+ def get_load_balancer_listener(
+ self,
load_balancer_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer listener.
@@ -16634,9 +18115,11 @@ def get_load_balancer_listener(self,
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_load_balancer_listener')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_listener',
+ )
headers.update(sdk_headers)
params = {
@@ -16653,20 +18136,22 @@ def get_load_balancer_listener(self,
path_param_values = self.encode_path_vars(load_balancer_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_load_balancer_listener(self,
+ def update_load_balancer_listener(
+ self,
load_balancer_id: str,
id: str,
load_balancer_listener_patch: 'LoadBalancerListenerPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a load balancer listener.
@@ -16691,9 +18176,11 @@ def update_load_balancer_listener(self,
if isinstance(load_balancer_listener_patch, LoadBalancerListenerPatch):
load_balancer_listener_patch = convert_model(load_balancer_listener_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_load_balancer_listener')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_load_balancer_listener',
+ )
headers.update(sdk_headers)
params = {
@@ -16713,20 +18200,22 @@ def update_load_balancer_listener(self,
path_param_values = self.encode_path_vars(load_balancer_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_load_balancer_listener_policies(self,
+ def list_load_balancer_listener_policies(
+ self,
load_balancer_id: str,
listener_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all policies for a load balancer listener.
@@ -16745,9 +18234,11 @@ def list_load_balancer_listener_policies(self,
if not listener_id:
raise ValueError('listener_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancer_listener_policies')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancer_listener_policies',
+ )
headers.update(sdk_headers)
params = {
@@ -16764,16 +18255,18 @@ def list_load_balancer_listener_policies(self,
path_param_values = self.encode_path_vars(load_balancer_id, listener_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_load_balancer_listener_policy(self,
+ def create_load_balancer_listener_policy(
+ self,
load_balancer_id: str,
listener_id: str,
action: str,
@@ -16782,7 +18275,7 @@ def create_load_balancer_listener_policy(self,
name: str = None,
rules: List['LoadBalancerListenerPolicyRulePrototype'] = None,
target: 'LoadBalancerListenerPolicyTargetPrototype' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a policy for a load balancer listener.
@@ -16827,9 +18320,11 @@ def create_load_balancer_listener_policy(self,
if target is not None:
target = convert_model(target)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_load_balancer_listener_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_load_balancer_listener_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -16857,21 +18352,23 @@ def create_load_balancer_listener_policy(self,
path_param_values = self.encode_path_vars(load_balancer_id, listener_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_load_balancer_listener_policy(self,
+ def delete_load_balancer_listener_policy(
+ self,
load_balancer_id: str,
listener_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a load balancer listener policy.
@@ -16893,9 +18390,11 @@ def delete_load_balancer_listener_policy(self,
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_load_balancer_listener_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_load_balancer_listener_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -16911,20 +18410,22 @@ def delete_load_balancer_listener_policy(self,
path_param_values = self.encode_path_vars(load_balancer_id, listener_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_listener_policy(self,
+ def get_load_balancer_listener_policy(
+ self,
load_balancer_id: str,
listener_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer listener policy.
@@ -16946,9 +18447,11 @@ def get_load_balancer_listener_policy(self,
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_load_balancer_listener_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_listener_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -16965,21 +18468,23 @@ def get_load_balancer_listener_policy(self,
path_param_values = self.encode_path_vars(load_balancer_id, listener_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_load_balancer_listener_policy(self,
+ def update_load_balancer_listener_policy(
+ self,
load_balancer_id: str,
listener_id: str,
id: str,
load_balancer_listener_policy_patch: 'LoadBalancerListenerPolicyPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a load balancer listener policy.
@@ -17007,9 +18512,11 @@ def update_load_balancer_listener_policy(self,
if isinstance(load_balancer_listener_policy_patch, LoadBalancerListenerPolicyPatch):
load_balancer_listener_policy_patch = convert_model(load_balancer_listener_policy_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_load_balancer_listener_policy')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_load_balancer_listener_policy',
+ )
headers.update(sdk_headers)
params = {
@@ -17029,21 +18536,23 @@ def update_load_balancer_listener_policy(self,
path_param_values = self.encode_path_vars(load_balancer_id, listener_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_load_balancer_listener_policy_rules(self,
+ def list_load_balancer_listener_policy_rules(
+ self,
load_balancer_id: str,
listener_id: str,
policy_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all rules of a load balancer listener policy.
@@ -17065,9 +18574,11 @@ def list_load_balancer_listener_policy_rules(self,
if not policy_id:
raise ValueError('policy_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancer_listener_policy_rules')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancer_listener_policy_rules',
+ )
headers.update(sdk_headers)
params = {
@@ -17084,16 +18595,18 @@ def list_load_balancer_listener_policy_rules(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_load_balancer_listener_policy_rule(self,
+ def create_load_balancer_listener_policy_rule(
+ self,
load_balancer_id: str,
listener_id: str,
policy_id: str,
@@ -17102,7 +18615,7 @@ def create_load_balancer_listener_policy_rule(self,
value: str,
*,
field: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a rule for a load balancer listener policy.
@@ -17144,9 +18657,11 @@ def create_load_balancer_listener_policy_rule(self,
if value is None:
raise ValueError('value must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_load_balancer_listener_policy_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_load_balancer_listener_policy_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -17173,22 +18688,24 @@ def create_load_balancer_listener_policy_rule(self,
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)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_load_balancer_listener_policy_rule(self,
+ def delete_load_balancer_listener_policy_rule(
+ self,
load_balancer_id: str,
listener_id: str,
policy_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a load balancer listener policy rule.
@@ -17214,9 +18731,11 @@ def delete_load_balancer_listener_policy_rule(self,
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_load_balancer_listener_policy_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_load_balancer_listener_policy_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -17232,21 +18751,23 @@ def delete_load_balancer_listener_policy_rule(self,
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)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_listener_policy_rule(self,
+ def get_load_balancer_listener_policy_rule(
+ self,
load_balancer_id: str,
listener_id: str,
policy_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer listener policy rule.
@@ -17271,9 +18792,11 @@ def get_load_balancer_listener_policy_rule(self,
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_load_balancer_listener_policy_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_listener_policy_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -17290,22 +18813,24 @@ def get_load_balancer_listener_policy_rule(self,
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)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_load_balancer_listener_policy_rule(self,
+ def update_load_balancer_listener_policy_rule(
+ self,
load_balancer_id: str,
listener_id: str,
policy_id: str,
id: str,
load_balancer_listener_policy_rule_patch: 'LoadBalancerListenerPolicyRulePatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a load balancer listener policy rule.
@@ -17336,9 +18861,11 @@ def update_load_balancer_listener_policy_rule(self,
if isinstance(load_balancer_listener_policy_rule_patch, LoadBalancerListenerPolicyRulePatch):
load_balancer_listener_policy_rule_patch = convert_model(load_balancer_listener_policy_rule_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_load_balancer_listener_policy_rule')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_load_balancer_listener_policy_rule',
+ )
headers.update(sdk_headers)
params = {
@@ -17358,19 +18885,21 @@ def update_load_balancer_listener_policy_rule(self,
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)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_load_balancer_pools(self,
+ def list_load_balancer_pools(
+ self,
load_balancer_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all pools of a load balancer.
@@ -17386,9 +18915,11 @@ def list_load_balancer_pools(self,
if not load_balancer_id:
raise ValueError('load_balancer_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancer_pools')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancer_pools',
+ )
headers.update(sdk_headers)
params = {
@@ -17405,16 +18936,18 @@ def list_load_balancer_pools(self,
path_param_values = self.encode_path_vars(load_balancer_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_load_balancer_pool(self,
+ def create_load_balancer_pool(
+ self,
load_balancer_id: str,
algorithm: str,
health_monitor: 'LoadBalancerPoolHealthMonitorPrototype',
@@ -17424,7 +18957,7 @@ def create_load_balancer_pool(self,
name: str = None,
proxy_protocol: str = None,
session_persistence: 'LoadBalancerPoolSessionPersistencePrototype' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a load balancer pool.
@@ -17474,9 +19007,11 @@ def create_load_balancer_pool(self,
if session_persistence is not None:
session_persistence = convert_model(session_persistence)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_load_balancer_pool')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_load_balancer_pool',
+ )
headers.update(sdk_headers)
params = {
@@ -17506,20 +19041,22 @@ def create_load_balancer_pool(self,
path_param_values = self.encode_path_vars(load_balancer_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_load_balancer_pool(self,
+ def delete_load_balancer_pool(
+ self,
load_balancer_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a load balancer pool.
@@ -17539,9 +19076,11 @@ def delete_load_balancer_pool(self,
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_load_balancer_pool')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_load_balancer_pool',
+ )
headers.update(sdk_headers)
params = {
@@ -17557,19 +19096,21 @@ def delete_load_balancer_pool(self,
path_param_values = self.encode_path_vars(load_balancer_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_pool(self,
+ def get_load_balancer_pool(
+ self,
load_balancer_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer pool.
@@ -17588,9 +19129,11 @@ def get_load_balancer_pool(self,
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_load_balancer_pool')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_pool',
+ )
headers.update(sdk_headers)
params = {
@@ -17607,20 +19150,22 @@ def get_load_balancer_pool(self,
path_param_values = self.encode_path_vars(load_balancer_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_load_balancer_pool(self,
+ def update_load_balancer_pool(
+ self,
load_balancer_id: str,
id: str,
load_balancer_pool_patch: 'LoadBalancerPoolPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a load balancer pool.
@@ -17645,9 +19190,11 @@ def update_load_balancer_pool(self,
if isinstance(load_balancer_pool_patch, LoadBalancerPoolPatch):
load_balancer_pool_patch = convert_model(load_balancer_pool_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_load_balancer_pool')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_load_balancer_pool',
+ )
headers.update(sdk_headers)
params = {
@@ -17667,20 +19214,22 @@ def update_load_balancer_pool(self,
path_param_values = self.encode_path_vars(load_balancer_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_load_balancer_pool_members(self,
+ def list_load_balancer_pool_members(
+ self,
load_balancer_id: str,
pool_id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all members of a load balancer pool.
@@ -17699,9 +19248,11 @@ def list_load_balancer_pool_members(self,
if not pool_id:
raise ValueError('pool_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_load_balancer_pool_members')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_load_balancer_pool_members',
+ )
headers.update(sdk_headers)
params = {
@@ -17718,23 +19269,25 @@ def list_load_balancer_pool_members(self,
path_param_values = self.encode_path_vars(load_balancer_id, pool_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_load_balancer_pool_member(self,
+ def create_load_balancer_pool_member(
+ self,
load_balancer_id: str,
pool_id: str,
port: int,
target: 'LoadBalancerPoolMemberTargetPrototype',
*,
weight: int = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a member in a load balancer pool.
@@ -17777,9 +19330,11 @@ def create_load_balancer_pool_member(self,
raise ValueError('target must be provided')
target = convert_model(target)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_load_balancer_pool_member')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_load_balancer_pool_member',
+ )
headers.update(sdk_headers)
params = {
@@ -17805,21 +19360,23 @@ def create_load_balancer_pool_member(self,
path_param_values = self.encode_path_vars(load_balancer_id, pool_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format(**path_param_dict)
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def replace_load_balancer_pool_members(self,
+ def replace_load_balancer_pool_members(
+ self,
load_balancer_id: str,
pool_id: str,
members: List['LoadBalancerPoolMemberPrototype'],
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Replace load balancer pool members.
@@ -17844,9 +19401,11 @@ def replace_load_balancer_pool_members(self,
raise ValueError('members must be provided')
members = [convert_model(x) for x in members]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='replace_load_balancer_pool_members')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='replace_load_balancer_pool_members',
+ )
headers.update(sdk_headers)
params = {
@@ -17870,21 +19429,23 @@ def replace_load_balancer_pool_members(self,
path_param_values = self.encode_path_vars(load_balancer_id, pool_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_load_balancer_pool_member(self,
+ def delete_load_balancer_pool_member(
+ self,
load_balancer_id: str,
pool_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a load balancer pool member.
@@ -17906,9 +19467,11 @@ def delete_load_balancer_pool_member(self,
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_load_balancer_pool_member')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_load_balancer_pool_member',
+ )
headers.update(sdk_headers)
params = {
@@ -17924,20 +19487,22 @@ def delete_load_balancer_pool_member(self,
path_param_values = self.encode_path_vars(load_balancer_id, pool_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_load_balancer_pool_member(self,
+ def get_load_balancer_pool_member(
+ self,
load_balancer_id: str,
pool_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a load balancer pool member.
@@ -17960,9 +19525,11 @@ def get_load_balancer_pool_member(self,
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_load_balancer_pool_member')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_load_balancer_pool_member',
+ )
headers.update(sdk_headers)
params = {
@@ -17979,21 +19546,23 @@ def get_load_balancer_pool_member(self,
path_param_values = self.encode_path_vars(load_balancer_id, pool_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_load_balancer_pool_member(self,
+ def update_load_balancer_pool_member(
+ self,
load_balancer_id: str,
pool_id: str,
id: str,
load_balancer_pool_member_patch: 'LoadBalancerPoolMemberPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a load balancer pool member.
@@ -18021,9 +19590,11 @@ def update_load_balancer_pool_member(self,
if isinstance(load_balancer_pool_member_patch, LoadBalancerPoolMemberPatch):
load_balancer_pool_member_patch = convert_model(load_balancer_pool_member_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_load_balancer_pool_member')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_load_balancer_pool_member',
+ )
headers.update(sdk_headers)
params = {
@@ -18043,11 +19614,13 @@ def update_load_balancer_pool_member(self,
path_param_values = self.encode_path_vars(load_balancer_id, pool_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -18056,14 +19629,14 @@ def update_load_balancer_pool_member(self,
# Endpoint gateways
#########################
-
- def list_endpoint_gateways(self,
+ def list_endpoint_gateways(
+ self,
*,
name: str = None,
start: str = None,
limit: int = None,
resource_group_id: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all endpoint gateways.
@@ -18084,9 +19657,11 @@ def list_endpoint_gateways(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_endpoint_gateways')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_endpoint_gateways',
+ )
headers.update(sdk_headers)
params = {
@@ -18104,16 +19679,18 @@ def list_endpoint_gateways(self,
headers['Accept'] = 'application/json'
url = '/endpoint_gateways'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_endpoint_gateway(self,
+ def create_endpoint_gateway(
+ self,
target: 'EndpointGatewayTargetPrototype',
vpc: 'VPCIdentity',
*,
@@ -18121,7 +19698,7 @@ def create_endpoint_gateway(self,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
security_groups: List['SecurityGroupIdentity'] = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create an endpoint gateway.
@@ -18163,9 +19740,11 @@ def create_endpoint_gateway(self,
if security_groups is not None:
security_groups = [convert_model(x) for x in security_groups]
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_endpoint_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_endpoint_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -18191,23 +19770,25 @@ def create_endpoint_gateway(self,
headers['Accept'] = 'application/json'
url = '/endpoint_gateways'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def list_endpoint_gateway_ips(self,
+ def list_endpoint_gateway_ips(
+ self,
endpoint_gateway_id: str,
*,
start: str = None,
limit: int = None,
sort: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all reserved IPs bound to an endpoint gateway.
@@ -18231,9 +19812,11 @@ def list_endpoint_gateway_ips(self,
if not endpoint_gateway_id:
raise ValueError('endpoint_gateway_id must be provided')
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_endpoint_gateway_ips')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_endpoint_gateway_ips',
+ )
headers.update(sdk_headers)
params = {
@@ -18253,19 +19836,21 @@ def list_endpoint_gateway_ips(self,
path_param_values = self.encode_path_vars(endpoint_gateway_id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{endpoint_gateway_id}/ips'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def remove_endpoint_gateway_ip(self,
+ def remove_endpoint_gateway_ip(
+ self,
endpoint_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Unbind a reserved IP from an endpoint gateway.
@@ -18286,9 +19871,11 @@ def remove_endpoint_gateway_ip(self,
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='remove_endpoint_gateway_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='remove_endpoint_gateway_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -18304,19 +19891,21 @@ def remove_endpoint_gateway_ip(self,
path_param_values = self.encode_path_vars(endpoint_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_endpoint_gateway_ip(self,
+ def get_endpoint_gateway_ip(
+ self,
endpoint_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a reserved IP bound to an endpoint gateway.
@@ -18336,9 +19925,11 @@ def get_endpoint_gateway_ip(self,
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_endpoint_gateway_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_endpoint_gateway_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -18355,19 +19946,21 @@ def get_endpoint_gateway_ip(self,
path_param_values = self.encode_path_vars(endpoint_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def add_endpoint_gateway_ip(self,
+ def add_endpoint_gateway_ip(
+ self,
endpoint_gateway_id: str,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Bind a reserved IP to an endpoint gateway.
@@ -18390,9 +19983,11 @@ def add_endpoint_gateway_ip(self,
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='add_endpoint_gateway_ip')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='add_endpoint_gateway_ip',
+ )
headers.update(sdk_headers)
params = {
@@ -18409,18 +20004,20 @@ def add_endpoint_gateway_ip(self,
path_param_values = self.encode_path_vars(endpoint_gateway_id, id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{endpoint_gateway_id}/ips/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PUT',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='PUT',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_endpoint_gateway(self,
+ def delete_endpoint_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete an endpoint gateway.
@@ -18438,9 +20035,11 @@ def delete_endpoint_gateway(self,
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_endpoint_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_endpoint_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -18456,18 +20055,20 @@ def delete_endpoint_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_endpoint_gateway(self,
+ def get_endpoint_gateway(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve an endpoint gateway.
@@ -18484,9 +20085,11 @@ def get_endpoint_gateway(self,
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_endpoint_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_endpoint_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -18503,19 +20106,21 @@ def get_endpoint_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_endpoint_gateway(self,
+ def update_endpoint_gateway(
+ self,
id: str,
endpoint_gateway_patch: 'EndpointGatewayPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update an endpoint gateway.
@@ -18537,9 +20142,11 @@ def update_endpoint_gateway(self,
if isinstance(endpoint_gateway_patch, EndpointGatewayPatch):
endpoint_gateway_patch = convert_model(endpoint_gateway_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_endpoint_gateway')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_endpoint_gateway',
+ )
headers.update(sdk_headers)
params = {
@@ -18559,11 +20166,13 @@ def update_endpoint_gateway(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/endpoint_gateways/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -18572,8 +20181,8 @@ def update_endpoint_gateway(self,
# Flow log collectors
#########################
-
- def list_flow_log_collectors(self,
+ def list_flow_log_collectors(
+ self,
*,
start: str = None,
limit: int = None,
@@ -18584,7 +20193,7 @@ def list_flow_log_collectors(self,
vpc_name: str = None,
target_id: str = None,
target_resource_type: str = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
List all flow log collectors.
@@ -18616,9 +20225,11 @@ def list_flow_log_collectors(self,
"""
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='list_flow_log_collectors')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='list_flow_log_collectors',
+ )
headers.update(sdk_headers)
params = {
@@ -18641,23 +20252,25 @@ def list_flow_log_collectors(self,
headers['Accept'] = 'application/json'
url = '/flow_log_collectors'
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def create_flow_log_collector(self,
+ def create_flow_log_collector(
+ self,
storage_bucket: 'LegacyCloudObjectStorageBucketIdentity',
target: 'FlowLogCollectorTargetPrototype',
*,
active: bool = None,
name: str = None,
resource_group: 'ResourceGroupIdentity' = None,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Create a flow log collector.
@@ -18681,8 +20294,8 @@ def create_flow_log_collector(self,
:param bool active: (optional) Indicates whether this collector will be
active upon creation.
:param str name: (optional) The name for this flow log collector. The name
- must not be used by another flow log collector in the region. If
- unspecified, the name will be a hyphenated list of randomly-selected words.
+ must not be used by another flow log collector in the VPC. If unspecified,
+ the name will be a hyphenated list of randomly-selected words.
: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) is
@@ -18701,9 +20314,11 @@ def create_flow_log_collector(self,
if resource_group is not None:
resource_group = convert_model(resource_group)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='create_flow_log_collector')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='create_flow_log_collector',
+ )
headers.update(sdk_headers)
params = {
@@ -18728,19 +20343,21 @@ def create_flow_log_collector(self,
headers['Accept'] = 'application/json'
url = '/flow_log_collectors'
- request = self.prepare_request(method='POST',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='POST',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
-
- def delete_flow_log_collector(self,
+ def delete_flow_log_collector(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Delete a flow log collector.
@@ -18759,9 +20376,11 @@ def delete_flow_log_collector(self,
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_flow_log_collector')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='delete_flow_log_collector',
+ )
headers.update(sdk_headers)
params = {
@@ -18777,18 +20396,20 @@ def delete_flow_log_collector(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/flow_log_collectors/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='DELETE',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='DELETE',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def get_flow_log_collector(self,
+ def get_flow_log_collector(
+ self,
id: str,
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Retrieve a flow log collector.
@@ -18805,9 +20426,11 @@ def get_flow_log_collector(self,
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_flow_log_collector')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='get_flow_log_collector',
+ )
headers.update(sdk_headers)
params = {
@@ -18824,19 +20447,21 @@ def get_flow_log_collector(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/flow_log_collectors/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='GET',
- url=url,
- headers=headers,
- params=params)
+ request = self.prepare_request(
+ method='GET',
+ url=url,
+ headers=headers,
+ params=params,
+ )
response = self.send(request, **kwargs)
return response
-
- def update_flow_log_collector(self,
+ def update_flow_log_collector(
+ self,
id: str,
flow_log_collector_patch: 'FlowLogCollectorPatch',
- **kwargs
+ **kwargs,
) -> DetailedResponse:
"""
Update a flow log collector.
@@ -18861,9 +20486,11 @@ def update_flow_log_collector(self,
if isinstance(flow_log_collector_patch, FlowLogCollectorPatch):
flow_log_collector_patch = convert_model(flow_log_collector_patch)
headers = {}
- sdk_headers = get_sdk_headers(service_name=self.DEFAULT_SERVICE_NAME,
- service_version='V1',
- operation_id='update_flow_log_collector')
+ sdk_headers = get_sdk_headers(
+ service_name=self.DEFAULT_SERVICE_NAME,
+ service_version='V1',
+ operation_id='update_flow_log_collector',
+ )
headers.update(sdk_headers)
params = {
@@ -18883,11 +20510,13 @@ def update_flow_log_collector(self,
path_param_values = self.encode_path_vars(id)
path_param_dict = dict(zip(path_param_keys, path_param_values))
url = '/flow_log_collectors/{id}'.format(**path_param_dict)
- request = self.prepare_request(method='PATCH',
- url=url,
- headers=headers,
- params=params,
- data=data)
+ request = self.prepare_request(
+ method='PATCH',
+ url=url,
+ headers=headers,
+ params=params,
+ data=data,
+ )
response = self.send(request, **kwargs)
return response
@@ -18906,6 +20535,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
ADDRESS = 'address'
CREATED_AT = 'created_at'
NAME = 'name'
@@ -18920,6 +20550,7 @@ class Visibility(str, Enum):
"""
Filters the collection to images with the specified `visibility`.
"""
+
PRIVATE = 'private'
PUBLIC = 'public'
@@ -18937,6 +20568,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
CREATED_AT = 'created_at'
NAME = 'name'
@@ -18950,6 +20582,7 @@ class AttachmentState(str, Enum):
"""
Filters the collection to volumes with the specified attachment state.
"""
+
ATTACHED = 'attached'
UNATTACHED = 'unattached'
UNUSABLE = 'unusable'
@@ -18957,6 +20590,7 @@ class Encryption(str, Enum):
"""
Filters the collection to resources with the specified encryption type.
"""
+
PROVIDER_MANAGED = 'provider_managed'
USER_MANAGED = 'user_managed'
@@ -18974,6 +20608,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
CREATED_AT = 'created_at'
NAME = 'name'
@@ -18991,6 +20626,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
CREATED_AT = 'created_at'
NAME = 'name'
@@ -19004,6 +20640,7 @@ class Direction(str, Enum):
"""
Filters the collection to rules with the specified direction.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -19021,12 +20658,14 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
CREATED_AT = 'created_at'
NAME = 'name'
class Mode(str, Enum):
"""
Filters the collection to VPN gateways with the specified mode.
"""
+
POLICY = 'policy'
ROUTE = 'route'
@@ -19044,6 +20683,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
CREATED_AT = 'created_at'
NAME = 'name'
@@ -19060,6 +20700,7 @@ class Sort(str, Enum):
value `-created_at` sorts the collection by the `created_at` property in
descending order.
"""
+
CREATED_AT = 'created_at'
@@ -19076,6 +20717,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
CREATED_AT = 'created_at'
NAME = 'name'
@@ -19093,6 +20735,7 @@ class Sort(str, Enum):
descending order, and the value `name` sorts it by the `name` property in
ascending order.
"""
+
ADDRESS = 'address'
CREATED_AT = 'created_at'
NAME = 'name'
@@ -19108,6 +20751,7 @@ class TargetResourceType(str, Enum):
Filters the collection to flow log collectors that target the specified resource
type.
"""
+
INSTANCE = 'instance'
NETWORK_INTERFACE = 'network_interface'
SUBNET = 'subnet'
@@ -19119,7 +20763,7 @@ class TargetResourceType(str, Enum):
##############################################################################
-class AddressPrefix():
+class AddressPrefix:
"""
AddressPrefix.
@@ -19138,15 +20782,17 @@ class AddressPrefix():
:attr ZoneReference zone: The zone this address prefix resides in.
"""
- def __init__(self,
- cidr: str,
- created_at: datetime,
- has_subnets: bool,
- href: str,
- id: str,
- is_default: bool,
- name: str,
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ cidr: str,
+ created_at: datetime,
+ has_subnets: bool,
+ href: str,
+ id: str,
+ is_default: bool,
+ name: str,
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a AddressPrefix object.
@@ -19258,7 +20904,8 @@ def __ne__(self, other: 'AddressPrefix') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class AddressPrefixCollection():
+
+class AddressPrefixCollection:
"""
AddressPrefixCollection.
@@ -19272,13 +20919,15 @@ class AddressPrefixCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- address_prefixes: List['AddressPrefix'],
- first: 'AddressPrefixCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'AddressPrefixCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ address_prefixes: List['AddressPrefix'],
+ first: 'AddressPrefixCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'AddressPrefixCollectionNext' = None,
+ ) -> None:
"""
Initialize a AddressPrefixCollection object.
@@ -19373,15 +21022,18 @@ def __ne__(self, other: 'AddressPrefixCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class AddressPrefixCollectionFirst():
+
+class AddressPrefixCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a AddressPrefixCollectionFirst object.
@@ -19429,7 +21081,8 @@ def __ne__(self, other: 'AddressPrefixCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class AddressPrefixCollectionNext():
+
+class AddressPrefixCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -19437,8 +21090,10 @@ class AddressPrefixCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a AddressPrefixCollectionNext object.
@@ -19486,7 +21141,8 @@ def __ne__(self, other: 'AddressPrefixCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class AddressPrefixPatch():
+
+class AddressPrefixPatch:
"""
AddressPrefixPatch.
@@ -19499,10 +21155,12 @@ class AddressPrefixPatch():
be used by another address prefix for the VPC.
"""
- def __init__(self,
- *,
- is_default: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ is_default: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a AddressPrefixPatch object.
@@ -19559,7 +21217,8 @@ def __ne__(self, other: 'AddressPrefixPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicy():
+
+class BackupPolicy:
"""
BackupPolicy.
@@ -19589,20 +21248,22 @@ class BackupPolicy():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- lifecycle_state: str,
- match_resource_types: List[str],
- match_user_tags: List[str],
- name: str,
- plans: List['BackupPolicyPlanReference'],
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- *,
- last_job_completed_at: datetime = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ match_resource_types: List[str],
+ match_user_tags: List[str],
+ name: str,
+ plans: List['BackupPolicyPlanReference'],
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ *,
+ last_job_completed_at: datetime = None,
+ ) -> None:
"""
Initialize a BackupPolicy object.
@@ -19763,6 +21424,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the backup policy.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -19776,6 +21438,7 @@ class MatchResourceTypesEnum(str, Enum):
"""
The resource type.
"""
+
VOLUME = 'volume'
@@ -19783,10 +21446,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BACKUP_POLICY = 'backup_policy'
-class BackupPolicyCollection():
+
+class BackupPolicyCollection:
"""
BackupPolicyCollection.
@@ -19800,13 +21465,15 @@ class BackupPolicyCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- backup_policies: List['BackupPolicy'],
- first: 'BackupPolicyCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'BackupPolicyCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ backup_policies: List['BackupPolicy'],
+ first: 'BackupPolicyCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'BackupPolicyCollectionNext' = None,
+ ) -> None:
"""
Initialize a BackupPolicyCollection object.
@@ -19900,15 +21567,18 @@ def __ne__(self, other: 'BackupPolicyCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyCollectionFirst():
+
+class BackupPolicyCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BackupPolicyCollectionFirst object.
@@ -19956,7 +21626,8 @@ def __ne__(self, other: 'BackupPolicyCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyCollectionNext():
+
+class BackupPolicyCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -19964,8 +21635,10 @@ class BackupPolicyCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BackupPolicyCollectionNext object.
@@ -20013,7 +21686,8 @@ def __ne__(self, other: 'BackupPolicyCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyJob():
+
+class BackupPolicyJob:
"""
BackupPolicyJob.
@@ -20058,21 +21732,23 @@ class BackupPolicyJob():
[deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)).
"""
- def __init__(self,
- auto_delete: bool,
- auto_delete_after: int,
- backup_policy_plan: 'BackupPolicyPlanReference',
- created_at: datetime,
- href: str,
- id: str,
- job_type: str,
- resource_type: str,
- source: 'BackupPolicyJobSource',
- status: str,
- status_reasons: List['BackupPolicyJobStatusReason'],
- target_snapshots: List['SnapshotReference'],
- *,
- completed_at: datetime = None) -> None:
+ def __init__(
+ self,
+ auto_delete: bool,
+ auto_delete_after: int,
+ backup_policy_plan: 'BackupPolicyPlanReference',
+ created_at: datetime,
+ href: str,
+ id: str,
+ job_type: str,
+ resource_type: str,
+ source: 'BackupPolicyJobSource',
+ status: str,
+ status_reasons: List['BackupPolicyJobStatusReason'],
+ target_snapshots: List['SnapshotReference'],
+ *,
+ completed_at: datetime = None,
+ ) -> None:
"""
Initialize a BackupPolicyJob object.
@@ -20266,6 +21942,7 @@ class JobTypeEnum(str, Enum):
surface the error, or bypass the backup policy job on which the unexpected
property value was encountered.
"""
+
CREATION = 'creation'
DELETION = 'deletion'
@@ -20274,6 +21951,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BACKUP_POLICY_JOB = 'backup_policy_job'
@@ -20285,12 +21963,14 @@ class StatusEnum(str, Enum):
surface the error, or bypass the backup policy job on which the unexpected
property value was encountered.
"""
+
FAILED = 'failed'
RUNNING = 'running'
SUCCEEDED = 'succeeded'
-class BackupPolicyJobCollection():
+
+class BackupPolicyJobCollection:
"""
BackupPolicyJobCollection.
@@ -20305,13 +21985,15 @@ class BackupPolicyJobCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'BackupPolicyJobCollectionFirst',
- jobs: List['BackupPolicyJob'],
- limit: int,
- total_count: int,
- *,
- next: 'BackupPolicyJobCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'BackupPolicyJobCollectionFirst',
+ jobs: List['BackupPolicyJob'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'BackupPolicyJobCollectionNext' = None,
+ ) -> None:
"""
Initialize a BackupPolicyJobCollection object.
@@ -20405,15 +22087,18 @@ def __ne__(self, other: 'BackupPolicyJobCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyJobCollectionFirst():
+
+class BackupPolicyJobCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BackupPolicyJobCollectionFirst object.
@@ -20461,7 +22146,8 @@ def __ne__(self, other: 'BackupPolicyJobCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyJobCollectionNext():
+
+class BackupPolicyJobCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -20469,8 +22155,10 @@ class BackupPolicyJobCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BackupPolicyJobCollectionNext object.
@@ -20518,23 +22206,28 @@ def __ne__(self, other: 'BackupPolicyJobCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyJobSource():
+
+class BackupPolicyJobSource:
"""
The source this backup was created from (may be
[deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)).
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BackupPolicyJobSource object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BackupPolicyJobSourceVolumeReference']))
+ ", ".join(['BackupPolicyJobSourceVolumeReference'])
+ )
raise Exception(msg)
-class BackupPolicyJobStatusReason():
+
+class BackupPolicyJobStatusReason:
"""
BackupPolicyJobStatusReason.
@@ -20550,11 +22243,13 @@ class BackupPolicyJobStatusReason():
:attr str more_info: (optional) Link to documentation about this status reason.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a BackupPolicyJobStatusReason object.
@@ -20635,13 +22330,15 @@ class CodeEnum(str, Enum):
reached
- `source_volume_busy`: The source volume has `busy` set (after multiple retries).
"""
+
INTERNAL_ERROR = 'internal_error'
SNAPSHOT_PENDING = 'snapshot_pending'
SNAPSHOT_VOLUME_LIMIT = 'snapshot_volume_limit'
SOURCE_VOLUME_BUSY = 'source_volume_busy'
-class BackupPolicyPatch():
+
+class BackupPolicyPatch:
"""
BackupPolicyPatch.
@@ -20652,10 +22349,12 @@ class BackupPolicyPatch():
used by another backup policy in the region.
"""
- def __init__(self,
- *,
- match_user_tags: List[str] = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ match_user_tags: List[str] = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a BackupPolicyPatch object.
@@ -20710,7 +22409,8 @@ def __ne__(self, other: 'BackupPolicyPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlan():
+
+class BackupPolicyPlan:
"""
BackupPolicyPlan.
@@ -20737,19 +22437,21 @@ class BackupPolicyPlan():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- active: bool,
- attach_user_tags: List[str],
- clone_policy: 'BackupPolicyPlanClonePolicy',
- copy_user_tags: bool,
- created_at: datetime,
- cron_spec: str,
- deletion_trigger: 'BackupPolicyPlanDeletionTrigger',
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ active: bool,
+ attach_user_tags: List[str],
+ clone_policy: 'BackupPolicyPlanClonePolicy',
+ copy_user_tags: bool,
+ created_at: datetime,
+ cron_spec: str,
+ deletion_trigger: 'BackupPolicyPlanDeletionTrigger',
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ resource_type: str,
+ ) -> None:
"""
Initialize a BackupPolicyPlan object.
@@ -20904,6 +22606,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of this backup policy plan.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -20917,10 +22620,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BACKUP_POLICY_PLAN = 'backup_policy_plan'
-class BackupPolicyPlanClonePolicy():
+
+class BackupPolicyPlanClonePolicy:
"""
BackupPolicyPlanClonePolicy.
@@ -20930,9 +22635,11 @@ class BackupPolicyPlanClonePolicy():
snapshot clones in.
"""
- def __init__(self,
- max_snapshots: int,
- zones: List['ZoneReference']) -> None:
+ def __init__(
+ self,
+ max_snapshots: int,
+ zones: List['ZoneReference'],
+ ) -> None:
"""
Initialize a BackupPolicyPlanClonePolicy object.
@@ -20996,7 +22703,8 @@ def __ne__(self, other: 'BackupPolicyPlanClonePolicy') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanClonePolicyPatch():
+
+class BackupPolicyPlanClonePolicyPatch:
"""
BackupPolicyPlanClonePolicyPatch.
@@ -21007,10 +22715,12 @@ class BackupPolicyPlanClonePolicyPatch():
for snapshots that have already been created by this plan.
"""
- def __init__(self,
- *,
- max_snapshots: int = None,
- zones: List['ZoneIdentity'] = None) -> None:
+ def __init__(
+ self,
+ *,
+ max_snapshots: int = None,
+ zones: List['ZoneIdentity'] = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanClonePolicyPatch object.
@@ -21071,7 +22781,8 @@ def __ne__(self, other: 'BackupPolicyPlanClonePolicyPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanClonePolicyPrototype():
+
+class BackupPolicyPlanClonePolicyPrototype:
"""
BackupPolicyPlanClonePolicyPrototype.
@@ -21081,10 +22792,12 @@ class BackupPolicyPlanClonePolicyPrototype():
snapshot clones in.
"""
- def __init__(self,
- zones: List['ZoneIdentity'],
- *,
- max_snapshots: int = None) -> None:
+ def __init__(
+ self,
+ zones: List['ZoneIdentity'],
+ *,
+ max_snapshots: int = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanClonePolicyPrototype object.
@@ -21146,15 +22859,18 @@ def __ne__(self, other: 'BackupPolicyPlanClonePolicyPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanCollection():
+
+class BackupPolicyPlanCollection:
"""
BackupPolicyPlanCollection.
:attr List[BackupPolicyPlan] plans: Collection of backup policy plans.
"""
- def __init__(self,
- plans: List['BackupPolicyPlan']) -> None:
+ def __init__(
+ self,
+ plans: List['BackupPolicyPlan'],
+ ) -> None:
"""
Initialize a BackupPolicyPlanCollection object.
@@ -21208,7 +22924,8 @@ def __ne__(self, other: 'BackupPolicyPlanCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanDeletionTrigger():
+
+class BackupPolicyPlanDeletionTrigger:
"""
BackupPolicyPlanDeletionTrigger.
@@ -21218,10 +22935,12 @@ class BackupPolicyPlanDeletionTrigger():
keep. If absent, there is no maximum.
"""
- def __init__(self,
- delete_after: int,
- *,
- delete_over_count: int = None) -> None:
+ def __init__(
+ self,
+ delete_after: int,
+ *,
+ delete_over_count: int = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanDeletionTrigger object.
@@ -21277,7 +22996,8 @@ def __ne__(self, other: 'BackupPolicyPlanDeletionTrigger') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanDeletionTriggerPatch():
+
+class BackupPolicyPlanDeletionTriggerPatch:
"""
BackupPolicyPlanDeletionTriggerPatch.
@@ -21287,10 +23007,12 @@ class BackupPolicyPlanDeletionTriggerPatch():
keep. Specify `null` to remove any existing maximum.
"""
- def __init__(self,
- *,
- delete_after: int = None,
- delete_over_count: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ delete_after: int = None,
+ delete_over_count: int = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanDeletionTriggerPatch object.
@@ -21344,7 +23066,8 @@ def __ne__(self, other: 'BackupPolicyPlanDeletionTriggerPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanDeletionTriggerPrototype():
+
+class BackupPolicyPlanDeletionTriggerPrototype:
"""
BackupPolicyPlanDeletionTriggerPrototype.
@@ -21354,10 +23077,12 @@ class BackupPolicyPlanDeletionTriggerPrototype():
keep. If unspecified, there will be no maximum.
"""
- def __init__(self,
- *,
- delete_after: int = None,
- delete_over_count: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ delete_after: int = None,
+ delete_over_count: int = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanDeletionTriggerPrototype object.
@@ -21411,7 +23136,8 @@ def __ne__(self, other: 'BackupPolicyPlanDeletionTriggerPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanPatch():
+
+class BackupPolicyPlanPatch:
"""
BackupPolicyPlanPatch.
@@ -21433,15 +23159,17 @@ class BackupPolicyPlanPatch():
not be used by another plan for the backup policy.
"""
- def __init__(self,
- *,
- active: bool = None,
- attach_user_tags: List[str] = None,
- clone_policy: 'BackupPolicyPlanClonePolicyPatch' = None,
- copy_user_tags: bool = None,
- cron_spec: str = None,
- deletion_trigger: 'BackupPolicyPlanDeletionTriggerPatch' = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ active: bool = None,
+ attach_user_tags: List[str] = None,
+ clone_policy: 'BackupPolicyPlanClonePolicyPatch' = None,
+ copy_user_tags: bool = None,
+ cron_spec: str = None,
+ deletion_trigger: 'BackupPolicyPlanDeletionTriggerPatch' = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanPatch object.
@@ -21539,7 +23267,8 @@ def __ne__(self, other: 'BackupPolicyPlanPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanPrototype():
+
+class BackupPolicyPlanPrototype:
"""
BackupPolicyPlanPrototype.
@@ -21561,15 +23290,17 @@ class BackupPolicyPlanPrototype():
be a hyphenated list of randomly-selected words.
"""
- def __init__(self,
- cron_spec: str,
- *,
- active: bool = None,
- attach_user_tags: List[str] = None,
- clone_policy: 'BackupPolicyPlanClonePolicyPrototype' = None,
- copy_user_tags: bool = None,
- deletion_trigger: 'BackupPolicyPlanDeletionTriggerPrototype' = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ cron_spec: str,
+ *,
+ active: bool = None,
+ attach_user_tags: List[str] = None,
+ clone_policy: 'BackupPolicyPlanClonePolicyPrototype' = None,
+ copy_user_tags: bool = None,
+ deletion_trigger: 'BackupPolicyPlanDeletionTriggerPrototype' = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanPrototype object.
@@ -21670,7 +23401,8 @@ def __ne__(self, other: 'BackupPolicyPlanPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BackupPolicyPlanReference():
+
+class BackupPolicyPlanReference:
"""
BackupPolicyPlanReference.
@@ -21684,13 +23416,15 @@ class BackupPolicyPlanReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'BackupPolicyPlanReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'BackupPolicyPlanReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a BackupPolicyPlanReference object.
@@ -21779,10 +23513,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BACKUP_POLICY_PLAN = 'backup_policy_plan'
-class BackupPolicyPlanReferenceDeleted():
+
+class BackupPolicyPlanReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -21790,8 +23526,10 @@ class BackupPolicyPlanReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a BackupPolicyPlanReferenceDeleted object.
@@ -21839,7 +23577,8 @@ def __ne__(self, other: 'BackupPolicyPlanReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServer():
+
+class BareMetalServer:
"""
BareMetalServer.
@@ -21858,6 +23597,13 @@ class BareMetalServer():
enabled, the image must support secure boot or the server will fail to boot.
:attr str href: The URL for this bare metal server.
:attr str id: The unique identifier for this bare metal server.
+ :attr List[BareMetalServerLifecycleReason] lifecycle_reasons: The reasons for
+ the current `lifecycle_state` (if any).
+ The enumerated reason code values for this property will expand in the future.
+ When processing this property, check for and log unknown values. Optionally halt
+ processing and surface the error, or bypass the resource on which the unexpected
+ reason code was encountered.
+ :attr str lifecycle_state: The lifecycle state of the bare metal server.
:attr int memory: The amount of memory, truncated to whole gibibytes.
:attr str name: The name for this bare metal server. The name is unique across
all bare metal servers in the region.
@@ -21884,28 +23630,32 @@ class BareMetalServer():
:attr ZoneReference zone: The zone this bare metal server resides in.
"""
- def __init__(self,
- bandwidth: int,
- boot_target: 'BareMetalServerBootTarget',
- cpu: 'BareMetalServerCPU',
- created_at: datetime,
- crn: str,
- disks: List['BareMetalServerDisk'],
- enable_secure_boot: bool,
- href: str,
- id: str,
- memory: int,
- name: str,
- network_interfaces: List['NetworkInterfaceBareMetalServerContextReference'],
- primary_network_interface: 'NetworkInterfaceBareMetalServerContextReference',
- profile: 'BareMetalServerProfileReference',
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- status: str,
- status_reasons: List['BareMetalServerStatusReason'],
- trusted_platform_module: 'BareMetalServerTrustedPlatformModule',
- vpc: 'VPCReference',
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ bandwidth: int,
+ boot_target: 'BareMetalServerBootTarget',
+ cpu: 'BareMetalServerCPU',
+ created_at: datetime,
+ crn: str,
+ disks: List['BareMetalServerDisk'],
+ enable_secure_boot: bool,
+ href: str,
+ id: str,
+ lifecycle_reasons: List['BareMetalServerLifecycleReason'],
+ lifecycle_state: str,
+ memory: int,
+ name: str,
+ network_interfaces: List['NetworkInterfaceBareMetalServerContextReference'],
+ primary_network_interface: 'NetworkInterfaceBareMetalServerContextReference',
+ profile: 'BareMetalServerProfileReference',
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ status: str,
+ status_reasons: List['BareMetalServerStatusReason'],
+ trusted_platform_module: 'BareMetalServerTrustedPlatformModule',
+ vpc: 'VPCReference',
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a BareMetalServer object.
@@ -21925,6 +23675,13 @@ def __init__(self,
boot.
: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 the current `lifecycle_state` (if any).
+ The enumerated reason code values for this property will expand in the
+ future. When processing this property, check for and log unknown values.
+ Optionally halt processing and surface the error, or bypass the resource on
+ which the unexpected reason code was encountered.
+ :param str lifecycle_state: The lifecycle state of the bare metal server.
:param int memory: The amount of memory, truncated to whole gibibytes.
:param str name: The name for this bare metal server. The name is unique
across all bare metal servers in the region.
@@ -21959,6 +23716,8 @@ def __init__(self,
self.enable_secure_boot = enable_secure_boot
self.href = href
self.id = id
+ self.lifecycle_reasons = lifecycle_reasons
+ self.lifecycle_state = lifecycle_state
self.memory = memory
self.name = name
self.network_interfaces = network_interfaces
@@ -22012,6 +23771,14 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServer':
args['id'] = _dict.get('id')
else:
raise ValueError('Required property \'id\' not present in BareMetalServer JSON')
+ if 'lifecycle_reasons' in _dict:
+ args['lifecycle_reasons'] = [BareMetalServerLifecycleReason.from_dict(v) for v in _dict.get('lifecycle_reasons')]
+ else:
+ raise ValueError('Required property \'lifecycle_reasons\' not present in BareMetalServer JSON')
+ if 'lifecycle_state' in _dict:
+ args['lifecycle_state'] = _dict.get('lifecycle_state')
+ else:
+ raise ValueError('Required property \'lifecycle_state\' not present in BareMetalServer JSON')
if 'memory' in _dict:
args['memory'] = _dict.get('memory')
else:
@@ -22100,6 +23867,16 @@ def to_dict(self) -> Dict:
_dict['href'] = self.href
if hasattr(self, 'id') and self.id is not None:
_dict['id'] = self.id
+ if hasattr(self, 'lifecycle_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, 'memory') and self.memory is not None:
_dict['memory'] = self.memory
if hasattr(self, 'name') and self.name is not None:
@@ -22174,10 +23951,25 @@ def __ne__(self, other: 'BareMetalServer') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+ class LifecycleStateEnum(str, Enum):
+ """
+ The lifecycle state of the bare metal server.
+ """
+
+ DELETING = 'deleting'
+ FAILED = 'failed'
+ PENDING = 'pending'
+ STABLE = 'stable'
+ SUSPENDED = 'suspended'
+ UPDATING = 'updating'
+ WAITING = 'waiting'
+
+
class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BARE_METAL_SERVER = 'bare_metal_server'
@@ -22185,6 +23977,7 @@ class StatusEnum(str, Enum):
"""
The status of the bare metal server.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
MAINTENANCE = 'maintenance'
@@ -22196,22 +23989,27 @@ class StatusEnum(str, Enum):
STOPPING = 'stopping'
-class BareMetalServerBootTarget():
+
+class BareMetalServerBootTarget:
"""
The possible resource types for this property are expected to expand in the future.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerBootTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerBootTargetBareMetalServerDiskReference']))
+ ", ".join(['BareMetalServerBootTargetBareMetalServerDiskReference'])
+ )
raise Exception(msg)
-class BareMetalServerCPU():
+
+class BareMetalServerCPU:
"""
The bare metal server CPU configuration.
@@ -22221,11 +24019,13 @@ class BareMetalServerCPU():
:attr int threads_per_core: The total number of hardware threads per core.
"""
- def __init__(self,
- architecture: str,
- core_count: int,
- socket_count: int,
- threads_per_core: int) -> None:
+ def __init__(
+ self,
+ architecture: str,
+ core_count: int,
+ socket_count: int,
+ threads_per_core: int,
+ ) -> None:
"""
Initialize a BareMetalServerCPU object.
@@ -22297,7 +24097,8 @@ def __ne__(self, other: 'BareMetalServerCPU') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerCollection():
+
+class BareMetalServerCollection:
"""
BareMetalServerCollection.
@@ -22313,13 +24114,15 @@ class BareMetalServerCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- bare_metal_servers: List['BareMetalServer'],
- first: 'BareMetalServerCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'BareMetalServerCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ bare_metal_servers: List['BareMetalServer'],
+ first: 'BareMetalServerCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'BareMetalServerCollectionNext' = None,
+ ) -> None:
"""
Initialize a BareMetalServerCollection object.
@@ -22414,15 +24217,18 @@ def __ne__(self, other: 'BareMetalServerCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerCollectionFirst():
+
+class BareMetalServerCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerCollectionFirst object.
@@ -22470,7 +24276,8 @@ def __ne__(self, other: 'BareMetalServerCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerCollectionNext():
+
+class BareMetalServerCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -22478,8 +24285,10 @@ class BareMetalServerCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerCollectionNext object.
@@ -22527,7 +24336,8 @@ def __ne__(self, other: 'BareMetalServerCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerConsoleAccessToken():
+
+class BareMetalServerConsoleAccessToken:
"""
The bare metal server console access token information.
@@ -22543,13 +24353,15 @@ class BareMetalServerConsoleAccessToken():
:attr str href: The URL to access this bare metal server console.
"""
- def __init__(self,
- access_token: str,
- console_type: str,
- created_at: datetime,
- expires_at: datetime,
- force: bool,
- href: str) -> None:
+ def __init__(
+ self,
+ access_token: str,
+ console_type: str,
+ created_at: datetime,
+ expires_at: datetime,
+ force: bool,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerConsoleAccessToken object.
@@ -22647,11 +24459,13 @@ class ConsoleTypeEnum(str, Enum):
"""
The bare metal server console type for which this token may be used.
"""
+
SERIAL = 'serial'
VNC = 'vnc'
-class BareMetalServerDisk():
+
+class BareMetalServerDisk:
"""
BareMetalServerDisk.
@@ -22672,14 +24486,16 @@ class BareMetalServerDisk():
:attr int size: The size of the disk in GB (gigabytes).
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- interface_type: str,
- name: str,
- resource_type: str,
- size: int) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ interface_type: str,
+ name: str,
+ resource_type: str,
+ size: int,
+ ) -> None:
"""
Initialize a BareMetalServerDisk object.
@@ -22794,6 +24610,7 @@ class InterfaceTypeEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
FCP = 'fcp'
NVME = 'nvme'
SATA = 'sata'
@@ -22803,10 +24620,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BARE_METAL_SERVER_DISK = 'bare_metal_server_disk'
-class BareMetalServerDiskCollection():
+
+class BareMetalServerDiskCollection:
"""
BareMetalServerDiskCollection.
@@ -22814,8 +24633,10 @@ class BareMetalServerDiskCollection():
disks.
"""
- def __init__(self,
- disks: List['BareMetalServerDisk']) -> None:
+ def __init__(
+ self,
+ disks: List['BareMetalServerDisk'],
+ ) -> None:
"""
Initialize a BareMetalServerDiskCollection object.
@@ -22870,7 +24691,8 @@ def __ne__(self, other: 'BareMetalServerDiskCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerDiskPatch():
+
+class BareMetalServerDiskPatch:
"""
BareMetalServerDiskPatch.
@@ -22878,9 +24700,11 @@ class BareMetalServerDiskPatch():
must not be used by another disk on the bare metal server.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerDiskPatch object.
@@ -22927,7 +24751,8 @@ def __ne__(self, other: 'BareMetalServerDiskPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerDiskReferenceDeleted():
+
+class BareMetalServerDiskReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -22935,8 +24760,10 @@ class BareMetalServerDiskReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a BareMetalServerDiskReferenceDeleted object.
@@ -22984,7 +24811,8 @@ def __ne__(self, other: 'BareMetalServerDiskReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerInitialization():
+
+class BareMetalServerInitialization:
"""
BareMetalServerInitialization.
@@ -22996,10 +24824,12 @@ class BareMetalServerInitialization():
distinguished by the `resource_type` property.
"""
- def __init__(self,
- image: 'ImageReference',
- keys: List['KeyReference'],
- user_accounts: List['BareMetalServerInitializationUserAccount']) -> None:
+ def __init__(
+ self,
+ image: 'ImageReference',
+ keys: List['KeyReference'],
+ user_accounts: List['BareMetalServerInitializationUserAccount'],
+ ) -> None:
"""
Initialize a BareMetalServerInitialization object.
@@ -23081,7 +24911,8 @@ def __ne__(self, other: 'BareMetalServerInitialization') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerInitializationPrototype():
+
+class BareMetalServerInitializationPrototype:
"""
BareMetalServerInitializationPrototype.
@@ -23099,11 +24930,13 @@ class BareMetalServerInitializationPrototype():
the bare metal server.
"""
- def __init__(self,
- image: 'ImageIdentity',
- keys: List['KeyIdentity'],
- *,
- user_data: str = None) -> None:
+ def __init__(
+ self,
+ image: 'ImageIdentity',
+ keys: List['KeyIdentity'],
+ *,
+ user_data: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerInitializationPrototype object.
@@ -23183,22 +25016,117 @@ def __ne__(self, other: 'BareMetalServerInitializationPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerInitializationUserAccount():
+
+class BareMetalServerInitializationUserAccount:
"""
BareMetalServerInitializationUserAccount.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerInitializationUserAccount object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount']))
+ ", ".join(['BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount'])
+ )
raise Exception(msg)
-class BareMetalServerNetworkInterface():
+
+class BareMetalServerLifecycleReason:
+ """
+ BareMetalServerLifecycleReason.
+
+ :attr str code: A snake case string succinctly identifying the reason for this
+ lifecycle state.
+ :attr str message: An explanation of the reason for this lifecycle state.
+ :attr str more_info: (optional) Link to documentation about the reason for this
+ lifecycle state.
+ """
+
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
+ """
+ Initialize a BareMetalServerLifecycleReason object.
+
+ :param str code: A snake case string succinctly identifying the reason for
+ this lifecycle state.
+ :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) -> 'BareMetalServerLifecycleReason':
+ """Initialize a BareMetalServerLifecycleReason object from a json dictionary."""
+ args = {}
+ if 'code' in _dict:
+ args['code'] = _dict.get('code')
+ else:
+ raise ValueError('Required property \'code\' not present in BareMetalServerLifecycleReason JSON')
+ if 'message' in _dict:
+ args['message'] = _dict.get('message')
+ else:
+ raise ValueError('Required property \'message\' not present in BareMetalServerLifecycleReason JSON')
+ if 'more_info' in _dict:
+ args['more_info'] = _dict.get('more_info')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a BareMetalServerLifecycleReason 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 BareMetalServerLifecycleReason object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'BareMetalServerLifecycleReason') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'BareMetalServerLifecycleReason') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+ class CodeEnum(str, Enum):
+ """
+ A snake case string succinctly identifying the reason for this lifecycle state.
+ """
+
+ RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider'
+
+
+
+class BareMetalServerNetworkInterface:
"""
BareMetalServerNetworkInterface.
@@ -23254,23 +25182,25 @@ class BareMetalServerNetworkInterface():
:attr str type: The type of this bare metal server network interface.
"""
- def __init__(self,
- allow_ip_spoofing: bool,
- created_at: datetime,
- enable_infrastructure_nat: bool,
- floating_ips: List['FloatingIPReference'],
- href: str,
- id: str,
- interface_type: str,
- mac_address: str,
- name: str,
- port_speed: int,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- status: str,
- subnet: 'SubnetReference',
- type: str) -> None:
+ def __init__(
+ self,
+ allow_ip_spoofing: bool,
+ created_at: datetime,
+ enable_infrastructure_nat: bool,
+ floating_ips: List['FloatingIPReference'],
+ href: str,
+ id: str,
+ interface_type: str,
+ mac_address: str,
+ name: str,
+ port_speed: int,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ status: str,
+ subnet: 'SubnetReference',
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterface object.
@@ -23326,7 +25256,8 @@ def __init__(self,
:param str type: The type of this bare metal server network interface.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerNetworkInterfaceByHiperSocket', 'BareMetalServerNetworkInterfaceByPCI', 'BareMetalServerNetworkInterfaceByVLAN']))
+ ", ".join(['BareMetalServerNetworkInterfaceByHiperSocket', 'BareMetalServerNetworkInterfaceByPCI', 'BareMetalServerNetworkInterfaceByVLAN'])
+ )
raise Exception(msg)
@classmethod
@@ -23335,9 +25266,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterface':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'BareMetalServerNetworkInterface'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['BareMetalServerNetworkInterfaceByHiperSocket', 'BareMetalServerNetworkInterfaceByPCI', 'BareMetalServerNetworkInterfaceByVLAN']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -23387,6 +25318,7 @@ class InterfaceTypeEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
HIPERSOCKET = 'hipersocket'
PCI = 'pci'
VLAN = 'vlan'
@@ -23396,6 +25328,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
@@ -23403,6 +25336,7 @@ class StatusEnum(str, Enum):
"""
The status of the network interface.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -23413,11 +25347,13 @@ class TypeEnum(str, Enum):
"""
The type of this bare metal server network interface.
"""
+
PRIMARY = 'primary'
SECONDARY = 'secondary'
-class BareMetalServerNetworkInterfaceCollection():
+
+class BareMetalServerNetworkInterfaceCollection:
"""
BareMetalServerNetworkInterfaceCollection.
@@ -23433,13 +25369,15 @@ class BareMetalServerNetworkInterfaceCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'BareMetalServerNetworkInterfaceCollectionFirst',
- limit: int,
- network_interfaces: List['BareMetalServerNetworkInterface'],
- total_count: int,
- *,
- next: 'BareMetalServerNetworkInterfaceCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'BareMetalServerNetworkInterfaceCollectionFirst',
+ limit: int,
+ network_interfaces: List['BareMetalServerNetworkInterface'],
+ total_count: int,
+ *,
+ next: 'BareMetalServerNetworkInterfaceCollectionNext' = None,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfaceCollection object.
@@ -23534,15 +25472,18 @@ def __ne__(self, other: 'BareMetalServerNetworkInterfaceCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerNetworkInterfaceCollectionFirst():
+
+class BareMetalServerNetworkInterfaceCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfaceCollectionFirst object.
@@ -23590,7 +25531,8 @@ def __ne__(self, other: 'BareMetalServerNetworkInterfaceCollectionFirst') -> boo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerNetworkInterfaceCollectionNext():
+
+class BareMetalServerNetworkInterfaceCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -23598,8 +25540,10 @@ class BareMetalServerNetworkInterfaceCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfaceCollectionNext object.
@@ -23647,7 +25591,8 @@ def __ne__(self, other: 'BareMetalServerNetworkInterfaceCollectionNext') -> bool
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerNetworkInterfacePatch():
+
+class BareMetalServerNetworkInterfacePatch:
"""
BareMetalServerNetworkInterfacePatch.
@@ -23668,12 +25613,14 @@ class BareMetalServerNetworkInterfacePatch():
not be used by another network interface on the bare metal server.
"""
- def __init__(self,
- *,
- allow_ip_spoofing: bool = None,
- allowed_vlans: List[int] = None,
- enable_infrastructure_nat: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ allow_ip_spoofing: bool = None,
+ allowed_vlans: List[int] = None,
+ enable_infrastructure_nat: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfacePatch object.
@@ -23749,7 +25696,8 @@ def __ne__(self, other: 'BareMetalServerNetworkInterfacePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerNetworkInterfacePrototype():
+
+class BareMetalServerNetworkInterfacePrototype:
"""
BareMetalServerNetworkInterfacePrototype.
@@ -23802,15 +25750,17 @@ class BareMetalServerNetworkInterfacePrototype():
:attr SubnetIdentity subnet: The associated subnet.
"""
- def __init__(self,
- interface_type: str,
- subnet: 'SubnetIdentity',
- *,
- allow_ip_spoofing: bool = None,
- enable_infrastructure_nat: bool = None,
- name: str = None,
- primary_ip: 'NetworkInterfaceIPPrototype' = None,
- security_groups: List['SecurityGroupIdentity'] = None) -> None:
+ def __init__(
+ self,
+ interface_type: str,
+ subnet: 'SubnetIdentity',
+ *,
+ allow_ip_spoofing: bool = None,
+ enable_infrastructure_nat: bool = None,
+ name: str = None,
+ primary_ip: 'NetworkInterfaceIPPrototype' = None,
+ security_groups: List['SecurityGroupIdentity'] = None,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfacePrototype object.
@@ -23867,7 +25817,8 @@ def __init__(self,
security group is used.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype']))
+ ", ".join(['BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype'])
+ )
raise Exception(msg)
@classmethod
@@ -23876,9 +25827,9 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerNetworkInterfacePrototype':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'BareMetalServerNetworkInterfacePrototype'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype', 'BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -23927,12 +25878,14 @@ class InterfaceTypeEnum(str, Enum):
which traffic flows.
- Not supported on bare metal servers with a `cpu.architecture` of `s390x`.
"""
+
HIPERSOCKET = 'hipersocket'
PCI = 'pci'
VLAN = 'vlan'
-class BareMetalServerPatch():
+
+class BareMetalServerPatch:
"""
BareMetalServerPatch.
@@ -23948,11 +25901,13 @@ class BareMetalServerPatch():
(optional)
"""
- def __init__(self,
- *,
- enable_secure_boot: bool = None,
- name: str = None,
- trusted_platform_module: 'BareMetalServerTrustedPlatformModulePatch' = None) -> None:
+ def __init__(
+ self,
+ *,
+ enable_secure_boot: bool = None,
+ name: str = None,
+ trusted_platform_module: 'BareMetalServerTrustedPlatformModulePatch' = None,
+ ) -> None:
"""
Initialize a BareMetalServerPatch object.
@@ -24021,7 +25976,8 @@ def __ne__(self, other: 'BareMetalServerPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerPrimaryNetworkInterfacePrototype():
+
+class BareMetalServerPrimaryNetworkInterfacePrototype:
"""
BareMetalServerPrimaryNetworkInterfacePrototype.
@@ -24068,16 +26024,18 @@ class BareMetalServerPrimaryNetworkInterfacePrototype():
:attr SubnetIdentity subnet: The associated subnet.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- *,
- allow_ip_spoofing: bool = None,
- allowed_vlans: List[int] = None,
- enable_infrastructure_nat: bool = None,
- interface_type: str = None,
- name: str = None,
- primary_ip: 'NetworkInterfaceIPPrototype' = None,
- security_groups: List['SecurityGroupIdentity'] = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ *,
+ allow_ip_spoofing: bool = None,
+ allowed_vlans: List[int] = None,
+ enable_infrastructure_nat: bool = None,
+ interface_type: str = None,
+ name: str = None,
+ primary_ip: 'NetworkInterfaceIPPrototype' = None,
+ security_groups: List['SecurityGroupIdentity'] = None,
+ ) -> None:
"""
Initialize a BareMetalServerPrimaryNetworkInterfacePrototype object.
@@ -24231,15 +26189,19 @@ class InterfaceTypeEnum(str, Enum):
- Cannot directly use an IEEE 802.1q VLAN tag.
- Not supported on bare metal servers with a `cpu.architecture` of `s390x`.
"""
+
HIPERSOCKET = 'hipersocket'
PCI = 'pci'
-class BareMetalServerProfile():
+
+class BareMetalServerProfile:
"""
BareMetalServerProfile.
:attr BareMetalServerProfileBandwidth bandwidth:
+ :attr BareMetalServerProfileConsoleTypes console_types: The console type
+ configuration for a bare metal server with this profile.
:attr BareMetalServerProfileCPUArchitecture cpu_architecture:
:attr BareMetalServerProfileCPUCoreCount cpu_core_count:
:attr BareMetalServerProfileCPUSocketCount cpu_socket_count:
@@ -24249,6 +26211,7 @@ class BareMetalServerProfile():
:attr str href: The URL for this bare metal server profile.
:attr BareMetalServerProfileMemory memory:
:attr str name: The name for this bare metal server profile.
+ :attr BareMetalServerProfileNetworkInterfaceCount network_interface_count:
:attr BareMetalServerProfileOSArchitecture os_architecture:
:attr str resource_type: The resource type.
:attr BareMetalServerProfileSupportedTrustedPlatformModuleModes
@@ -24256,23 +26219,29 @@ class BareMetalServerProfile():
modes for this bare metal server profile.
"""
- def __init__(self,
- bandwidth: 'BareMetalServerProfileBandwidth',
- cpu_architecture: 'BareMetalServerProfileCPUArchitecture',
- cpu_core_count: 'BareMetalServerProfileCPUCoreCount',
- cpu_socket_count: 'BareMetalServerProfileCPUSocketCount',
- disks: List['BareMetalServerProfileDisk'],
- family: str,
- href: str,
- memory: 'BareMetalServerProfileMemory',
- name: str,
- os_architecture: 'BareMetalServerProfileOSArchitecture',
- resource_type: str,
- supported_trusted_platform_module_modes: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes') -> None:
+ def __init__(
+ self,
+ bandwidth: 'BareMetalServerProfileBandwidth',
+ console_types: 'BareMetalServerProfileConsoleTypes',
+ cpu_architecture: 'BareMetalServerProfileCPUArchitecture',
+ cpu_core_count: 'BareMetalServerProfileCPUCoreCount',
+ cpu_socket_count: 'BareMetalServerProfileCPUSocketCount',
+ disks: List['BareMetalServerProfileDisk'],
+ family: str,
+ href: str,
+ memory: 'BareMetalServerProfileMemory',
+ name: str,
+ network_interface_count: 'BareMetalServerProfileNetworkInterfaceCount',
+ os_architecture: 'BareMetalServerProfileOSArchitecture',
+ resource_type: str,
+ supported_trusted_platform_module_modes: 'BareMetalServerProfileSupportedTrustedPlatformModuleModes',
+ ) -> None:
"""
Initialize a BareMetalServerProfile object.
:param BareMetalServerProfileBandwidth bandwidth:
+ :param BareMetalServerProfileConsoleTypes console_types: The console type
+ configuration for a bare metal server with this profile.
:param BareMetalServerProfileCPUArchitecture cpu_architecture:
:param BareMetalServerProfileCPUCoreCount cpu_core_count:
:param BareMetalServerProfileCPUSocketCount cpu_socket_count:
@@ -24283,6 +26252,7 @@ def __init__(self,
:param str href: The URL for this bare metal server profile.
:param BareMetalServerProfileMemory memory:
:param str name: The name for this bare metal server profile.
+ :param BareMetalServerProfileNetworkInterfaceCount network_interface_count:
:param BareMetalServerProfileOSArchitecture os_architecture:
:param str resource_type: The resource type.
:param BareMetalServerProfileSupportedTrustedPlatformModuleModes
@@ -24290,6 +26260,7 @@ def __init__(self,
module modes for this bare metal server profile.
"""
self.bandwidth = bandwidth
+ self.console_types = console_types
self.cpu_architecture = cpu_architecture
self.cpu_core_count = cpu_core_count
self.cpu_socket_count = cpu_socket_count
@@ -24298,6 +26269,7 @@ def __init__(self,
self.href = href
self.memory = memory
self.name = name
+ self.network_interface_count = network_interface_count
self.os_architecture = os_architecture
self.resource_type = resource_type
self.supported_trusted_platform_module_modes = supported_trusted_platform_module_modes
@@ -24310,6 +26282,10 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfile':
args['bandwidth'] = _dict.get('bandwidth')
else:
raise ValueError('Required property \'bandwidth\' not present in BareMetalServerProfile JSON')
+ if 'console_types' in _dict:
+ args['console_types'] = BareMetalServerProfileConsoleTypes.from_dict(_dict.get('console_types'))
+ else:
+ raise ValueError('Required property \'console_types\' not present in BareMetalServerProfile JSON')
if 'cpu_architecture' in _dict:
args['cpu_architecture'] = BareMetalServerProfileCPUArchitecture.from_dict(_dict.get('cpu_architecture'))
else:
@@ -24342,6 +26318,10 @@ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfile':
args['name'] = _dict.get('name')
else:
raise ValueError('Required property \'name\' not present in BareMetalServerProfile JSON')
+ if 'network_interface_count' in _dict:
+ args['network_interface_count'] = _dict.get('network_interface_count')
+ else:
+ raise ValueError('Required property \'network_interface_count\' not present in BareMetalServerProfile JSON')
if 'os_architecture' in _dict:
args['os_architecture'] = BareMetalServerProfileOSArchitecture.from_dict(_dict.get('os_architecture'))
else:
@@ -24369,6 +26349,11 @@ def to_dict(self) -> Dict:
_dict['bandwidth'] = self.bandwidth
else:
_dict['bandwidth'] = self.bandwidth.to_dict()
+ if hasattr(self, 'console_types') and self.console_types is not None:
+ if isinstance(self.console_types, dict):
+ _dict['console_types'] = self.console_types
+ else:
+ _dict['console_types'] = self.console_types.to_dict()
if hasattr(self, 'cpu_architecture') and self.cpu_architecture is not None:
if isinstance(self.cpu_architecture, dict):
_dict['cpu_architecture'] = self.cpu_architecture
@@ -24403,6 +26388,11 @@ def to_dict(self) -> Dict:
_dict['memory'] = self.memory.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
+ if hasattr(self, 'network_interface_count') and self.network_interface_count is not None:
+ if isinstance(self.network_interface_count, dict):
+ _dict['network_interface_count'] = self.network_interface_count
+ else:
+ _dict['network_interface_count'] = self.network_interface_count.to_dict()
if hasattr(self, 'os_architecture') and self.os_architecture is not None:
if isinstance(self.os_architecture, dict):
_dict['os_architecture'] = self.os_architecture
@@ -24439,25 +26429,31 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile'
-class BareMetalServerProfileBandwidth():
+
+class BareMetalServerProfileBandwidth:
"""
BareMetalServerProfileBandwidth.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileBandwidth object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileBandwidthFixed', 'BareMetalServerProfileBandwidthRange', 'BareMetalServerProfileBandwidthEnum', 'BareMetalServerProfileBandwidthDependent']))
+ ", ".join(['BareMetalServerProfileBandwidthFixed', 'BareMetalServerProfileBandwidthRange', 'BareMetalServerProfileBandwidthEnum', 'BareMetalServerProfileBandwidthDependent'])
+ )
raise Exception(msg)
-class BareMetalServerProfileCPUArchitecture():
+
+class BareMetalServerProfileCPUArchitecture:
"""
BareMetalServerProfileCPUArchitecture.
@@ -24467,11 +26463,13 @@ class BareMetalServerProfileCPUArchitecture():
:attr str value: The CPU architecture for a bare metal server with this profile.
"""
- def __init__(self,
- type: str,
- value: str,
- *,
- default: str = None) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: str,
+ *,
+ default: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUArchitecture object.
@@ -24539,40 +26537,50 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class BareMetalServerProfileCPUCoreCount():
+
+class BareMetalServerProfileCPUCoreCount:
"""
BareMetalServerProfileCPUCoreCount.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUCoreCount object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileCPUCoreCountFixed', 'BareMetalServerProfileCPUCoreCountRange', 'BareMetalServerProfileCPUCoreCountEnum', 'BareMetalServerProfileCPUCoreCountDependent']))
+ ", ".join(['BareMetalServerProfileCPUCoreCountFixed', 'BareMetalServerProfileCPUCoreCountRange', 'BareMetalServerProfileCPUCoreCountEnum', 'BareMetalServerProfileCPUCoreCountDependent'])
+ )
raise Exception(msg)
-class BareMetalServerProfileCPUSocketCount():
+
+class BareMetalServerProfileCPUSocketCount:
"""
BareMetalServerProfileCPUSocketCount.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUSocketCount object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileCPUSocketCountFixed', 'BareMetalServerProfileCPUSocketCountRange', 'BareMetalServerProfileCPUSocketCountEnum', 'BareMetalServerProfileCPUSocketCountDependent']))
+ ", ".join(['BareMetalServerProfileCPUSocketCountFixed', 'BareMetalServerProfileCPUSocketCountRange', 'BareMetalServerProfileCPUSocketCountEnum', 'BareMetalServerProfileCPUSocketCountDependent'])
+ )
raise Exception(msg)
-class BareMetalServerProfileCollection():
+
+class BareMetalServerProfileCollection:
"""
BareMetalServerProfileCollection.
@@ -24588,13 +26596,15 @@ class BareMetalServerProfileCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'BareMetalServerProfileCollectionFirst',
- limit: int,
- profiles: List['BareMetalServerProfile'],
- total_count: int,
- *,
- next: 'BareMetalServerProfileCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'BareMetalServerProfileCollectionFirst',
+ limit: int,
+ profiles: List['BareMetalServerProfile'],
+ total_count: int,
+ *,
+ next: 'BareMetalServerProfileCollectionNext' = None,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCollection object.
@@ -24689,15 +26699,18 @@ def __ne__(self, other: 'BareMetalServerProfileCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerProfileCollectionFirst():
+
+class BareMetalServerProfileCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCollectionFirst object.
@@ -24745,7 +26758,8 @@ def __ne__(self, other: 'BareMetalServerProfileCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerProfileCollectionNext():
+
+class BareMetalServerProfileCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -24753,8 +26767,10 @@ class BareMetalServerProfileCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCollectionNext object.
@@ -24802,7 +26818,96 @@ def __ne__(self, other: 'BareMetalServerProfileCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerProfileDisk():
+
+class BareMetalServerProfileConsoleTypes:
+ """
+ The console type configuration for a bare metal server with this profile.
+
+ :attr str type: The type for this profile field.
+ :attr List[str] values: The console types for a bare metal server with this
+ profile.
+ """
+
+ def __init__(
+ self,
+ type: str,
+ values: List[str],
+ ) -> None:
+ """
+ Initialize a BareMetalServerProfileConsoleTypes object.
+
+ :param str type: The type for this profile field.
+ :param List[str] values: The console types for a bare metal server with
+ this profile.
+ """
+ self.type = type
+ self.values = values
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileConsoleTypes':
+ """Initialize a BareMetalServerProfileConsoleTypes object from a json dictionary."""
+ args = {}
+ if 'type' in _dict:
+ args['type'] = _dict.get('type')
+ else:
+ raise ValueError('Required property \'type\' not present in BareMetalServerProfileConsoleTypes JSON')
+ if 'values' in _dict:
+ args['values'] = _dict.get('values')
+ else:
+ raise ValueError('Required property \'values\' not present in BareMetalServerProfileConsoleTypes JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a BareMetalServerProfileConsoleTypes 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 BareMetalServerProfileConsoleTypes object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'BareMetalServerProfileConsoleTypes') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'BareMetalServerProfileConsoleTypes') -> 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):
+ """
+ A console type.
+ """
+
+ SERIAL = 'serial'
+ VNC = 'vnc'
+
+
+
+class BareMetalServerProfileDisk:
"""
Disks provided by this profile.
@@ -24811,10 +26916,12 @@ class BareMetalServerProfileDisk():
:attr BareMetalServerProfileDiskSupportedInterfaces supported_interface_types:
"""
- def __init__(self,
- quantity: 'BareMetalServerProfileDiskQuantity',
- size: 'BareMetalServerProfileDiskSize',
- supported_interface_types: 'BareMetalServerProfileDiskSupportedInterfaces') -> None:
+ def __init__(
+ self,
+ quantity: 'BareMetalServerProfileDiskQuantity',
+ size: 'BareMetalServerProfileDiskSize',
+ supported_interface_types: 'BareMetalServerProfileDiskSupportedInterfaces',
+ ) -> None:
"""
Initialize a BareMetalServerProfileDisk object.
@@ -24888,37 +26995,46 @@ def __ne__(self, other: 'BareMetalServerProfileDisk') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class BareMetalServerProfileDiskQuantity():
+
+class BareMetalServerProfileDiskQuantity:
"""
BareMetalServerProfileDiskQuantity.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskQuantity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileDiskQuantityFixed', 'BareMetalServerProfileDiskQuantityRange', 'BareMetalServerProfileDiskQuantityEnum', 'BareMetalServerProfileDiskQuantityDependent']))
+ ", ".join(['BareMetalServerProfileDiskQuantityFixed', 'BareMetalServerProfileDiskQuantityRange', 'BareMetalServerProfileDiskQuantityEnum', 'BareMetalServerProfileDiskQuantityDependent'])
+ )
raise Exception(msg)
-class BareMetalServerProfileDiskSize():
+
+class BareMetalServerProfileDiskSize:
"""
BareMetalServerProfileDiskSize.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskSize object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileDiskSizeFixed', 'BareMetalServerProfileDiskSizeRange', 'BareMetalServerProfileDiskSizeEnum', 'BareMetalServerProfileDiskSizeDependent']))
+ ", ".join(['BareMetalServerProfileDiskSizeFixed', 'BareMetalServerProfileDiskSizeRange', 'BareMetalServerProfileDiskSizeEnum', 'BareMetalServerProfileDiskSizeDependent'])
+ )
raise Exception(msg)
-class BareMetalServerProfileDiskSupportedInterfaces():
+
+class BareMetalServerProfileDiskSupportedInterfaces:
"""
BareMetalServerProfileDiskSupportedInterfaces.
@@ -24935,10 +27051,12 @@ class BareMetalServerProfileDiskSupportedInterfaces():
disk.
"""
- def __init__(self,
- default: str,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ default: str,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskSupportedInterfaces object.
@@ -25021,6 +27139,7 @@ class DefaultEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
FCP = 'fcp'
NVME = 'nvme'
SATA = 'sata'
@@ -25030,6 +27149,7 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
@@ -25044,42 +27164,71 @@ class ValuesEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
FCP = 'fcp'
NVME = 'nvme'
SATA = 'sata'
-class BareMetalServerProfileIdentity():
+
+class BareMetalServerProfileIdentity:
"""
Identifies a bare metal server profile by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileIdentityByName', 'BareMetalServerProfileIdentityByHref']))
+ ", ".join(['BareMetalServerProfileIdentityByName', 'BareMetalServerProfileIdentityByHref'])
+ )
raise Exception(msg)
-class BareMetalServerProfileMemory():
+
+class BareMetalServerProfileMemory:
"""
BareMetalServerProfileMemory.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a BareMetalServerProfileMemory object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['BareMetalServerProfileMemoryFixed', 'BareMetalServerProfileMemoryRange', 'BareMetalServerProfileMemoryEnum', 'BareMetalServerProfileMemoryDependent']))
+ ", ".join(['BareMetalServerProfileMemoryFixed', 'BareMetalServerProfileMemoryRange', 'BareMetalServerProfileMemoryEnum', 'BareMetalServerProfileMemoryDependent'])
+ )
raise Exception(msg)
-class BareMetalServerProfileOSArchitecture():
+
+class BareMetalServerProfileNetworkInterfaceCount:
+ """
+ BareMetalServerProfileNetworkInterfaceCount.
+
+ """
+
+ def __init__(
+ self,
+ ) -> None:
+ """
+ Initialize a BareMetalServerProfileNetworkInterfaceCount object.
+
+ """
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['BareMetalServerProfileNetworkInterfaceCountRange', 'BareMetalServerProfileNetworkInterfaceCountDependent'])
+ )
+ raise Exception(msg)
+
+
+class BareMetalServerProfileOSArchitecture:
"""
BareMetalServerProfileOSArchitecture.
@@ -25090,10 +27239,12 @@ class BareMetalServerProfileOSArchitecture():
with this profile.
"""
- def __init__(self,
- default: str,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ default: str,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a BareMetalServerProfileOSArchitecture object.
@@ -25163,10 +27314,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
-class BareMetalServerProfileReference():
+
+class BareMetalServerProfileReference:
"""
BareMetalServerProfileReference.
@@ -25175,10 +27328,12 @@ class BareMetalServerProfileReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- name: str,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ resource_type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileReference object.
@@ -25246,10 +27401,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BARE_METAL_SERVER_PROFILE = 'bare_metal_server_profile'
-class BareMetalServerProfileSupportedTrustedPlatformModuleModes():
+
+class BareMetalServerProfileSupportedTrustedPlatformModuleModes:
"""
The supported trusted platform module modes for this bare metal server profile.
@@ -25257,9 +27414,11 @@ class BareMetalServerProfileSupportedTrustedPlatformModuleModes():
:attr List[str] values: The supported trusted platform module modes.
"""
- def __init__(self,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a BareMetalServerProfileSupportedTrustedPlatformModuleModes object.
@@ -25319,6 +27478,7 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
@@ -25332,11 +27492,13 @@ class ValuesEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
DISABLED = 'disabled'
TPM_2 = 'tpm_2'
-class BareMetalServerStatusReason():
+
+class BareMetalServerStatusReason:
"""
BareMetalServerStatusReason.
@@ -25350,11 +27512,13 @@ class BareMetalServerStatusReason():
:attr str more_info: (optional) Link to documentation about this status reason.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerStatusReason object.
@@ -25434,6 +27598,7 @@ class CodeEnum(str, Enum):
- `cannot_start_ip_address`: An error occurred while allocating an IP address
- `cannot_start_network`: An error occurred while allocating network resources.
"""
+
CANNOT_START = 'cannot_start'
CANNOT_START_CAPACITY = 'cannot_start_capacity'
CANNOT_START_COMPUTE = 'cannot_start_compute'
@@ -25441,7 +27606,8 @@ class CodeEnum(str, Enum):
CANNOT_START_NETWORK = 'cannot_start_network'
-class BareMetalServerTrustedPlatformModule():
+
+class BareMetalServerTrustedPlatformModule:
"""
BareMetalServerTrustedPlatformModule.
@@ -25456,10 +27622,12 @@ class BareMetalServerTrustedPlatformModule():
:attr List[str] supported_modes: The supported trusted platform module modes.
"""
- def __init__(self,
- enabled: bool,
- mode: str,
- supported_modes: List[str]) -> None:
+ def __init__(
+ self,
+ enabled: bool,
+ mode: str,
+ supported_modes: List[str],
+ ) -> None:
"""
Initialize a BareMetalServerTrustedPlatformModule object.
@@ -25541,6 +27709,7 @@ class ModeEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
DISABLED = 'disabled'
TPM_2 = 'tpm_2'
@@ -25555,11 +27724,13 @@ class SupportedModesEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
DISABLED = 'disabled'
TPM_2 = 'tpm_2'
-class BareMetalServerTrustedPlatformModulePatch():
+
+class BareMetalServerTrustedPlatformModulePatch:
"""
BareMetalServerTrustedPlatformModulePatch.
@@ -25569,9 +27740,11 @@ class BareMetalServerTrustedPlatformModulePatch():
`status` must be `stopped`.
"""
- def __init__(self,
- *,
- mode: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ mode: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerTrustedPlatformModulePatch object.
@@ -25628,11 +27801,13 @@ class ModeEnum(str, Enum):
For the trusted platform module mode to be changed, the bare metal server `status`
must be `stopped`.
"""
+
DISABLED = 'disabled'
TPM_2 = 'tpm_2'
-class BareMetalServerTrustedPlatformModulePrototype():
+
+class BareMetalServerTrustedPlatformModulePrototype:
"""
BareMetalServerTrustedPlatformModulePrototype.
@@ -25641,9 +27816,11 @@ class BareMetalServerTrustedPlatformModulePrototype():
`supported_trusted_platform_module_modes`.
"""
- def __init__(self,
- *,
- mode: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ mode: str = None,
+ ) -> None:
"""
Initialize a BareMetalServerTrustedPlatformModulePrototype object.
@@ -25696,11 +27873,13 @@ class ModeEnum(str, Enum):
The trusted platform module mode to use. The specified value must be listed in the
bare metal server profile's `supported_trusted_platform_module_modes`.
"""
+
DISABLED = 'disabled'
TPM_2 = 'tpm_2'
-class CatalogOfferingIdentity():
+
+class CatalogOfferingIdentity:
"""
Identifies a
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering
@@ -25708,16 +27887,20 @@ class CatalogOfferingIdentity():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a CatalogOfferingIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['CatalogOfferingIdentityCatalogOfferingByCRN']))
+ ", ".join(['CatalogOfferingIdentityCatalogOfferingByCRN'])
+ )
raise Exception(msg)
-class CatalogOfferingVersionIdentity():
+
+class CatalogOfferingVersionIdentity:
"""
Identifies a version of a
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering
@@ -25725,16 +27908,20 @@ class CatalogOfferingVersionIdentity():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a CatalogOfferingVersionIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN']))
+ ", ".join(['CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN'])
+ )
raise Exception(msg)
-class CatalogOfferingVersionReference():
+
+class CatalogOfferingVersionReference:
"""
CatalogOfferingVersionReference.
@@ -25743,8 +27930,10 @@ class CatalogOfferingVersionReference():
offering.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a CatalogOfferingVersionReference object.
@@ -25794,30 +27983,37 @@ def __ne__(self, other: 'CatalogOfferingVersionReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class CertificateInstanceIdentity():
+
+class CertificateInstanceIdentity:
"""
Identifies a certificate instance by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a CertificateInstanceIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['CertificateInstanceIdentityByCRN']))
+ ", ".join(['CertificateInstanceIdentityByCRN'])
+ )
raise Exception(msg)
-class CertificateInstanceReference():
+
+class CertificateInstanceReference:
"""
CertificateInstanceReference.
:attr str crn: The CRN for this certificate instance.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a CertificateInstanceReference object.
@@ -25865,30 +28061,187 @@ def __ne__(self, other: 'CertificateInstanceReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DNSInstanceIdentity():
+
+class CloudObjectStorageBucketIdentity:
+ """
+ Identifies a Cloud Object Storage bucket by a unique property.
+
+ """
+
+ def __init__(
+ self,
+ ) -> None:
+ """
+ Initialize a CloudObjectStorageBucketIdentity object.
+
+ """
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName', 'CloudObjectStorageBucketIdentityByCRN'])
+ )
+ raise Exception(msg)
+
+
+class CloudObjectStorageBucketReference:
+ """
+ CloudObjectStorageBucketReference.
+
+ :attr str crn: The CRN of this Cloud Object Storage bucket.
+ :attr str name: The globally unique name of this Cloud Object Storage bucket.
+ """
+
+ def __init__(
+ self,
+ crn: str,
+ name: str,
+ ) -> None:
+ """
+ Initialize a CloudObjectStorageBucketReference object.
+
+ :param str crn: The CRN of this Cloud Object Storage bucket.
+ :param str name: The globally unique name of this Cloud Object Storage
+ bucket.
+ """
+ self.crn = crn
+ self.name = name
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketReference':
+ """Initialize a CloudObjectStorageBucketReference object from a json dictionary."""
+ args = {}
+ if 'crn' in _dict:
+ args['crn'] = _dict.get('crn')
+ else:
+ raise ValueError('Required property \'crn\' not present in CloudObjectStorageBucketReference JSON')
+ if 'name' in _dict:
+ args['name'] = _dict.get('name')
+ else:
+ raise ValueError('Required property \'name\' not present in CloudObjectStorageBucketReference JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a CloudObjectStorageBucketReference 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, 'name') and self.name is not None:
+ _dict['name'] = self.name
+ 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 CloudObjectStorageBucketReference object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'CloudObjectStorageBucketReference') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'CloudObjectStorageBucketReference') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class CloudObjectStorageObjectReference:
+ """
+ CloudObjectStorageObjectReference.
+
+ :attr str name: The name of this Cloud Object Storage object. Names are unique
+ within a Cloud Object Storage bucket.
+ """
+
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
+ """
+ Initialize a CloudObjectStorageObjectReference object.
+
+ :param str name: The name of this Cloud Object Storage object. Names are
+ unique within a Cloud Object Storage bucket.
+ """
+ self.name = name
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageObjectReference':
+ """Initialize a CloudObjectStorageObjectReference object from a json dictionary."""
+ args = {}
+ if 'name' in _dict:
+ args['name'] = _dict.get('name')
+ else:
+ raise ValueError('Required property \'name\' not present in CloudObjectStorageObjectReference JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a CloudObjectStorageObjectReference object from a json dictionary."""
+ return cls.from_dict(_dict)
+
+ def to_dict(self) -> Dict:
+ """Return a json dictionary representing this model."""
+ _dict = {}
+ if hasattr(self, 'name') and self.name is not None:
+ _dict['name'] = self.name
+ 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 CloudObjectStorageObjectReference object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'CloudObjectStorageObjectReference') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'CloudObjectStorageObjectReference') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class DNSInstanceIdentity:
"""
Identifies a DNS instance by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DNSInstanceIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DNSInstanceIdentityByCRN']))
+ ", ".join(['DNSInstanceIdentityByCRN'])
+ )
raise Exception(msg)
-class DNSInstanceReference():
+
+class DNSInstanceReference:
"""
DNSInstanceReference.
:attr str crn: The CRN for this DNS instance.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a DNSInstanceReference object.
@@ -25936,30 +28289,37 @@ def __ne__(self, other: 'DNSInstanceReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DNSZoneIdentity():
+
+class DNSZoneIdentity:
"""
Identifies a DNS zone by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DNSZoneIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DNSZoneIdentityById']))
+ ", ".join(['DNSZoneIdentityById'])
+ )
raise Exception(msg)
-class DNSZoneReference():
+
+class DNSZoneReference:
"""
DNSZoneReference.
:attr str id:
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a DNSZoneReference object.
@@ -26007,7 +28367,8 @@ def __ne__(self, other: 'DNSZoneReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHost():
+
+class DedicatedHost:
"""
DedicatedHost.
@@ -26050,29 +28411,31 @@ class DedicatedHost():
:attr ZoneReference zone: The zone this dedicated host resides in.
"""
- def __init__(self,
- available_memory: int,
- available_vcpu: 'VCPU',
- created_at: datetime,
- crn: str,
- disks: List['DedicatedHostDisk'],
- group: 'DedicatedHostGroupReference',
- href: str,
- id: str,
- instance_placement_enabled: bool,
- instances: List['InstanceReference'],
- lifecycle_state: str,
- memory: int,
- name: str,
- profile: 'DedicatedHostProfileReference',
- provisionable: bool,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- socket_count: int,
- state: str,
- supported_instance_profiles: List['InstanceProfileReference'],
- vcpu: 'VCPU',
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ available_memory: int,
+ available_vcpu: 'VCPU',
+ created_at: datetime,
+ crn: str,
+ disks: List['DedicatedHostDisk'],
+ group: 'DedicatedHostGroupReference',
+ href: str,
+ id: str,
+ instance_placement_enabled: bool,
+ instances: List['InstanceReference'],
+ lifecycle_state: str,
+ memory: int,
+ name: str,
+ profile: 'DedicatedHostProfileReference',
+ provisionable: bool,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ socket_count: int,
+ state: str,
+ supported_instance_profiles: List['InstanceProfileReference'],
+ vcpu: 'VCPU',
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a DedicatedHost object.
@@ -26344,6 +28707,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the dedicated host.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -26357,6 +28721,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST = 'dedicated_host'
@@ -26368,13 +28733,15 @@ class StateEnum(str, Enum):
processing and surface the error, or bypass the dedicated host on which the
unexpected property value was encountered.
"""
+
AVAILABLE = 'available'
DEGRADED = 'degraded'
MIGRATING = 'migrating'
UNAVAILABLE = 'unavailable'
-class DedicatedHostCollection():
+
+class DedicatedHostCollection:
"""
DedicatedHostCollection.
@@ -26388,13 +28755,15 @@ class DedicatedHostCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- dedicated_hosts: List['DedicatedHost'],
- first: 'DedicatedHostCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'DedicatedHostCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ dedicated_hosts: List['DedicatedHost'],
+ first: 'DedicatedHostCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'DedicatedHostCollectionNext' = None,
+ ) -> None:
"""
Initialize a DedicatedHostCollection object.
@@ -26488,15 +28857,18 @@ def __ne__(self, other: 'DedicatedHostCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostCollectionFirst():
+
+class DedicatedHostCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostCollectionFirst object.
@@ -26544,7 +28916,8 @@ def __ne__(self, other: 'DedicatedHostCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostCollectionNext():
+
+class DedicatedHostCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -26552,8 +28925,10 @@ class DedicatedHostCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostCollectionNext object.
@@ -26601,7 +28976,8 @@ def __ne__(self, other: 'DedicatedHostCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostDisk():
+
+class DedicatedHostDisk:
"""
DedicatedHostDisk.
@@ -26629,20 +29005,22 @@ class DedicatedHostDisk():
supported for this dedicated host disk.
"""
- def __init__(self,
- available: int,
- created_at: datetime,
- href: str,
- id: str,
- instance_disks: List['InstanceDiskReference'],
- interface_type: str,
- name: str,
- provisionable: bool,
- resource_type: str,
- size: int,
- supported_instance_interface_types: List[str],
- *,
- lifecycle_state: str = None) -> None:
+ def __init__(
+ self,
+ available: int,
+ created_at: datetime,
+ href: str,
+ id: str,
+ instance_disks: List['InstanceDiskReference'],
+ interface_type: str,
+ name: str,
+ provisionable: bool,
+ resource_type: str,
+ size: int,
+ supported_instance_interface_types: List[str],
+ *,
+ lifecycle_state: str = None,
+ ) -> None:
"""
Initialize a DedicatedHostDisk object.
@@ -26800,6 +29178,7 @@ class InterfaceTypeEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
@@ -26807,6 +29186,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of this dedicated host disk.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -26820,6 +29200,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST_DISK = 'dedicated_host_disk'
@@ -26831,19 +29212,23 @@ class SupportedInstanceInterfaceTypesEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
VIRTIO_BLK = 'virtio_blk'
-class DedicatedHostDiskCollection():
+
+class DedicatedHostDiskCollection:
"""
DedicatedHostDiskCollection.
:attr List[DedicatedHostDisk] disks: Collection of the dedicated host's disks.
"""
- def __init__(self,
- disks: List['DedicatedHostDisk']) -> None:
+ def __init__(
+ self,
+ disks: List['DedicatedHostDisk'],
+ ) -> None:
"""
Initialize a DedicatedHostDiskCollection object.
@@ -26898,7 +29283,8 @@ def __ne__(self, other: 'DedicatedHostDiskCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostDiskPatch():
+
+class DedicatedHostDiskPatch:
"""
DedicatedHostDiskPatch.
@@ -26906,9 +29292,11 @@ class DedicatedHostDiskPatch():
not be used by another disk on the dedicated host.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a DedicatedHostDiskPatch object.
@@ -26955,7 +29343,8 @@ def __ne__(self, other: 'DedicatedHostDiskPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostGroup():
+
+class DedicatedHostGroup:
"""
DedicatedHostGroup.
@@ -26978,19 +29367,21 @@ class DedicatedHostGroup():
:attr ZoneReference zone: The zone this dedicated host group resides in.
"""
- def __init__(self,
- class_: str,
- created_at: datetime,
- crn: str,
- dedicated_hosts: List['DedicatedHostReference'],
- family: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- supported_instance_profiles: List['InstanceProfileReference'],
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ class_: str,
+ created_at: datetime,
+ crn: str,
+ dedicated_hosts: List['DedicatedHostReference'],
+ family: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ supported_instance_profiles: List['InstanceProfileReference'],
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a DedicatedHostGroup object.
@@ -27155,6 +29546,7 @@ class FamilyEnum(str, Enum):
"""
The dedicated host profile family for hosts in this group.
"""
+
BALANCED = 'balanced'
COMPUTE = 'compute'
MEMORY = 'memory'
@@ -27164,10 +29556,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST_GROUP = 'dedicated_host_group'
-class DedicatedHostGroupCollection():
+
+class DedicatedHostGroupCollection:
"""
DedicatedHostGroupCollection.
@@ -27182,13 +29576,15 @@ class DedicatedHostGroupCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'DedicatedHostGroupCollectionFirst',
- groups: List['DedicatedHostGroup'],
- limit: int,
- total_count: int,
- *,
- next: 'DedicatedHostGroupCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'DedicatedHostGroupCollectionFirst',
+ groups: List['DedicatedHostGroup'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'DedicatedHostGroupCollectionNext' = None,
+ ) -> None:
"""
Initialize a DedicatedHostGroupCollection object.
@@ -27283,15 +29679,18 @@ def __ne__(self, other: 'DedicatedHostGroupCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostGroupCollectionFirst():
+
+class DedicatedHostGroupCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostGroupCollectionFirst object.
@@ -27339,7 +29738,8 @@ def __ne__(self, other: 'DedicatedHostGroupCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostGroupCollectionNext():
+
+class DedicatedHostGroupCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -27347,8 +29747,10 @@ class DedicatedHostGroupCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostGroupCollectionNext object.
@@ -27396,22 +29798,27 @@ def __ne__(self, other: 'DedicatedHostGroupCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostGroupIdentity():
+
+class DedicatedHostGroupIdentity:
"""
Identifies a dedicated host group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DedicatedHostGroupIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DedicatedHostGroupIdentityById', 'DedicatedHostGroupIdentityByCRN', 'DedicatedHostGroupIdentityByHref']))
+ ", ".join(['DedicatedHostGroupIdentityById', 'DedicatedHostGroupIdentityByCRN', 'DedicatedHostGroupIdentityByHref'])
+ )
raise Exception(msg)
-class DedicatedHostGroupPatch():
+
+class DedicatedHostGroupPatch:
"""
DedicatedHostGroupPatch.
@@ -27419,9 +29826,11 @@ class DedicatedHostGroupPatch():
not be used by another dedicated host group in the region.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a DedicatedHostGroupPatch object.
@@ -27468,7 +29877,8 @@ def __ne__(self, other: 'DedicatedHostGroupPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostGroupPrototypeDedicatedHostByZoneContext():
+
+class DedicatedHostGroupPrototypeDedicatedHostByZoneContext:
"""
DedicatedHostGroupPrototypeDedicatedHostByZoneContext.
@@ -27479,10 +29889,12 @@ class DedicatedHostGroupPrototypeDedicatedHostByZoneContext():
use. If unspecified, the host's resource group is used.
"""
- def __init__(self,
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a DedicatedHostGroupPrototypeDedicatedHostByZoneContext object.
@@ -27540,7 +29952,8 @@ def __ne__(self, other: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext')
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostGroupReference():
+
+class DedicatedHostGroupReference:
"""
DedicatedHostGroupReference.
@@ -27555,14 +29968,16 @@ class DedicatedHostGroupReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'DedicatedHostGroupReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'DedicatedHostGroupReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a DedicatedHostGroupReference object.
@@ -27659,10 +30074,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST_GROUP = 'dedicated_host_group'
-class DedicatedHostGroupReferenceDeleted():
+
+class DedicatedHostGroupReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -27670,8 +30087,10 @@ class DedicatedHostGroupReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a DedicatedHostGroupReferenceDeleted object.
@@ -27719,7 +30138,8 @@ def __ne__(self, other: 'DedicatedHostGroupReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostPatch():
+
+class DedicatedHostPatch:
"""
DedicatedHostPatch.
@@ -27729,10 +30149,12 @@ class DedicatedHostPatch():
be used by another dedicated host in the region.
"""
- def __init__(self,
- *,
- instance_placement_enabled: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ instance_placement_enabled: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a DedicatedHostPatch object.
@@ -27786,7 +30208,8 @@ def __ne__(self, other: 'DedicatedHostPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostProfile():
+
+class DedicatedHostProfile:
"""
DedicatedHostProfile.
@@ -27809,18 +30232,20 @@ class DedicatedHostProfile():
:attr DedicatedHostProfileVCPUManufacturer vcpu_manufacturer:
"""
- def __init__(self,
- class_: str,
- disks: List['DedicatedHostProfileDisk'],
- family: str,
- href: str,
- memory: 'DedicatedHostProfileMemory',
- name: str,
- socket_count: 'DedicatedHostProfileSocket',
- supported_instance_profiles: List['InstanceProfileReference'],
- vcpu_architecture: 'DedicatedHostProfileVCPUArchitecture',
- vcpu_count: 'DedicatedHostProfileVCPU',
- vcpu_manufacturer: 'DedicatedHostProfileVCPUManufacturer') -> None:
+ def __init__(
+ self,
+ class_: str,
+ disks: List['DedicatedHostProfileDisk'],
+ family: str,
+ href: str,
+ memory: 'DedicatedHostProfileMemory',
+ name: str,
+ socket_count: 'DedicatedHostProfileSocket',
+ supported_instance_profiles: List['InstanceProfileReference'],
+ vcpu_architecture: 'DedicatedHostProfileVCPUArchitecture',
+ vcpu_count: 'DedicatedHostProfileVCPU',
+ vcpu_manufacturer: 'DedicatedHostProfileVCPUManufacturer',
+ ) -> None:
"""
Initialize a DedicatedHostProfile object.
@@ -27992,12 +30417,14 @@ class FamilyEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
BALANCED = 'balanced'
COMPUTE = 'compute'
MEMORY = 'memory'
-class DedicatedHostProfileCollection():
+
+class DedicatedHostProfileCollection:
"""
DedicatedHostProfileCollection.
@@ -28013,13 +30440,15 @@ class DedicatedHostProfileCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'DedicatedHostProfileCollectionFirst',
- limit: int,
- profiles: List['DedicatedHostProfile'],
- total_count: int,
- *,
- next: 'DedicatedHostProfileCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'DedicatedHostProfileCollectionFirst',
+ limit: int,
+ profiles: List['DedicatedHostProfile'],
+ total_count: int,
+ *,
+ next: 'DedicatedHostProfileCollectionNext' = None,
+ ) -> None:
"""
Initialize a DedicatedHostProfileCollection object.
@@ -28114,15 +30543,18 @@ def __ne__(self, other: 'DedicatedHostProfileCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostProfileCollectionFirst():
+
+class DedicatedHostProfileCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileCollectionFirst object.
@@ -28170,7 +30602,8 @@ def __ne__(self, other: 'DedicatedHostProfileCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostProfileCollectionNext():
+
+class DedicatedHostProfileCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -28178,8 +30611,10 @@ class DedicatedHostProfileCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileCollectionNext object.
@@ -28227,7 +30662,8 @@ def __ne__(self, other: 'DedicatedHostProfileCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostProfileDisk():
+
+class DedicatedHostProfileDisk:
"""
Disks provided by this profile.
@@ -28239,11 +30675,13 @@ class DedicatedHostProfileDisk():
supported_instance_interface_types:
"""
- def __init__(self,
- interface_type: 'DedicatedHostProfileDiskInterface',
- quantity: 'DedicatedHostProfileDiskQuantity',
- size: 'DedicatedHostProfileDiskSize',
- supported_instance_interface_types: 'DedicatedHostProfileDiskSupportedInterfaces') -> None:
+ def __init__(
+ self,
+ interface_type: 'DedicatedHostProfileDiskInterface',
+ quantity: 'DedicatedHostProfileDiskQuantity',
+ size: 'DedicatedHostProfileDiskSize',
+ supported_instance_interface_types: 'DedicatedHostProfileDiskSupportedInterfaces',
+ ) -> None:
"""
Initialize a DedicatedHostProfileDisk object.
@@ -28330,7 +30768,8 @@ def __ne__(self, other: 'DedicatedHostProfileDisk') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostProfileDiskInterface():
+
+class DedicatedHostProfileDiskInterface:
"""
DedicatedHostProfileDiskInterface.
@@ -28343,9 +30782,11 @@ class DedicatedHostProfileDiskInterface():
property value was encountered.
"""
- def __init__(self,
- type: str,
- value: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileDiskInterface object.
@@ -28410,6 +30851,7 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
@@ -28421,10 +30863,12 @@ class ValueEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
-class DedicatedHostProfileDiskQuantity():
+
+class DedicatedHostProfileDiskQuantity:
"""
The number of disks of this type for a dedicated host with this profile.
@@ -28432,9 +30876,11 @@ class DedicatedHostProfileDiskQuantity():
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a DedicatedHostProfileDiskQuantity object.
@@ -28494,10 +30940,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class DedicatedHostProfileDiskSize():
+
+class DedicatedHostProfileDiskSize:
"""
The size of the disk in GB (gigabytes).
@@ -28505,9 +30953,11 @@ class DedicatedHostProfileDiskSize():
:attr int value: The size of the disk in GB (gigabytes).
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a DedicatedHostProfileDiskSize object.
@@ -28567,10 +31017,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class DedicatedHostProfileDiskSupportedInterfaces():
+
+class DedicatedHostProfileDiskSupportedInterfaces:
"""
DedicatedHostProfileDiskSupportedInterfaces.
@@ -28579,9 +31031,11 @@ class DedicatedHostProfileDiskSupportedInterfaces():
host with this profile.
"""
- def __init__(self,
- type: str,
- value: List[str]) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: List[str],
+ ) -> None:
"""
Initialize a DedicatedHostProfileDiskSupportedInterfaces object.
@@ -28642,6 +31096,7 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
@@ -28653,41 +31108,51 @@ class ValueEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
VIRTIO_BLK = 'virtio_blk'
-class DedicatedHostProfileIdentity():
+
+class DedicatedHostProfileIdentity:
"""
Identifies a dedicated host profile by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DedicatedHostProfileIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DedicatedHostProfileIdentityByName', 'DedicatedHostProfileIdentityByHref']))
+ ", ".join(['DedicatedHostProfileIdentityByName', 'DedicatedHostProfileIdentityByHref'])
+ )
raise Exception(msg)
-class DedicatedHostProfileMemory():
+
+class DedicatedHostProfileMemory:
"""
DedicatedHostProfileMemory.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DedicatedHostProfileMemory object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DedicatedHostProfileMemoryFixed', 'DedicatedHostProfileMemoryRange', 'DedicatedHostProfileMemoryEnum', 'DedicatedHostProfileMemoryDependent']))
+ ", ".join(['DedicatedHostProfileMemoryFixed', 'DedicatedHostProfileMemoryRange', 'DedicatedHostProfileMemoryEnum', 'DedicatedHostProfileMemoryDependent'])
+ )
raise Exception(msg)
-class DedicatedHostProfileReference():
+
+class DedicatedHostProfileReference:
"""
DedicatedHostProfileReference.
@@ -28695,9 +31160,11 @@ class DedicatedHostProfileReference():
:attr str name: The globally unique name for this dedicated host profile.
"""
- def __init__(self,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileReference object.
@@ -28753,37 +31220,46 @@ def __ne__(self, other: 'DedicatedHostProfileReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DedicatedHostProfileSocket():
+
+class DedicatedHostProfileSocket:
"""
DedicatedHostProfileSocket.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DedicatedHostProfileSocket object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DedicatedHostProfileSocketFixed', 'DedicatedHostProfileSocketRange', 'DedicatedHostProfileSocketEnum', 'DedicatedHostProfileSocketDependent']))
+ ", ".join(['DedicatedHostProfileSocketFixed', 'DedicatedHostProfileSocketRange', 'DedicatedHostProfileSocketEnum', 'DedicatedHostProfileSocketDependent'])
+ )
raise Exception(msg)
-class DedicatedHostProfileVCPU():
+
+class DedicatedHostProfileVCPU:
"""
DedicatedHostProfileVCPU.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPU object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DedicatedHostProfileVCPUFixed', 'DedicatedHostProfileVCPURange', 'DedicatedHostProfileVCPUEnum', 'DedicatedHostProfileVCPUDependent']))
+ ", ".join(['DedicatedHostProfileVCPUFixed', 'DedicatedHostProfileVCPURange', 'DedicatedHostProfileVCPUEnum', 'DedicatedHostProfileVCPUDependent'])
+ )
raise Exception(msg)
-class DedicatedHostProfileVCPUArchitecture():
+
+class DedicatedHostProfileVCPUArchitecture:
"""
DedicatedHostProfileVCPUArchitecture.
@@ -28791,9 +31267,11 @@ class DedicatedHostProfileVCPUArchitecture():
:attr str value: The VCPU architecture for a dedicated host with this profile.
"""
- def __init__(self,
- type: str,
- value: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPUArchitecture object.
@@ -28854,10 +31332,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class DedicatedHostProfileVCPUManufacturer():
+
+class DedicatedHostProfileVCPUManufacturer:
"""
DedicatedHostProfileVCPUManufacturer.
@@ -28865,9 +31345,11 @@ class DedicatedHostProfileVCPUManufacturer():
:attr str value: The VCPU manufacturer for a dedicated host with this profile.
"""
- def __init__(self,
- type: str,
- value: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPUManufacturer object.
@@ -28928,10 +31410,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class DedicatedHostPrototype():
+
+class DedicatedHostPrototype:
"""
DedicatedHostPrototype.
@@ -28948,12 +31432,14 @@ class DedicatedHostPrototype():
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
"""
- def __init__(self,
- profile: 'DedicatedHostProfileIdentity',
- *,
- instance_placement_enabled: bool = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ profile: 'DedicatedHostProfileIdentity',
+ *,
+ instance_placement_enabled: bool = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a DedicatedHostPrototype object.
@@ -28972,10 +31458,12 @@ def __init__(self,
used.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['DedicatedHostPrototypeDedicatedHostByGroup', 'DedicatedHostPrototypeDedicatedHostByZone']))
+ ", ".join(['DedicatedHostPrototypeDedicatedHostByGroup', 'DedicatedHostPrototypeDedicatedHostByZone'])
+ )
raise Exception(msg)
-class DedicatedHostReference():
+
+class DedicatedHostReference:
"""
DedicatedHostReference.
@@ -28990,14 +31478,16 @@ class DedicatedHostReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'DedicatedHostReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'DedicatedHostReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a DedicatedHostReference object.
@@ -29093,10 +31583,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST = 'dedicated_host'
-class DedicatedHostReferenceDeleted():
+
+class DedicatedHostReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -29104,8 +31596,10 @@ class DedicatedHostReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a DedicatedHostReferenceDeleted object.
@@ -29153,7 +31647,8 @@ def __ne__(self, other: 'DedicatedHostReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DefaultNetworkACL():
+
+class DefaultNetworkACL:
"""
DefaultNetworkACL.
@@ -29176,16 +31671,18 @@ class DefaultNetworkACL():
:attr VPCReference vpc: The VPC this network ACL resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- rules: List['NetworkACLRuleItem'],
- subnets: List['SubnetReference'],
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ rules: List['NetworkACLRuleItem'],
+ subnets: List['SubnetReference'],
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a DefaultNetworkACL object.
@@ -29324,7 +31821,8 @@ def __ne__(self, other: 'DefaultNetworkACL') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class DefaultRoutingTable():
+
+class DefaultRoutingTable:
"""
DefaultRoutingTable.
@@ -29389,21 +31887,23 @@ class DefaultRoutingTable():
attached.
"""
- def __init__(self,
- accept_routes_from: List['ResourceFilter'],
- created_at: datetime,
- href: str,
- id: str,
- is_default: bool,
- lifecycle_state: str,
- name: str,
- resource_type: str,
- route_direct_link_ingress: bool,
- route_internet_ingress: bool,
- route_transit_gateway_ingress: bool,
- route_vpc_zone_ingress: bool,
- routes: List['RouteReference'],
- subnets: List['SubnetReference']) -> None:
+ def __init__(
+ self,
+ accept_routes_from: List['ResourceFilter'],
+ created_at: datetime,
+ href: str,
+ id: str,
+ is_default: bool,
+ lifecycle_state: str,
+ name: str,
+ resource_type: str,
+ route_direct_link_ingress: bool,
+ route_internet_ingress: bool,
+ route_transit_gateway_ingress: bool,
+ route_vpc_zone_ingress: bool,
+ routes: List['RouteReference'],
+ subnets: List['SubnetReference'],
+ ) -> None:
"""
Initialize a DefaultRoutingTable object.
@@ -29625,6 +32125,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the routing table.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -29638,10 +32139,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
ROUTING_TABLE = 'routing_table'
-class DefaultSecurityGroup():
+
+class DefaultSecurityGroup:
"""
DefaultSecurityGroup.
@@ -29663,16 +32166,18 @@ class DefaultSecurityGroup():
:attr VPCReference vpc: The VPC this security group resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- rules: List['SecurityGroupRule'],
- targets: List['SecurityGroupTargetReference'],
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ rules: List['SecurityGroupRule'],
+ targets: List['SecurityGroupTargetReference'],
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a DefaultSecurityGroup object.
@@ -29811,22 +32316,27 @@ def __ne__(self, other: 'DefaultSecurityGroup') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EncryptionKeyIdentity():
+
+class EncryptionKeyIdentity:
"""
Identifies an encryption key by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a EncryptionKeyIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EncryptionKeyIdentityByCRN']))
+ ", ".join(['EncryptionKeyIdentityByCRN'])
+ )
raise Exception(msg)
-class EncryptionKeyReference():
+
+class EncryptionKeyReference:
"""
EncryptionKeyReference.
@@ -29837,8 +32347,10 @@ class EncryptionKeyReference():
resource.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a EncryptionKeyReference object.
@@ -29890,7 +32402,8 @@ def __ne__(self, other: 'EncryptionKeyReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EndpointGateway():
+
+class EndpointGateway:
"""
EndpointGateway.
@@ -29926,23 +32439,25 @@ class EndpointGateway():
:attr VPCReference vpc: The VPC this endpoint gateway resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- health_state: str,
- href: str,
- id: str,
- ips: List['ReservedIPReference'],
- lifecycle_state: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- service_endpoints: List[str],
- target: 'EndpointGatewayTarget',
- vpc: 'VPCReference',
- *,
- service_endpoint: str = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ health_state: str,
+ href: str,
+ id: str,
+ ips: List['ReservedIPReference'],
+ lifecycle_state: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ service_endpoints: List[str],
+ target: 'EndpointGatewayTarget',
+ vpc: 'VPCReference',
+ *,
+ service_endpoint: str = None,
+ ) -> None:
"""
Initialize a EndpointGateway object.
@@ -30148,6 +32663,7 @@ class HealthStateEnum(str, Enum):
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'
@@ -30158,6 +32674,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the endpoint gateway.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -30171,10 +32688,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
ENDPOINT_GATEWAY = 'endpoint_gateway'
-class EndpointGatewayCollection():
+
+class EndpointGatewayCollection:
"""
EndpointGatewayCollection.
@@ -30189,13 +32708,15 @@ class EndpointGatewayCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- endpoint_gateways: List['EndpointGateway'],
- first: 'EndpointGatewayCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'EndpointGatewayCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ endpoint_gateways: List['EndpointGateway'],
+ first: 'EndpointGatewayCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'EndpointGatewayCollectionNext' = None,
+ ) -> None:
"""
Initialize a EndpointGatewayCollection object.
@@ -30290,15 +32811,18 @@ def __ne__(self, other: 'EndpointGatewayCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EndpointGatewayCollectionFirst():
+
+class EndpointGatewayCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a EndpointGatewayCollectionFirst object.
@@ -30346,7 +32870,8 @@ def __ne__(self, other: 'EndpointGatewayCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EndpointGatewayCollectionNext():
+
+class EndpointGatewayCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -30354,8 +32879,10 @@ class EndpointGatewayCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a EndpointGatewayCollectionNext object.
@@ -30403,7 +32930,8 @@ def __ne__(self, other: 'EndpointGatewayCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EndpointGatewayPatch():
+
+class EndpointGatewayPatch:
"""
EndpointGatewayPatch.
@@ -30411,9 +32939,11 @@ class EndpointGatewayPatch():
be used by another endpoint gateway in the VPC.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a EndpointGatewayPatch object.
@@ -30460,7 +32990,8 @@ def __ne__(self, other: 'EndpointGatewayPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EndpointGatewayReferenceDeleted():
+
+class EndpointGatewayReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -30468,8 +32999,10 @@ class EndpointGatewayReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a EndpointGatewayReferenceDeleted object.
@@ -30517,7 +33050,8 @@ def __ne__(self, other: 'EndpointGatewayReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class EndpointGatewayReservedIP():
+
+class EndpointGatewayReservedIP:
"""
A reserved IP to bind to the endpoint gateway. This can be specified using an existing
reserved IP, or a prototype object for a new reserved IP. The reserved IP will be
@@ -30526,31 +33060,39 @@ class EndpointGatewayReservedIP():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a EndpointGatewayReservedIP object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EndpointGatewayReservedIPReservedIPIdentity', 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext']))
+ ", ".join(['EndpointGatewayReservedIPReservedIPIdentity', 'EndpointGatewayReservedIPReservedIPPrototypeTargetContext'])
+ )
raise Exception(msg)
-class EndpointGatewayTarget():
+
+class EndpointGatewayTarget:
"""
The target for this endpoint gateway.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a EndpointGatewayTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EndpointGatewayTargetProviderCloudServiceReference', 'EndpointGatewayTargetProviderInfrastructureServiceReference']))
+ ", ".join(['EndpointGatewayTargetProviderCloudServiceReference', 'EndpointGatewayTargetProviderInfrastructureServiceReference'])
+ )
raise Exception(msg)
-class EndpointGatewayTargetPrototype():
+
+class EndpointGatewayTargetPrototype:
"""
The target to use for this endpoint gateway. Must not already be the target of another
endpoint gateway in the VPC.
@@ -30558,15 +33100,18 @@ class EndpointGatewayTargetPrototype():
:attr str resource_type: The type of target for this endpoint gateway.
"""
- def __init__(self,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ resource_type: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetPrototype object.
:param str resource_type: The type of target for this endpoint gateway.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity']))
+ ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity'])
+ )
raise Exception(msg)
@classmethod
@@ -30575,9 +33120,9 @@ def from_dict(cls, _dict: Dict) -> 'EndpointGatewayTargetPrototype':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'EndpointGatewayTargetPrototype'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity']))
+ msg = "Cannot convert dictionary into an instance of base class 'EndpointGatewayTargetPrototype'. The discriminator value should map to a valid subclass: {1}".format(
+ ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentity', 'EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity'])
+ )
raise Exception(msg)
@classmethod
@@ -30606,11 +33151,13 @@ class ResourceTypeEnum(str, Enum):
"""
The type of target for this endpoint gateway.
"""
+
PROVIDER_CLOUD_SERVICE = 'provider_cloud_service'
PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
-class FloatingIP():
+
+class FloatingIP:
"""
FloatingIP.
@@ -30628,18 +33175,20 @@ class FloatingIP():
:attr ZoneReference zone: The zone this floating IP resides in.
"""
- def __init__(self,
- address: str,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- status: str,
- zone: 'ZoneReference',
- *,
- target: 'FloatingIPTarget' = None) -> None:
+ def __init__(
+ self,
+ address: str,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ status: str,
+ zone: 'ZoneReference',
+ *,
+ target: 'FloatingIPTarget' = None,
+ ) -> None:
"""
Initialize a FloatingIP object.
@@ -30773,28 +33322,15 @@ class StatusEnum(str, Enum):
"""
The status of the floating IP.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
-class FloatingIPByTargetNetworkInterfaceIdentity():
- """
- The network interface this floating IP is to be bound to.
-
- """
-
- def __init__(self) -> None:
- """
- Initialize a FloatingIPByTargetNetworkInterfaceIdentity object.
-
- """
- msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref']))
- raise Exception(msg)
-class FloatingIPCollection():
+class FloatingIPCollection:
"""
FloatingIPCollection.
@@ -30808,13 +33344,15 @@ class FloatingIPCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'FloatingIPCollectionFirst',
- floating_ips: List['FloatingIP'],
- limit: int,
- total_count: int,
- *,
- next: 'FloatingIPCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'FloatingIPCollectionFirst',
+ floating_ips: List['FloatingIP'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'FloatingIPCollectionNext' = None,
+ ) -> None:
"""
Initialize a FloatingIPCollection object.
@@ -30908,15 +33446,18 @@ def __ne__(self, other: 'FloatingIPCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPCollectionFirst():
+
+class FloatingIPCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FloatingIPCollectionFirst object.
@@ -30964,7 +33505,8 @@ def __ne__(self, other: 'FloatingIPCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPCollectionNext():
+
+class FloatingIPCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -30972,8 +33514,10 @@ class FloatingIPCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FloatingIPCollectionNext object.
@@ -31021,31 +33565,46 @@ def __ne__(self, other: 'FloatingIPCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPPatch():
+
+class FloatingIPPatch:
"""
FloatingIPPatch.
:attr str name: (optional) The name for this floating IP. The name must not be
used by another floating IP in the region.
- :attr FloatingIPTargetPatch target: (optional) The network interface to bind the
+ :attr FloatingIPTargetPatch target: (optional) The target resource to bind this
floating IP to, replacing any existing binding.
The floating IP must not be required by another resource, such as a public
gateway.
+ The target resource must not already have a floating IP bound to it if the
+ target
+ resource is:
+ - an instance network interface
+ - a bare metal server network interface with `enable_infrastructure_nat` set to
+ `true`.
"""
- def __init__(self,
- *,
- name: str = None,
- target: 'FloatingIPTargetPatch' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ target: 'FloatingIPTargetPatch' = None,
+ ) -> None:
"""
Initialize a FloatingIPPatch object.
:param str name: (optional) The name for this floating IP. The name must
not be used by another floating IP in the region.
- :param FloatingIPTargetPatch target: (optional) The network interface to
- bind the floating IP to, replacing any existing binding.
+ :param FloatingIPTargetPatch target: (optional) The target resource to bind
+ this floating IP to, replacing any existing binding.
The floating IP must not be required by another resource, such as a public
gateway.
+ The target resource must not already have a floating IP bound to it if the
+ target
+ resource is:
+ - an instance network interface
+ - a bare metal server network interface with `enable_infrastructure_nat`
+ set to `true`.
"""
self.name = name
self.target = target
@@ -31095,7 +33654,8 @@ def __ne__(self, other: 'FloatingIPPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPPrototype():
+
+class FloatingIPPrototype:
"""
FloatingIPPrototype.
@@ -31107,10 +33667,12 @@ class FloatingIPPrototype():
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
"""
- def __init__(self,
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a FloatingIPPrototype object.
@@ -31123,10 +33685,12 @@ def __init__(self,
used.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FloatingIPPrototypeFloatingIPByZone', 'FloatingIPPrototypeFloatingIPByTarget']))
+ ", ".join(['FloatingIPPrototypeFloatingIPByZone', 'FloatingIPPrototypeFloatingIPByTarget'])
+ )
raise Exception(msg)
-class FloatingIPReference():
+
+class FloatingIPReference:
"""
FloatingIPReference.
@@ -31141,14 +33705,16 @@ class FloatingIPReference():
floating IPs in the region.
"""
- def __init__(self,
- address: str,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'FloatingIPReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ address: str,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'FloatingIPReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a FloatingIPReference object.
@@ -31240,7 +33806,8 @@ def __ne__(self, other: 'FloatingIPReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPReferenceDeleted():
+
+class FloatingIPReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -31248,8 +33815,10 @@ class FloatingIPReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a FloatingIPReferenceDeleted object.
@@ -31297,46 +33866,86 @@ def __ne__(self, other: 'FloatingIPReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPTarget():
+
+class FloatingIPTarget:
"""
The target of this floating IP.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FloatingIPTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FloatingIPTargetNetworkInterfaceReference', 'FloatingIPTargetPublicGatewayReference']))
+ ", ".join(['FloatingIPTargetNetworkInterfaceReference', 'FloatingIPTargetPublicGatewayReference'])
+ )
raise Exception(msg)
-class FloatingIPTargetPatch():
+
+class FloatingIPTargetPatch:
"""
- The network interface to bind the floating IP to, replacing any existing binding. The
+ The target resource to bind this floating IP to, replacing any existing binding. The
floating IP must not be required by another resource, such as a public gateway.
+ The target resource must not already have a floating IP bound to it if the target
+ resource is:
+ - an instance network interface
+ - a bare metal server network interface with `enable_infrastructure_nat` set to
+ `true`.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FloatingIPTargetPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FloatingIPTargetPatchNetworkInterfaceIdentityById', 'FloatingIPTargetPatchNetworkInterfaceIdentityByHref']))
+ ", ".join(['FloatingIPTargetPatchNetworkInterfaceIdentity'])
+ )
raise Exception(msg)
-class FloatingIPUnpaginatedCollection():
+
+class FloatingIPTargetPrototype:
+ """
+ The target resource to bind this floating IP to.
+ The target resource must not already have a floating IP bound to it if the target
+ resource is:
+ - an instance network interface
+ - a bare metal server network interface with `enable_infrastructure_nat` set to
+ `true`.
+
+ """
+
+ def __init__(
+ self,
+ ) -> None:
+ """
+ Initialize a FloatingIPTargetPrototype object.
+
+ """
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['FloatingIPTargetPrototypeNetworkInterfaceIdentity'])
+ )
+ raise Exception(msg)
+
+
+class FloatingIPUnpaginatedCollection:
"""
FloatingIPUnpaginatedCollection.
:attr List[FloatingIP] floating_ips: Collection of floating IPs.
"""
- def __init__(self,
- floating_ips: List['FloatingIP']) -> None:
+ def __init__(
+ self,
+ floating_ips: List['FloatingIP'],
+ ) -> None:
"""
Initialize a FloatingIPUnpaginatedCollection object.
@@ -31390,7 +33999,8 @@ def __ne__(self, other: 'FloatingIPUnpaginatedCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollector():
+
+class FlowLogCollector:
"""
FlowLogCollector.
@@ -31405,7 +34015,7 @@ class FlowLogCollector():
:attr str id: The unique identifier for this flow log collector.
:attr str lifecycle_state: The lifecycle state of the flow log collector.
:attr str name: The name for this flow log collector. The name is unique across
- all flow log collectors in the region.
+ all flow log collectors in the VPC.
:attr ResourceGroupReference resource_group: The resource group for this flow
log collector.
:attr LegacyCloudObjectStorageBucketReference storage_bucket: The Cloud Object
@@ -31426,19 +34036,21 @@ class FlowLogCollector():
:attr VPCReference vpc: The VPC this flow log collector resides in.
"""
- def __init__(self,
- active: bool,
- auto_delete: bool,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- storage_bucket: 'LegacyCloudObjectStorageBucketReference',
- target: 'FlowLogCollectorTarget',
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ active: bool,
+ auto_delete: bool,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ storage_bucket: 'LegacyCloudObjectStorageBucketReference',
+ target: 'FlowLogCollectorTarget',
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a FlowLogCollector object.
@@ -31453,7 +34065,7 @@ def __init__(self,
:param str id: The unique identifier for this flow log collector.
:param str lifecycle_state: The lifecycle state of the flow log collector.
:param str name: The name for this flow log collector. The name is unique
- across all flow log collectors in the region.
+ across all flow log collectors in the VPC.
:param ResourceGroupReference resource_group: The resource group for this
flow log collector.
:param LegacyCloudObjectStorageBucketReference storage_bucket: The Cloud
@@ -31611,6 +34223,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the flow log collector.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -31620,7 +34233,8 @@ class LifecycleStateEnum(str, Enum):
WAITING = 'waiting'
-class FlowLogCollectorCollection():
+
+class FlowLogCollectorCollection:
"""
FlowLogCollectorCollection.
@@ -31636,13 +34250,15 @@ class FlowLogCollectorCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'FlowLogCollectorCollectionFirst',
- flow_log_collectors: List['FlowLogCollector'],
- limit: int,
- total_count: int,
- *,
- next: 'FlowLogCollectorCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'FlowLogCollectorCollectionFirst',
+ flow_log_collectors: List['FlowLogCollector'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'FlowLogCollectorCollectionNext' = None,
+ ) -> None:
"""
Initialize a FlowLogCollectorCollection object.
@@ -31737,15 +34353,18 @@ def __ne__(self, other: 'FlowLogCollectorCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollectorCollectionFirst():
+
+class FlowLogCollectorCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorCollectionFirst object.
@@ -31793,7 +34412,8 @@ def __ne__(self, other: 'FlowLogCollectorCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollectorCollectionNext():
+
+class FlowLogCollectorCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -31801,8 +34421,10 @@ class FlowLogCollectorCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorCollectionNext object.
@@ -31850,7 +34472,8 @@ def __ne__(self, other: 'FlowLogCollectorCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollectorPatch():
+
+class FlowLogCollectorPatch:
"""
FlowLogCollectorPatch.
@@ -31858,13 +34481,15 @@ class FlowLogCollectorPatch():
Updating to false deactivates the collector and updating to true activates the
collector.
:attr str name: (optional) The name for this flow log collector. The name must
- not be used by another flow log collector in the region.
+ not be used by another flow log collector in the VPC.
"""
- def __init__(self,
- *,
- active: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ active: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a FlowLogCollectorPatch object.
@@ -31872,7 +34497,7 @@ def __init__(self,
Updating to false deactivates the collector and updating to true activates
the collector.
:param str name: (optional) The name for this flow log collector. The name
- must not be used by another flow log collector in the region.
+ must not be used by another flow log collector in the VPC.
"""
self.active = active
self.name = name
@@ -31919,7 +34544,8 @@ def __ne__(self, other: 'FlowLogCollectorPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollectorTarget():
+
+class FlowLogCollectorTarget:
"""
The target this collector is collecting flow logs for.
- If the target is a network interface, flow logs will be collected
@@ -31935,16 +34561,20 @@ class FlowLogCollectorTarget():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FlowLogCollectorTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext', 'FlowLogCollectorTargetInstanceReference', 'FlowLogCollectorTargetSubnetReference', 'FlowLogCollectorTargetVPCReference']))
+ ", ".join(['FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext', 'FlowLogCollectorTargetInstanceReference', 'FlowLogCollectorTargetSubnetReference', 'FlowLogCollectorTargetVPCReference'])
+ )
raise Exception(msg)
-class FlowLogCollectorTargetPrototype():
+
+class FlowLogCollectorTargetPrototype:
"""
The target this collector will collect flow logs for. If the target is an instance,
subnet, or VPC, flow logs will not be collected for any network interfaces within the
@@ -31952,16 +34582,20 @@ class FlowLogCollectorTargetPrototype():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity', 'FlowLogCollectorTargetPrototypeInstanceIdentity', 'FlowLogCollectorTargetPrototypeSubnetIdentity', 'FlowLogCollectorTargetPrototypeVPCIdentity']))
+ ", ".join(['FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity', 'FlowLogCollectorTargetPrototypeInstanceIdentity', 'FlowLogCollectorTargetPrototypeSubnetIdentity', 'FlowLogCollectorTargetPrototypeVPCIdentity'])
+ )
raise Exception(msg)
-class GenericResourceReferenceDeleted():
+
+class GenericResourceReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -31969,8 +34603,10 @@ class GenericResourceReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a GenericResourceReferenceDeleted object.
@@ -32018,7 +34654,8 @@ def __ne__(self, other: 'GenericResourceReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IKEPolicy():
+
+class IKEPolicy:
"""
IKEPolicy.
@@ -32043,20 +34680,22 @@ class IKEPolicy():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- authentication_algorithm: str,
- connections: List['VPNGatewayConnectionReference'],
- created_at: datetime,
- dh_group: int,
- encryption_algorithm: str,
- href: str,
- id: str,
- ike_version: int,
- key_lifetime: int,
- name: str,
- negotiation_mode: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str) -> None:
+ def __init__(
+ self,
+ authentication_algorithm: str,
+ connections: List['VPNGatewayConnectionReference'],
+ created_at: datetime,
+ dh_group: int,
+ encryption_algorithm: str,
+ href: str,
+ id: str,
+ ike_version: int,
+ key_lifetime: int,
+ name: str,
+ negotiation_mode: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ ) -> None:
"""
Initialize a IKEPolicy object.
@@ -32222,6 +34861,7 @@ class AuthenticationAlgorithmEnum(str, Enum):
The authentication algorithm
The `md5` and `sha1` algorithms have been deprecated.
"""
+
MD5 = 'md5'
SHA1 = 'sha1'
SHA256 = 'sha256'
@@ -32234,6 +34874,7 @@ class EncryptionAlgorithmEnum(str, Enum):
The encryption algorithm
The `triple_des` algorithm has been deprecated.
"""
+
AES128 = 'aes128'
AES192 = 'aes192'
AES256 = 'aes256'
@@ -32244,6 +34885,7 @@ class NegotiationModeEnum(str, Enum):
"""
The IKE negotiation mode. Only `main` is supported.
"""
+
MAIN = 'main'
@@ -32251,10 +34893,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
IKE_POLICY = 'ike_policy'
-class IKEPolicyCollection():
+
+class IKEPolicyCollection:
"""
IKEPolicyCollection.
@@ -32268,13 +34912,15 @@ class IKEPolicyCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'IKEPolicyCollectionFirst',
- ike_policies: List['IKEPolicy'],
- limit: int,
- total_count: int,
- *,
- next: 'IKEPolicyCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'IKEPolicyCollectionFirst',
+ ike_policies: List['IKEPolicy'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'IKEPolicyCollectionNext' = None,
+ ) -> None:
"""
Initialize a IKEPolicyCollection object.
@@ -32368,15 +35014,18 @@ def __ne__(self, other: 'IKEPolicyCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IKEPolicyCollectionFirst():
+
+class IKEPolicyCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a IKEPolicyCollectionFirst object.
@@ -32424,7 +35073,8 @@ def __ne__(self, other: 'IKEPolicyCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IKEPolicyCollectionNext():
+
+class IKEPolicyCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -32432,8 +35082,10 @@ class IKEPolicyCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a IKEPolicyCollectionNext object.
@@ -32481,7 +35133,8 @@ def __ne__(self, other: 'IKEPolicyCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IKEPolicyPatch():
+
+class IKEPolicyPatch:
"""
IKEPolicyPatch.
@@ -32497,14 +35150,16 @@ class IKEPolicyPatch():
used by another IKE policy in the region.
"""
- def __init__(self,
- *,
- authentication_algorithm: str = None,
- dh_group: int = None,
- encryption_algorithm: str = None,
- ike_version: int = None,
- key_lifetime: int = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ authentication_algorithm: str = None,
+ dh_group: int = None,
+ encryption_algorithm: str = None,
+ ike_version: int = None,
+ key_lifetime: int = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a IKEPolicyPatch object.
@@ -32590,6 +35245,7 @@ class AuthenticationAlgorithmEnum(str, Enum):
The authentication algorithm
The `md5` and `sha1` algorithms have been deprecated.
"""
+
MD5 = 'md5'
SHA1 = 'sha1'
SHA256 = 'sha256'
@@ -32602,13 +35258,15 @@ class EncryptionAlgorithmEnum(str, Enum):
The encryption algorithm
The `triple_des` algorithm has been deprecated.
"""
+
AES128 = 'aes128'
AES192 = 'aes192'
AES256 = 'aes256'
TRIPLE_DES = 'triple_des'
-class IKEPolicyReference():
+
+class IKEPolicyReference:
"""
IKEPolicyReference.
@@ -32622,13 +35280,15 @@ class IKEPolicyReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'IKEPolicyReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'IKEPolicyReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a IKEPolicyReference object.
@@ -32716,10 +35376,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
IKE_POLICY = 'ike_policy'
-class IKEPolicyReferenceDeleted():
+
+class IKEPolicyReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -32727,8 +35389,10 @@ class IKEPolicyReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a IKEPolicyReferenceDeleted object.
@@ -32776,7 +35440,8 @@ def __ne__(self, other: 'IKEPolicyReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IP():
+
+class IP:
"""
IP.
@@ -32787,8 +35452,10 @@ class IP():
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a IP object.
@@ -32841,7 +35508,8 @@ def __ne__(self, other: 'IP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IPsecPolicy():
+
+class IPsecPolicy:
"""
IPsecPolicy.
@@ -32873,20 +35541,22 @@ class IPsecPolicy():
supported.
"""
- def __init__(self,
- authentication_algorithm: str,
- connections: List['VPNGatewayConnectionReference'],
- created_at: datetime,
- encapsulation_mode: str,
- encryption_algorithm: str,
- href: str,
- id: str,
- key_lifetime: int,
- name: str,
- pfs: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- transform_protocol: str) -> None:
+ def __init__(
+ self,
+ authentication_algorithm: str,
+ connections: List['VPNGatewayConnectionReference'],
+ created_at: datetime,
+ encapsulation_mode: str,
+ encryption_algorithm: str,
+ href: str,
+ id: str,
+ key_lifetime: int,
+ name: str,
+ pfs: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ transform_protocol: str,
+ ) -> None:
"""
Initialize a IPsecPolicy object.
@@ -33060,6 +35730,7 @@ class AuthenticationAlgorithmEnum(str, Enum):
Must be `disabled` if and only if the `encryption_algorithm` is
`aes128gcm16`, `aes192gcm16`, or `aes256gcm16`.
"""
+
DISABLED = 'disabled'
MD5 = 'md5'
SHA1 = 'sha1'
@@ -33072,6 +35743,7 @@ class EncapsulationModeEnum(str, Enum):
"""
The encapsulation mode used. Only `tunnel` is supported.
"""
+
TUNNEL = 'tunnel'
@@ -33083,6 +35755,7 @@ class EncryptionAlgorithmEnum(str, Enum):
`encryption_algorithm` is `aes128gcm16`, `aes192gcm16`, or
`aes256gcm16`.
"""
+
AES128 = 'aes128'
AES128GCM16 = 'aes128gcm16'
AES192 = 'aes192'
@@ -33097,6 +35770,7 @@ class PfsEnum(str, Enum):
Perfect Forward Secrecy
Groups `group_2` and `group_5` have been deprecated.
"""
+
DISABLED = 'disabled'
GROUP_14 = 'group_14'
GROUP_15 = 'group_15'
@@ -33118,6 +35792,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
IPSEC_POLICY = 'ipsec_policy'
@@ -33125,10 +35800,12 @@ class TransformProtocolEnum(str, Enum):
"""
The transform protocol used. Only `esp` is supported.
"""
+
ESP = 'esp'
-class IPsecPolicyCollection():
+
+class IPsecPolicyCollection:
"""
IPsecPolicyCollection.
@@ -33142,13 +35819,15 @@ class IPsecPolicyCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'IPsecPolicyCollectionFirst',
- ipsec_policies: List['IPsecPolicy'],
- limit: int,
- total_count: int,
- *,
- next: 'IPsecPolicyCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'IPsecPolicyCollectionFirst',
+ ipsec_policies: List['IPsecPolicy'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'IPsecPolicyCollectionNext' = None,
+ ) -> None:
"""
Initialize a IPsecPolicyCollection object.
@@ -33242,15 +35921,18 @@ def __ne__(self, other: 'IPsecPolicyCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IPsecPolicyCollectionFirst():
+
+class IPsecPolicyCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a IPsecPolicyCollectionFirst object.
@@ -33298,7 +35980,8 @@ def __ne__(self, other: 'IPsecPolicyCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IPsecPolicyCollectionNext():
+
+class IPsecPolicyCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -33306,8 +35989,10 @@ class IPsecPolicyCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a IPsecPolicyCollectionNext object.
@@ -33355,7 +36040,8 @@ def __ne__(self, other: 'IPsecPolicyCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class IPsecPolicyPatch():
+
+class IPsecPolicyPatch:
"""
IPsecPolicyPatch.
@@ -33375,13 +36061,15 @@ class IPsecPolicyPatch():
Groups `group_2` and `group_5` have been deprecated.
"""
- def __init__(self,
- *,
- authentication_algorithm: str = None,
- encryption_algorithm: str = None,
- key_lifetime: int = None,
- name: str = None,
- pfs: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ authentication_algorithm: str = None,
+ encryption_algorithm: str = None,
+ key_lifetime: int = None,
+ name: str = None,
+ pfs: str = None,
+ ) -> None:
"""
Initialize a IPsecPolicyPatch object.
@@ -33468,6 +36156,7 @@ class AuthenticationAlgorithmEnum(str, Enum):
Must be `disabled` if and only if the `encryption_algorithm` is
`aes128gcm16`, `aes192gcm16`, or `aes256gcm16`.
"""
+
DISABLED = 'disabled'
MD5 = 'md5'
SHA1 = 'sha1'
@@ -33484,6 +36173,7 @@ class EncryptionAlgorithmEnum(str, Enum):
`encryption_algorithm` is `aes128gcm16`, `aes192gcm16`, or
`aes256gcm16`.
"""
+
AES128 = 'aes128'
AES128GCM16 = 'aes128gcm16'
AES192 = 'aes192'
@@ -33498,6 +36188,7 @@ class PfsEnum(str, Enum):
Perfect Forward Secrecy
Groups `group_2` and `group_5` have been deprecated.
"""
+
DISABLED = 'disabled'
GROUP_14 = 'group_14'
GROUP_15 = 'group_15'
@@ -33515,7 +36206,8 @@ class PfsEnum(str, Enum):
GROUP_5 = 'group_5'
-class IPsecPolicyReference():
+
+class IPsecPolicyReference:
"""
IPsecPolicyReference.
@@ -33529,13 +36221,15 @@ class IPsecPolicyReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'IPsecPolicyReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'IPsecPolicyReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a IPsecPolicyReference object.
@@ -33623,10 +36317,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
IPSEC_POLICY = 'ipsec_policy'
-class IPsecPolicyReferenceDeleted():
+
+class IPsecPolicyReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -33634,8 +36330,10 @@ class IPsecPolicyReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a IPsecPolicyReferenceDeleted object.
@@ -33683,7 +36381,8 @@ def __ne__(self, other: 'IPsecPolicyReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class Image():
+
+class Image:
"""
Image.
@@ -33751,24 +36450,26 @@ class Image():
account.
"""
- def __init__(self,
- catalog_offering: 'ImageCatalogOffering',
- created_at: datetime,
- crn: str,
- encryption: str,
- file: 'ImageFile',
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- status: str,
- status_reasons: List['ImageStatusReason'],
- visibility: str,
- *,
- encryption_key: 'EncryptionKeyReference' = None,
- minimum_provisioned_size: int = None,
- operating_system: 'OperatingSystem' = None,
- source_volume: 'VolumeReference' = None) -> None:
+ def __init__(
+ self,
+ catalog_offering: 'ImageCatalogOffering',
+ created_at: datetime,
+ crn: str,
+ encryption: str,
+ file: 'ImageFile',
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ status: str,
+ status_reasons: List['ImageStatusReason'],
+ visibility: str,
+ *,
+ encryption_key: 'EncryptionKeyReference' = None,
+ minimum_provisioned_size: int = None,
+ operating_system: 'OperatingSystem' = None,
+ source_volume: 'VolumeReference' = None,
+ ) -> None:
"""
Initialize a Image object.
@@ -34005,6 +36706,7 @@ class EncryptionEnum(str, Enum):
"""
The type of encryption used on the image.
"""
+
NONE = 'none'
USER_MANAGED = 'user_managed'
@@ -34024,6 +36726,7 @@ class StatusEnum(str, Enum):
processing and surface the error, or bypass the image on which the unexpected
property value was encountered.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
DEPRECATED = 'deprecated'
@@ -34036,11 +36739,13 @@ class VisibilityEnum(str, Enum):
"""
Whether the image is publicly visible or private to the account.
"""
+
PRIVATE = 'private'
PUBLIC = 'public'
-class ImageCatalogOffering():
+
+class ImageCatalogOffering:
"""
ImageCatalogOffering.
@@ -34056,10 +36761,12 @@ class ImageCatalogOffering():
If absent, this image is not associated with a cloud catalog offering.
"""
- def __init__(self,
- managed: bool,
- *,
- version: 'CatalogOfferingVersionReference' = None) -> None:
+ def __init__(
+ self,
+ managed: bool,
+ *,
+ version: 'CatalogOfferingVersionReference' = None,
+ ) -> None:
"""
Initialize a ImageCatalogOffering object.
@@ -34124,7 +36831,8 @@ def __ne__(self, other: 'ImageCatalogOffering') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageCollection():
+
+class ImageCollection:
"""
ImageCollection.
@@ -34137,12 +36845,14 @@ class ImageCollection():
except the last page.
"""
- def __init__(self,
- first: 'ImageCollectionFirst',
- images: List['Image'],
- limit: int,
- *,
- next: 'ImageCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'ImageCollectionFirst',
+ images: List['Image'],
+ limit: int,
+ *,
+ next: 'ImageCollectionNext' = None,
+ ) -> None:
"""
Initialize a ImageCollection object.
@@ -34227,15 +36937,18 @@ def __ne__(self, other: 'ImageCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageCollectionFirst():
+
+class ImageCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ImageCollectionFirst object.
@@ -34283,7 +36996,8 @@ def __ne__(self, other: 'ImageCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageCollectionNext():
+
+class ImageCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -34291,8 +37005,10 @@ class ImageCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ImageCollectionNext object.
@@ -34340,7 +37056,525 @@ def __ne__(self, other: 'ImageCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageFile():
+
+class ImageExportJob:
+ """
+ ImageExportJob.
+
+ :attr datetime completed_at: (optional) The date and time that the image export
+ job was completed.
+ If absent, the export job has not yet completed.
+ :attr datetime created_at: The date and time that the image export job was
+ created.
+ :attr bytes encrypted_data_key: (optional) A base64-encoded, encrypted
+ representation of the key that was used to encrypt the data for the exported
+ image. This key can be unwrapped with the image's `encryption_key` root key
+ using either Key Protect or Hyper Protect Crypto Services.
+ If absent, the export job is for an unencrypted image.
+ :attr str format: The format of the exported image.
+ :attr str href: The URL for this image export job.
+ :attr str id: The unique identifier for this image export job.
+ :attr str name: The name for this image export job. The name must not be used by
+ another export job for the image. Changing the name will not affect the exported
+ image name,
+ `storage_object.name`, or `storage_href` values.
+ :attr str resource_type: The type of resource referenced.
+ :attr datetime started_at: (optional) The date and time that the image export
+ job started running.
+ If absent, the export job has not yet started.
+ :attr str status: The status of this image export job:
+ - `deleting`: Export job is being deleted
+ - `failed`: Export job could not be completed successfully
+ - `queued`: Export job is queued
+ - `running`: Export job is in progress
+ - `succeeded`: Export job was completed successfully
+ The exported image object is automatically deleted for `failed` jobs.
+ :attr List[ImageExportJobStatusReason] status_reasons: The reasons for the
+ current status (if any).
+ The enumerated reason code values for this property will expand in the future.
+ When processing this property, check for and log unknown values. Optionally halt
+ processing and surface the error, or bypass the resource on which the unexpected
+ reason code was encountered.
+ :attr CloudObjectStorageBucketReference storage_bucket: The Cloud Object Storage
+ bucket of the exported image object.
+ :attr str storage_href: The Cloud Object Storage location of the exported image
+ object. The object at this location will not exist until the job completes
+ successfully. The exported image object is not managed by the IBM VPC service,
+ and may be removed or replaced with a different object by any user or service
+ with IAM authorization to the storage bucket.
+ :attr CloudObjectStorageObjectReference storage_object: The Cloud Object Storage
+ object for the exported image. This object will not exist until
+ the job completes successfully. The exported image object is not managed by the
+ IBM VPC
+ service, and may be removed or replaced with a different object by any user or
+ service
+ with IAM authorization to the storage bucket.
+ """
+
+ def __init__(
+ self,
+ created_at: datetime,
+ format: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ status: str,
+ status_reasons: List['ImageExportJobStatusReason'],
+ storage_bucket: 'CloudObjectStorageBucketReference',
+ storage_href: str,
+ storage_object: 'CloudObjectStorageObjectReference',
+ *,
+ completed_at: datetime = None,
+ encrypted_data_key: bytes = None,
+ started_at: datetime = None,
+ ) -> None:
+ """
+ Initialize a ImageExportJob object.
+
+ :param datetime created_at: The date and time that the image export job was
+ created.
+ :param str format: The format of the exported image.
+ :param str href: The URL for this image export job.
+ :param str id: The unique identifier for this image export job.
+ :param str name: The name for this image export job. The name must not be
+ used by another export job for the image. Changing the name will not affect
+ the exported image name,
+ `storage_object.name`, or `storage_href` values.
+ :param str resource_type: The type of resource referenced.
+ :param str status: The status of this image export job:
+ - `deleting`: Export job is being deleted
+ - `failed`: Export job could not be completed successfully
+ - `queued`: Export job is queued
+ - `running`: Export job is in progress
+ - `succeeded`: Export job was completed successfully
+ The exported image object is automatically deleted for `failed` jobs.
+ :param List[ImageExportJobStatusReason] status_reasons: The reasons for the
+ current status (if any).
+ The enumerated reason code values for this property will expand in the
+ future. When processing this property, check for and log unknown values.
+ Optionally halt processing and surface the error, or bypass the resource on
+ which the unexpected reason code was encountered.
+ :param CloudObjectStorageBucketReference storage_bucket: The Cloud Object
+ Storage bucket of the exported image object.
+ :param str storage_href: The Cloud Object Storage location of the exported
+ image object. The object at this location will not exist until the job
+ completes successfully. The exported image object is not managed by the IBM
+ VPC service, and may be removed or replaced with a different object by any
+ user or service with IAM authorization to the storage bucket.
+ :param CloudObjectStorageObjectReference storage_object: The Cloud Object
+ Storage object for the exported image. This object will not exist until
+ the job completes successfully. The exported image object is not managed by
+ the IBM VPC
+ service, and may be removed or replaced with a different object by any user
+ or service
+ with IAM authorization to the storage bucket.
+ :param datetime completed_at: (optional) The date and time that the image
+ export job was completed.
+ If absent, the export job has not yet completed.
+ :param bytes encrypted_data_key: (optional) A base64-encoded, encrypted
+ representation of the key that was used to encrypt the data for the
+ exported image. This key can be unwrapped with the image's `encryption_key`
+ root key using either Key Protect or Hyper Protect Crypto Services.
+ If absent, the export job is for an unencrypted image.
+ :param datetime started_at: (optional) The date and time that the image
+ export job started running.
+ If absent, the export job has not yet started.
+ """
+ self.completed_at = completed_at
+ self.created_at = created_at
+ self.encrypted_data_key = encrypted_data_key
+ self.format = format
+ self.href = href
+ self.id = id
+ self.name = name
+ self.resource_type = resource_type
+ self.started_at = started_at
+ self.status = status
+ self.status_reasons = status_reasons
+ self.storage_bucket = storage_bucket
+ self.storage_href = storage_href
+ self.storage_object = storage_object
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'ImageExportJob':
+ """Initialize a ImageExportJob object from a json dictionary."""
+ args = {}
+ if 'completed_at' in _dict:
+ args['completed_at'] = string_to_datetime(_dict.get('completed_at'))
+ if 'created_at' in _dict:
+ args['created_at'] = string_to_datetime(_dict.get('created_at'))
+ else:
+ raise ValueError('Required property \'created_at\' not present in ImageExportJob JSON')
+ if 'encrypted_data_key' in _dict:
+ args['encrypted_data_key'] = base64.b64decode(_dict.get('encrypted_data_key'))
+ if 'format' in _dict:
+ args['format'] = _dict.get('format')
+ else:
+ raise ValueError('Required property \'format\' not present in ImageExportJob JSON')
+ if 'href' in _dict:
+ args['href'] = _dict.get('href')
+ else:
+ raise ValueError('Required property \'href\' not present in ImageExportJob JSON')
+ if 'id' in _dict:
+ args['id'] = _dict.get('id')
+ else:
+ raise ValueError('Required property \'id\' not present in ImageExportJob JSON')
+ if 'name' in _dict:
+ args['name'] = _dict.get('name')
+ else:
+ raise ValueError('Required property \'name\' not present in ImageExportJob JSON')
+ if 'resource_type' in _dict:
+ args['resource_type'] = _dict.get('resource_type')
+ else:
+ raise ValueError('Required property \'resource_type\' not present in ImageExportJob JSON')
+ if 'started_at' in _dict:
+ args['started_at'] = string_to_datetime(_dict.get('started_at'))
+ if 'status' in _dict:
+ args['status'] = _dict.get('status')
+ else:
+ raise ValueError('Required property \'status\' not present in ImageExportJob JSON')
+ if 'status_reasons' in _dict:
+ args['status_reasons'] = [ImageExportJobStatusReason.from_dict(v) for v in _dict.get('status_reasons')]
+ else:
+ raise ValueError('Required property \'status_reasons\' not present in ImageExportJob JSON')
+ if 'storage_bucket' in _dict:
+ args['storage_bucket'] = CloudObjectStorageBucketReference.from_dict(_dict.get('storage_bucket'))
+ else:
+ raise ValueError('Required property \'storage_bucket\' not present in ImageExportJob JSON')
+ if 'storage_href' in _dict:
+ args['storage_href'] = _dict.get('storage_href')
+ else:
+ raise ValueError('Required property \'storage_href\' not present in ImageExportJob JSON')
+ if 'storage_object' in _dict:
+ args['storage_object'] = CloudObjectStorageObjectReference.from_dict(_dict.get('storage_object'))
+ else:
+ raise ValueError('Required property \'storage_object\' not present in ImageExportJob JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a ImageExportJob 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, 'completed_at') and self.completed_at is not None:
+ _dict['completed_at'] = datetime_to_string(self.completed_at)
+ if hasattr(self, 'created_at') and self.created_at is not None:
+ _dict['created_at'] = datetime_to_string(self.created_at)
+ if hasattr(self, 'encrypted_data_key') and self.encrypted_data_key is not None:
+ _dict['encrypted_data_key'] = str(base64.b64encode(self.encrypted_data_key), 'utf-8')
+ if hasattr(self, 'format') and self.format is not None:
+ _dict['format'] = self.format
+ 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
+ if hasattr(self, 'started_at') and self.started_at is not None:
+ _dict['started_at'] = datetime_to_string(self.started_at)
+ 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, 'storage_bucket') and self.storage_bucket is not None:
+ if isinstance(self.storage_bucket, dict):
+ _dict['storage_bucket'] = self.storage_bucket
+ else:
+ _dict['storage_bucket'] = self.storage_bucket.to_dict()
+ if hasattr(self, 'storage_href') and self.storage_href is not None:
+ _dict['storage_href'] = self.storage_href
+ if hasattr(self, 'storage_object') and self.storage_object is not None:
+ if isinstance(self.storage_object, dict):
+ _dict['storage_object'] = self.storage_object
+ else:
+ _dict['storage_object'] = self.storage_object.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 ImageExportJob object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'ImageExportJob') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'ImageExportJob') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+ class FormatEnum(str, Enum):
+ """
+ The format of the exported image.
+ """
+
+ QCOW2 = 'qcow2'
+ VHD = 'vhd'
+
+
+ class ResourceTypeEnum(str, Enum):
+ """
+ The type of resource referenced.
+ """
+
+ IMAGE_EXPORT_JOB = 'image_export_job'
+
+
+ class StatusEnum(str, Enum):
+ """
+ The status of this image export job:
+ - `deleting`: Export job is being deleted
+ - `failed`: Export job could not be completed successfully
+ - `queued`: Export job is queued
+ - `running`: Export job is in progress
+ - `succeeded`: Export job was completed successfully
+ The exported image object is automatically deleted for `failed` jobs.
+ """
+
+ DELETING = 'deleting'
+ FAILED = 'failed'
+ QUEUED = 'queued'
+ RUNNING = 'running'
+ SUCCEEDED = 'succeeded'
+
+
+
+class ImageExportJobPatch:
+ """
+ ImageExportJobPatch.
+
+ :attr str name: (optional) The name for this image export job. The name must not
+ be used by another export job for the image. Changing the name will not affect
+ the exported image name,
+ `storage_object.name`, or `storage_href` values.
+ """
+
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
+ """
+ Initialize a ImageExportJobPatch object.
+
+ :param str name: (optional) The name for this image export job. The name
+ must not be used by another export job for the image. Changing the name
+ will not affect the exported image name,
+ `storage_object.name`, or `storage_href` values.
+ """
+ self.name = name
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'ImageExportJobPatch':
+ """Initialize a ImageExportJobPatch object from a json dictionary."""
+ args = {}
+ if 'name' in _dict:
+ args['name'] = _dict.get('name')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a ImageExportJobPatch object from a json dictionary."""
+ return cls.from_dict(_dict)
+
+ def to_dict(self) -> Dict:
+ """Return a json dictionary representing this model."""
+ _dict = {}
+ if hasattr(self, 'name') and self.name is not None:
+ _dict['name'] = self.name
+ 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 ImageExportJobPatch object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'ImageExportJobPatch') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'ImageExportJobPatch') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class ImageExportJobStatusReason:
+ """
+ ImageExportJobStatusReason.
+
+ :attr str code: A snake case string succinctly identifying the status reason.
+ :attr str message: An explanation of the status reason.
+ :attr str more_info: (optional) Link to documentation about this status reason.
+ """
+
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
+ """
+ Initialize a ImageExportJobStatusReason object.
+
+ :param str code: A snake case string succinctly identifying the status
+ reason.
+ :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) -> 'ImageExportJobStatusReason':
+ """Initialize a ImageExportJobStatusReason object from a json dictionary."""
+ args = {}
+ if 'code' in _dict:
+ args['code'] = _dict.get('code')
+ else:
+ raise ValueError('Required property \'code\' not present in ImageExportJobStatusReason JSON')
+ if 'message' in _dict:
+ args['message'] = _dict.get('message')
+ else:
+ raise ValueError('Required property \'message\' not present in ImageExportJobStatusReason JSON')
+ if 'more_info' in _dict:
+ args['more_info'] = _dict.get('more_info')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a ImageExportJobStatusReason 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 ImageExportJobStatusReason object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'ImageExportJobStatusReason') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'ImageExportJobStatusReason') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+ class CodeEnum(str, Enum):
+ """
+ A snake case string succinctly identifying the status reason.
+ """
+
+ CANNOT_ACCESS_STORAGE_BUCKET = 'cannot_access_storage_bucket'
+ INTERNAL_ERROR = 'internal_error'
+
+
+
+class ImageExportJobUnpaginatedCollection:
+ """
+ ImageExportJobUnpaginatedCollection.
+
+ :attr List[ImageExportJob] export_jobs: Collection of image export jobs.
+ """
+
+ def __init__(
+ self,
+ export_jobs: List['ImageExportJob'],
+ ) -> None:
+ """
+ Initialize a ImageExportJobUnpaginatedCollection object.
+
+ :param List[ImageExportJob] export_jobs: Collection of image export jobs.
+ """
+ self.export_jobs = export_jobs
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'ImageExportJobUnpaginatedCollection':
+ """Initialize a ImageExportJobUnpaginatedCollection object from a json dictionary."""
+ args = {}
+ if 'export_jobs' in _dict:
+ args['export_jobs'] = [ImageExportJob.from_dict(v) for v in _dict.get('export_jobs')]
+ else:
+ raise ValueError('Required property \'export_jobs\' not present in ImageExportJobUnpaginatedCollection JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a ImageExportJobUnpaginatedCollection 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, 'export_jobs') and self.export_jobs is not None:
+ export_jobs_list = []
+ for v in self.export_jobs:
+ if isinstance(v, dict):
+ export_jobs_list.append(v)
+ else:
+ export_jobs_list.append(v.to_dict())
+ _dict['export_jobs'] = export_jobs_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 ImageExportJobUnpaginatedCollection object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'ImageExportJobUnpaginatedCollection') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'ImageExportJobUnpaginatedCollection') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class ImageFile:
"""
ImageFile.
@@ -34355,10 +37589,12 @@ class ImageFile():
`failed`.
"""
- def __init__(self,
- *,
- checksums: 'ImageFileChecksums' = None,
- size: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ checksums: 'ImageFileChecksums' = None,
+ size: int = None,
+ ) -> None:
"""
Initialize a ImageFile object.
@@ -34421,16 +37657,19 @@ def __ne__(self, other: 'ImageFile') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageFileChecksums():
+
+class ImageFileChecksums:
"""
ImageFileChecksums.
:attr str sha256: (optional) The SHA256 fingerprint of the image file.
"""
- def __init__(self,
- *,
- sha256: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ sha256: str = None,
+ ) -> None:
"""
Initialize a ImageFileChecksums object.
@@ -34476,7 +37715,8 @@ def __ne__(self, other: 'ImageFileChecksums') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageFilePrototype():
+
+class ImageFilePrototype:
"""
ImageFilePrototype.
@@ -34485,8 +37725,10 @@ class ImageFilePrototype():
`qcow2` or `vhd`.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ImageFilePrototype object.
@@ -34537,22 +37779,27 @@ def __ne__(self, other: 'ImageFilePrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageIdentity():
+
+class ImageIdentity:
"""
Identifies an image by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a ImageIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ImageIdentityById', 'ImageIdentityByCRN', 'ImageIdentityByHref']))
+ ", ".join(['ImageIdentityById', 'ImageIdentityByCRN', 'ImageIdentityByHref'])
+ )
raise Exception(msg)
-class ImagePatch():
+
+class ImagePatch:
"""
ImagePatch.
@@ -34561,9 +37808,11 @@ class ImagePatch():
system-provided images, and are not allowed.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a ImagePatch object.
@@ -34611,7 +37860,8 @@ def __ne__(self, other: 'ImagePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImagePrototype():
+
+class ImagePrototype:
"""
ImagePrototype.
@@ -34624,10 +37874,12 @@ class ImagePrototype():
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
"""
- def __init__(self,
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a ImagePrototype object.
@@ -34641,10 +37893,12 @@ def __init__(self,
used.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ImagePrototypeImageByFile', 'ImagePrototypeImageBySourceVolume']))
+ ", ".join(['ImagePrototypeImageByFile', 'ImagePrototypeImageBySourceVolume'])
+ )
raise Exception(msg)
-class ImageReference():
+
+class ImageReference:
"""
ImageReference.
@@ -34658,13 +37912,15 @@ class ImageReference():
the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'ImageReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'ImageReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ImageReference object.
@@ -34748,7 +38004,8 @@ def __ne__(self, other: 'ImageReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageReferenceDeleted():
+
+class ImageReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -34756,8 +38013,10 @@ class ImageReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a ImageReferenceDeleted object.
@@ -34805,7 +38064,8 @@ def __ne__(self, other: 'ImageReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ImageStatusReason():
+
+class ImageStatusReason:
"""
ImageStatusReason.
@@ -34814,11 +38074,13 @@ class ImageStatusReason():
:attr str more_info: (optional) Link to documentation about this status reason.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a ImageStatusReason object.
@@ -34886,6 +38148,7 @@ class CodeEnum(str, Enum):
"""
A snake case string succinctly identifying the status reason.
"""
+
ENCRYPTED_DATA_KEY_INVALID = 'encrypted_data_key_invalid'
ENCRYPTION_KEY_DELETED = 'encryption_key_deleted'
ENCRYPTION_KEY_DISABLED = 'encryption_key_disabled'
@@ -34895,7 +38158,8 @@ class CodeEnum(str, Enum):
IMAGE_REQUEST_QUEUED = 'image_request_queued'
-class Instance():
+
+class Instance:
"""
Instance.
@@ -34972,40 +38236,42 @@ class Instance():
:attr ZoneReference zone: The zone this virtual server instance resides in.
"""
- def __init__(self,
- availability_policy: 'InstanceAvailabilityPolicy',
- bandwidth: int,
- boot_volume_attachment: 'VolumeAttachmentReferenceInstanceContext',
- created_at: datetime,
- crn: str,
- disks: List['InstanceDisk'],
- href: str,
- id: str,
- lifecycle_reasons: List['InstanceLifecycleReason'],
- lifecycle_state: str,
- memory: int,
- metadata_service: 'InstanceMetadataService',
- name: str,
- network_interfaces: List['NetworkInterfaceInstanceContextReference'],
- primary_network_interface: 'NetworkInterfaceInstanceContextReference',
- profile: 'InstanceProfileReference',
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- startable: bool,
- status: str,
- status_reasons: List['InstanceStatusReason'],
- total_network_bandwidth: int,
- total_volume_bandwidth: int,
- vcpu: 'InstanceVCPU',
- volume_attachments: List['VolumeAttachmentReferenceInstanceContext'],
- vpc: 'VPCReference',
- zone: 'ZoneReference',
- *,
- catalog_offering: 'InstanceCatalogOffering' = None,
- dedicated_host: 'DedicatedHostReference' = None,
- gpu: 'InstanceGPU' = None,
- image: 'ImageReference' = None,
- placement_target: 'InstancePlacementTarget' = None) -> None:
+ def __init__(
+ self,
+ availability_policy: 'InstanceAvailabilityPolicy',
+ bandwidth: int,
+ boot_volume_attachment: 'VolumeAttachmentReferenceInstanceContext',
+ created_at: datetime,
+ crn: str,
+ disks: List['InstanceDisk'],
+ href: str,
+ id: str,
+ lifecycle_reasons: List['InstanceLifecycleReason'],
+ lifecycle_state: str,
+ memory: int,
+ metadata_service: 'InstanceMetadataService',
+ name: str,
+ network_interfaces: List['NetworkInterfaceInstanceContextReference'],
+ primary_network_interface: 'NetworkInterfaceInstanceContextReference',
+ profile: 'InstanceProfileReference',
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ startable: bool,
+ status: str,
+ status_reasons: List['InstanceStatusReason'],
+ total_network_bandwidth: int,
+ total_volume_bandwidth: int,
+ vcpu: 'InstanceVCPU',
+ volume_attachments: List['VolumeAttachmentReferenceInstanceContext'],
+ vpc: 'VPCReference',
+ zone: 'ZoneReference',
+ *,
+ catalog_offering: 'InstanceCatalogOffering' = None,
+ dedicated_host: 'DedicatedHostReference' = None,
+ gpu: 'InstanceGPU' = None,
+ image: 'ImageReference' = None,
+ placement_target: 'InstancePlacementTarget' = None,
+ ) -> None:
"""
Initialize a Instance object.
@@ -35411,6 +38677,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the virtual server instance.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -35424,6 +38691,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE = 'instance'
@@ -35435,6 +38703,7 @@ class StatusEnum(str, Enum):
surface the error, or bypass the instance on which the unexpected property value
was encountered.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -35445,7 +38714,8 @@ class StatusEnum(str, Enum):
STOPPING = 'stopping'
-class InstanceAction():
+
+class InstanceAction:
"""
InstanceAction.
@@ -35462,16 +38732,18 @@ class InstanceAction():
:attr str type: The type of action.
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- status: str,
- type: str,
- *,
- completed_at: datetime = None,
- force: bool = None,
- started_at: datetime = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ status: str,
+ type: str,
+ *,
+ completed_at: datetime = None,
+ force: bool = None,
+ started_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceAction object.
@@ -35576,6 +38848,7 @@ class StatusEnum(str, Enum):
"""
The current status of this action.
"""
+
COMPLETED = 'completed'
FAILED = 'failed'
PENDING = 'pending'
@@ -35586,12 +38859,14 @@ class TypeEnum(str, Enum):
"""
The type of action.
"""
+
REBOOT = 'reboot'
START = 'start'
STOP = 'stop'
-class InstanceAvailabilityPolicy():
+
+class InstanceAvailabilityPolicy:
"""
InstanceAvailabilityPolicy.
@@ -35606,8 +38881,10 @@ class InstanceAvailabilityPolicy():
property value was encountered.
"""
- def __init__(self,
- host_failure: str) -> None:
+ def __init__(
+ self,
+ host_failure: str,
+ ) -> None:
"""
Initialize a InstanceAvailabilityPolicy object.
@@ -35673,11 +38950,13 @@ class HostFailureEnum(str, Enum):
processing and surface the error, or bypass the instance on which the unexpected
property value was encountered.
"""
+
RESTART = 'restart'
STOP = 'stop'
-class InstanceAvailabilityPolicyPatch():
+
+class InstanceAvailabilityPolicyPatch:
"""
InstanceAvailabilityPolicyPatch.
@@ -35688,9 +38967,11 @@ class InstanceAvailabilityPolicyPatch():
- `stop`: Leave the virtual server instance stopped after host failure.
"""
- def __init__(self,
- *,
- host_failure: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ host_failure: str = None,
+ ) -> None:
"""
Initialize a InstanceAvailabilityPolicyPatch object.
@@ -35746,11 +39027,13 @@ class HostFailureEnum(str, Enum):
- `restart`: Automatically restart the virtual server instance after host failure
- `stop`: Leave the virtual server instance stopped after host failure.
"""
+
RESTART = 'restart'
STOP = 'stop'
-class InstanceAvailabilityPolicyPrototype():
+
+class InstanceAvailabilityPolicyPrototype:
"""
InstanceAvailabilityPolicyPrototype.
@@ -35761,9 +39044,11 @@ class InstanceAvailabilityPolicyPrototype():
- `stop`: Leave the virtual server instance stopped after host failure.
"""
- def __init__(self,
- *,
- host_failure: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ host_failure: str = None,
+ ) -> None:
"""
Initialize a InstanceAvailabilityPolicyPrototype object.
@@ -35819,11 +39104,13 @@ class HostFailureEnum(str, Enum):
- `restart`: Automatically restart the virtual server instance after host failure
- `stop`: Leave the virtual server instance stopped after host failure.
"""
+
RESTART = 'restart'
STOP = 'stop'
-class InstanceCatalogOffering():
+
+class InstanceCatalogOffering:
"""
InstanceCatalogOffering.
@@ -35838,8 +39125,10 @@ class InstanceCatalogOffering():
have the same checksum, and therefore will have the same data.
"""
- def __init__(self,
- version: 'CatalogOfferingVersionReference') -> None:
+ def __init__(
+ self,
+ version: 'CatalogOfferingVersionReference',
+ ) -> None:
"""
Initialize a InstanceCatalogOffering object.
@@ -35898,7 +39187,8 @@ def __ne__(self, other: 'InstanceCatalogOffering') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceCatalogOfferingPrototype():
+
+class InstanceCatalogOfferingPrototype:
"""
The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering or offering version to use when provisioning this virtual server instance.
@@ -35909,16 +39199,20 @@ class InstanceCatalogOfferingPrototype():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceCatalogOfferingPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceCatalogOfferingPrototypeCatalogOfferingByOffering', 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion']))
+ ", ".join(['InstanceCatalogOfferingPrototypeCatalogOfferingByOffering', 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersion'])
+ )
raise Exception(msg)
-class InstanceCollection():
+
+class InstanceCollection:
"""
InstanceCollection.
@@ -35932,13 +39226,15 @@ class InstanceCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'InstanceCollectionFirst',
- instances: List['Instance'],
- limit: int,
- total_count: int,
- *,
- next: 'InstanceCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'InstanceCollectionFirst',
+ instances: List['Instance'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'InstanceCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceCollection object.
@@ -36032,15 +39328,18 @@ def __ne__(self, other: 'InstanceCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceCollectionFirst():
+
+class InstanceCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceCollectionFirst object.
@@ -36088,7 +39387,8 @@ def __ne__(self, other: 'InstanceCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceCollectionNext():
+
+class InstanceCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -36096,8 +39396,10 @@ class InstanceCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceCollectionNext object.
@@ -36145,7 +39447,8 @@ def __ne__(self, other: 'InstanceCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceConsoleAccessToken():
+
+class InstanceConsoleAccessToken:
"""
The instance console access token information.
@@ -36161,13 +39464,15 @@ class InstanceConsoleAccessToken():
:attr str href: The URL to access this instance console.
"""
- def __init__(self,
- access_token: str,
- console_type: str,
- created_at: datetime,
- expires_at: datetime,
- force: bool,
- href: str) -> None:
+ def __init__(
+ self,
+ access_token: str,
+ console_type: str,
+ created_at: datetime,
+ expires_at: datetime,
+ force: bool,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceConsoleAccessToken object.
@@ -36265,11 +39570,13 @@ class ConsoleTypeEnum(str, Enum):
"""
The instance console type for which this token may be used.
"""
+
SERIAL = 'serial'
VNC = 'vnc'
-class InstanceDefaultTrustedProfilePrototype():
+
+class InstanceDefaultTrustedProfilePrototype:
"""
InstanceDefaultTrustedProfilePrototype.
@@ -36281,10 +39588,12 @@ class InstanceDefaultTrustedProfilePrototype():
this virtual server instance.
"""
- def __init__(self,
- target: 'TrustedProfileIdentity',
- *,
- auto_link: bool = None) -> None:
+ def __init__(
+ self,
+ target: 'TrustedProfileIdentity',
+ *,
+ auto_link: bool = None,
+ ) -> None:
"""
Initialize a InstanceDefaultTrustedProfilePrototype object.
@@ -36346,7 +39655,8 @@ def __ne__(self, other: 'InstanceDefaultTrustedProfilePrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceDisk():
+
+class InstanceDisk:
"""
InstanceDisk.
@@ -36364,14 +39674,16 @@ class InstanceDisk():
:attr int size: The size of the disk in GB (gigabytes).
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- interface_type: str,
- name: str,
- resource_type: str,
- size: int) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ interface_type: str,
+ name: str,
+ resource_type: str,
+ size: int,
+ ) -> None:
"""
Initialize a InstanceDisk object.
@@ -36480,6 +39792,7 @@ class InterfaceTypeEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
VIRTIO_BLK = 'virtio_blk'
@@ -36488,18 +39801,22 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_DISK = 'instance_disk'
-class InstanceDiskCollection():
+
+class InstanceDiskCollection:
"""
InstanceDiskCollection.
:attr List[InstanceDisk] disks: Collection of the instance's disks.
"""
- def __init__(self,
- disks: List['InstanceDisk']) -> None:
+ def __init__(
+ self,
+ disks: List['InstanceDisk'],
+ ) -> None:
"""
Initialize a InstanceDiskCollection object.
@@ -36553,7 +39870,8 @@ def __ne__(self, other: 'InstanceDiskCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceDiskPatch():
+
+class InstanceDiskPatch:
"""
InstanceDiskPatch.
@@ -36561,9 +39879,11 @@ class InstanceDiskPatch():
used by another disk on the instance.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceDiskPatch object.
@@ -36610,7 +39930,8 @@ def __ne__(self, other: 'InstanceDiskPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceDiskReference():
+
+class InstanceDiskReference:
"""
InstanceDiskReference.
@@ -36624,13 +39945,15 @@ class InstanceDiskReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'InstanceDiskReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'InstanceDiskReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceDiskReference object.
@@ -36718,10 +40041,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_DISK = 'instance_disk'
-class InstanceDiskReferenceDeleted():
+
+class InstanceDiskReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -36729,8 +40054,10 @@ class InstanceDiskReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceDiskReferenceDeleted object.
@@ -36778,7 +40105,8 @@ def __ne__(self, other: 'InstanceDiskReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGPU():
+
+class InstanceGPU:
"""
The virtual server instance GPU configuration.
@@ -36788,11 +40116,13 @@ class InstanceGPU():
:attr str model: The GPU model.
"""
- def __init__(self,
- count: int,
- manufacturer: str,
- memory: int,
- model: str) -> None:
+ def __init__(
+ self,
+ count: int,
+ manufacturer: str,
+ memory: int,
+ model: str,
+ ) -> None:
"""
Initialize a InstanceGPU object.
@@ -36864,7 +40194,8 @@ def __ne__(self, other: 'InstanceGPU') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroup():
+
+class InstanceGroup:
"""
InstanceGroup.
@@ -36900,23 +40231,25 @@ class InstanceGroup():
:attr VPCReference vpc: The VPC the instance group resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- instance_template: 'InstanceTemplateReference',
- managers: List['InstanceGroupManagerReference'],
- membership_count: int,
- name: str,
- resource_group: 'ResourceGroupReference',
- status: str,
- subnets: List['SubnetReference'],
- updated_at: datetime,
- vpc: 'VPCReference',
- *,
- application_port: int = None,
- load_balancer_pool: 'LoadBalancerPoolReference' = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ instance_template: 'InstanceTemplateReference',
+ managers: List['InstanceGroupManagerReference'],
+ membership_count: int,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ status: str,
+ subnets: List['SubnetReference'],
+ updated_at: datetime,
+ vpc: 'VPCReference',
+ *,
+ application_port: int = None,
+ load_balancer_pool: 'LoadBalancerPoolReference' = None,
+ ) -> None:
"""
Initialize a InstanceGroup object.
@@ -37121,13 +40454,15 @@ class StatusEnum(str, Enum):
`membership_count`
- `unhealthy`: Group is unable to reach `membership_count` instances.
"""
+
DELETING = 'deleting'
HEALTHY = 'healthy'
SCALING = 'scaling'
UNHEALTHY = 'unhealthy'
-class InstanceGroupCollection():
+
+class InstanceGroupCollection:
"""
InstanceGroupCollection.
@@ -37141,13 +40476,15 @@ class InstanceGroupCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'InstanceGroupCollectionFirst',
- instance_groups: List['InstanceGroup'],
- limit: int,
- total_count: int,
- *,
- next: 'InstanceGroupCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'InstanceGroupCollectionFirst',
+ instance_groups: List['InstanceGroup'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'InstanceGroupCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceGroupCollection object.
@@ -37241,15 +40578,18 @@ def __ne__(self, other: 'InstanceGroupCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupCollectionFirst():
+
+class InstanceGroupCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupCollectionFirst object.
@@ -37297,7 +40637,8 @@ def __ne__(self, other: 'InstanceGroupCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupCollectionNext():
+
+class InstanceGroupCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -37305,8 +40646,10 @@ class InstanceGroupCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupCollectionNext object.
@@ -37354,7 +40697,8 @@ def __ne__(self, other: 'InstanceGroupCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManager():
+
+class InstanceGroupManager:
"""
InstanceGroupManager.
@@ -37370,13 +40714,15 @@ class InstanceGroupManager():
updated.
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- management_enabled: bool,
- name: str,
- updated_at: datetime) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ management_enabled: bool,
+ name: str,
+ updated_at: datetime,
+ ) -> None:
"""
Initialize a InstanceGroupManager object.
@@ -37392,10 +40738,12 @@ def __init__(self,
manager was updated.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerAutoScale', 'InstanceGroupManagerScheduled']))
+ ", ".join(['InstanceGroupManagerAutoScale', 'InstanceGroupManagerScheduled'])
+ )
raise Exception(msg)
-class InstanceGroupManagerAction():
+
+class InstanceGroupManagerAction:
"""
InstanceGroupManagerAction.
@@ -37424,16 +40772,18 @@ class InstanceGroupManagerAction():
action was updated.
"""
- def __init__(self,
- auto_delete: bool,
- auto_delete_timeout: int,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- status: str,
- updated_at: datetime) -> None:
+ def __init__(
+ self,
+ auto_delete: bool,
+ auto_delete_timeout: int,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ status: str,
+ updated_at: datetime,
+ ) -> None:
"""
Initialize a InstanceGroupManagerAction object.
@@ -37465,13 +40815,15 @@ def __init__(self,
manager action was updated.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerActionScheduledAction']))
+ ", ".join(['InstanceGroupManagerActionScheduledAction'])
+ )
raise Exception(msg)
class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action'
@@ -37484,6 +40836,7 @@ class StatusEnum(str, Enum):
- `incompatible`: Action parameters are not compatible with the group or manager
- `omitted`: Action was not applied because this action's manager was disabled.
"""
+
ACTIVE = 'active'
COMPLETED = 'completed'
FAILED = 'failed'
@@ -37491,7 +40844,8 @@ class StatusEnum(str, Enum):
OMITTED = 'omitted'
-class InstanceGroupManagerActionGroupPatch():
+
+class InstanceGroupManagerActionGroupPatch:
"""
InstanceGroupManagerActionGroupPatch.
@@ -37499,9 +40853,11 @@ class InstanceGroupManagerActionGroupPatch():
members at the scheduled time.
"""
- def __init__(self,
- *,
- membership_count: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionGroupPatch object.
@@ -37548,7 +40904,8 @@ def __ne__(self, other: 'InstanceGroupManagerActionGroupPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerActionManagerPatch():
+
+class InstanceGroupManagerActionManagerPatch:
"""
InstanceGroupManagerActionManagerPatch.
@@ -37558,10 +40915,12 @@ class InstanceGroupManagerActionManagerPatch():
instance group members at the scheduled time.
"""
- def __init__(self,
- *,
- max_membership_count: int = None,
- min_membership_count: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ max_membership_count: int = None,
+ min_membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionManagerPatch object.
@@ -37615,7 +40974,8 @@ def __ne__(self, other: 'InstanceGroupManagerActionManagerPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerActionPatch():
+
+class InstanceGroupManagerActionPatch:
"""
InstanceGroupManagerActionPatch.
@@ -37629,13 +40989,15 @@ class InstanceGroupManagerActionPatch():
run.
"""
- def __init__(self,
- *,
- cron_spec: str = None,
- group: 'InstanceGroupManagerActionGroupPatch' = None,
- manager: 'InstanceGroupManagerActionManagerPatch' = None,
- name: str = None,
- run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ *,
+ cron_spec: str = None,
+ group: 'InstanceGroupManagerActionGroupPatch' = None,
+ manager: 'InstanceGroupManagerActionManagerPatch' = None,
+ name: str = None,
+ run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPatch object.
@@ -37716,7 +41078,8 @@ def __ne__(self, other: 'InstanceGroupManagerActionPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerActionPrototype():
+
+class InstanceGroupManagerActionPrototype:
"""
InstanceGroupManagerActionPrototype.
@@ -37725,9 +41088,11 @@ class InstanceGroupManagerActionPrototype():
unspecified, the name will be a hyphenated list of randomly-selected words.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototype object.
@@ -37737,10 +41102,12 @@ def __init__(self,
randomly-selected words.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototype']))
+ ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototype'])
+ )
raise Exception(msg)
-class InstanceGroupManagerActionReference():
+
+class InstanceGroupManagerActionReference:
"""
InstanceGroupManagerActionReference.
@@ -37754,13 +41121,15 @@ class InstanceGroupManagerActionReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'InstanceGroupManagerActionReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'InstanceGroupManagerActionReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionReference object.
@@ -37850,10 +41219,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action'
-class InstanceGroupManagerActionReferenceDeleted():
+
+class InstanceGroupManagerActionReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -37861,8 +41232,10 @@ class InstanceGroupManagerActionReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionReferenceDeleted object.
@@ -37910,7 +41283,8 @@ def __ne__(self, other: 'InstanceGroupManagerActionReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerActionsCollection():
+
+class InstanceGroupManagerActionsCollection:
"""
InstanceGroupManagerActionsCollection.
@@ -37926,13 +41300,15 @@ class InstanceGroupManagerActionsCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- actions: List['InstanceGroupManagerAction'],
- first: 'InstanceGroupManagerActionsCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'InstanceGroupManagerActionsCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ actions: List['InstanceGroupManagerAction'],
+ first: 'InstanceGroupManagerActionsCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'InstanceGroupManagerActionsCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionsCollection object.
@@ -38027,15 +41403,18 @@ def __ne__(self, other: 'InstanceGroupManagerActionsCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerActionsCollectionFirst():
+
+class InstanceGroupManagerActionsCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionsCollectionFirst object.
@@ -38083,7 +41462,8 @@ def __ne__(self, other: 'InstanceGroupManagerActionsCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerActionsCollectionNext():
+
+class InstanceGroupManagerActionsCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -38091,8 +41471,10 @@ class InstanceGroupManagerActionsCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionsCollectionNext object.
@@ -38140,7 +41522,8 @@ def __ne__(self, other: 'InstanceGroupManagerActionsCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerCollection():
+
+class InstanceGroupManagerCollection:
"""
InstanceGroupManagerCollection.
@@ -38156,13 +41539,15 @@ class InstanceGroupManagerCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'InstanceGroupManagerCollectionFirst',
- limit: int,
- managers: List['InstanceGroupManager'],
- total_count: int,
- *,
- next: 'InstanceGroupManagerCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'InstanceGroupManagerCollectionFirst',
+ limit: int,
+ managers: List['InstanceGroupManager'],
+ total_count: int,
+ *,
+ next: 'InstanceGroupManagerCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerCollection object.
@@ -38257,15 +41642,18 @@ def __ne__(self, other: 'InstanceGroupManagerCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerCollectionFirst():
+
+class InstanceGroupManagerCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerCollectionFirst object.
@@ -38313,7 +41701,8 @@ def __ne__(self, other: 'InstanceGroupManagerCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerCollectionNext():
+
+class InstanceGroupManagerCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -38321,8 +41710,10 @@ class InstanceGroupManagerCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerCollectionNext object.
@@ -38370,7 +41761,8 @@ def __ne__(self, other: 'InstanceGroupManagerCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPatch():
+
+class InstanceGroupManagerPatch:
"""
InstanceGroupManagerPatch.
@@ -38388,14 +41780,16 @@ class InstanceGroupManagerPatch():
must not be used by another manager for the instance group.
"""
- def __init__(self,
- *,
- aggregation_window: int = None,
- cooldown: int = None,
- management_enabled: bool = None,
- max_membership_count: int = None,
- min_membership_count: int = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ aggregation_window: int = None,
+ cooldown: int = None,
+ management_enabled: bool = None,
+ max_membership_count: int = None,
+ min_membership_count: int = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPatch object.
@@ -38477,7 +41871,8 @@ def __ne__(self, other: 'InstanceGroupManagerPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPolicy():
+
+class InstanceGroupManagerPolicy:
"""
InstanceGroupManagerPolicy.
@@ -38491,12 +41886,14 @@ class InstanceGroupManagerPolicy():
policy was updated.
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- updated_at: datetime) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ updated_at: datetime,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicy object.
@@ -38511,10 +41908,12 @@ def __init__(self,
manager policy was updated.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy']))
+ ", ".join(['InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy'])
+ )
raise Exception(msg)
-class InstanceGroupManagerPolicyCollection():
+
+class InstanceGroupManagerPolicyCollection:
"""
InstanceGroupManagerPolicyCollection.
@@ -38530,13 +41929,15 @@ class InstanceGroupManagerPolicyCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'InstanceGroupManagerPolicyCollectionFirst',
- limit: int,
- policies: List['InstanceGroupManagerPolicy'],
- total_count: int,
- *,
- next: 'InstanceGroupManagerPolicyCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'InstanceGroupManagerPolicyCollectionFirst',
+ limit: int,
+ policies: List['InstanceGroupManagerPolicy'],
+ total_count: int,
+ *,
+ next: 'InstanceGroupManagerPolicyCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyCollection object.
@@ -38631,15 +42032,18 @@ def __ne__(self, other: 'InstanceGroupManagerPolicyCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPolicyCollectionFirst():
+
+class InstanceGroupManagerPolicyCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyCollectionFirst object.
@@ -38687,7 +42091,8 @@ def __ne__(self, other: 'InstanceGroupManagerPolicyCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPolicyCollectionNext():
+
+class InstanceGroupManagerPolicyCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -38695,8 +42100,10 @@ class InstanceGroupManagerPolicyCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyCollectionNext object.
@@ -38744,7 +42151,8 @@ def __ne__(self, other: 'InstanceGroupManagerPolicyCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPolicyPatch():
+
+class InstanceGroupManagerPolicyPatch:
"""
InstanceGroupManagerPolicyPatch.
@@ -38754,11 +42162,13 @@ class InstanceGroupManagerPolicyPatch():
name must not be used by another policy for the instance group manager.
"""
- def __init__(self,
- *,
- metric_type: str = None,
- metric_value: int = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ metric_type: str = None,
+ metric_value: int = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyPatch object.
@@ -38822,13 +42232,15 @@ class MetricTypeEnum(str, Enum):
"""
The type of metric to be evaluated.
"""
+
CPU = 'cpu'
MEMORY = 'memory'
NETWORK_IN = 'network_in'
NETWORK_OUT = 'network_out'
-class InstanceGroupManagerPolicyPrototype():
+
+class InstanceGroupManagerPolicyPrototype:
"""
InstanceGroupManagerPolicyPrototype.
@@ -38837,9 +42249,11 @@ class InstanceGroupManagerPolicyPrototype():
unspecified, the name will be a hyphenated list of randomly-selected words.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyPrototype object.
@@ -38849,10 +42263,12 @@ def __init__(self,
randomly-selected words.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype']))
+ ", ".join(['InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype'])
+ )
raise Exception(msg)
-class InstanceGroupManagerPolicyReference():
+
+class InstanceGroupManagerPolicyReference:
"""
InstanceGroupManagerPolicyReference.
@@ -38865,12 +42281,14 @@ class InstanceGroupManagerPolicyReference():
unique across all policies for the instance group manager.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceGroupManagerPolicyReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceGroupManagerPolicyReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyReference object.
@@ -38948,7 +42366,8 @@ def __ne__(self, other: 'InstanceGroupManagerPolicyReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPolicyReferenceDeleted():
+
+class InstanceGroupManagerPolicyReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -38956,8 +42375,10 @@ class InstanceGroupManagerPolicyReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyReferenceDeleted object.
@@ -39005,7 +42426,8 @@ def __ne__(self, other: 'InstanceGroupManagerPolicyReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerPrototype():
+
+class InstanceGroupManagerPrototype:
"""
InstanceGroupManagerPrototype.
@@ -39016,10 +42438,12 @@ class InstanceGroupManagerPrototype():
name will be a hyphenated list of randomly-selected words.
"""
- def __init__(self,
- *,
- management_enabled: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ management_enabled: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPrototype object.
@@ -39030,10 +42454,12 @@ def __init__(self,
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)
-class InstanceGroupManagerReference():
+
+class InstanceGroupManagerReference:
"""
InstanceGroupManagerReference.
@@ -39046,12 +42472,14 @@ class InstanceGroupManagerReference():
across all managers for the instance group.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceGroupManagerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceGroupManagerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerReference object.
@@ -39128,7 +42556,8 @@ def __ne__(self, other: 'InstanceGroupManagerReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerReferenceDeleted():
+
+class InstanceGroupManagerReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -39136,8 +42565,10 @@ class InstanceGroupManagerReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerReferenceDeleted object.
@@ -39185,7 +42616,8 @@ def __ne__(self, other: 'InstanceGroupManagerReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerScheduledActionGroup():
+
+class InstanceGroupManagerScheduledActionGroup:
"""
InstanceGroupManagerScheduledActionGroup.
@@ -39193,8 +42625,10 @@ class InstanceGroupManagerScheduledActionGroup():
scheduled time.
"""
- def __init__(self,
- membership_count: int) -> None:
+ def __init__(
+ self,
+ membership_count: int,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionGroup object.
@@ -39243,7 +42677,8 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionGroup') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerScheduledActionGroupPrototype():
+
+class InstanceGroupManagerScheduledActionGroupPrototype:
"""
InstanceGroupManagerScheduledActionGroupPrototype.
@@ -39251,8 +42686,10 @@ class InstanceGroupManagerScheduledActionGroupPrototype():
scheduled time.
"""
- def __init__(self,
- membership_count: int) -> None:
+ def __init__(
+ self,
+ membership_count: int,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionGroupPrototype object.
@@ -39301,37 +42738,46 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionGroupPrototype') ->
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupManagerScheduledActionManager():
+
+class InstanceGroupManagerScheduledActionManager:
"""
InstanceGroupManagerScheduledActionManager.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionManager object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerScheduledActionManagerAutoScale']))
+ ", ".join(['InstanceGroupManagerScheduledActionManagerAutoScale'])
+ )
raise Exception(msg)
-class InstanceGroupManagerScheduledActionManagerPrototype():
+
+class InstanceGroupManagerScheduledActionManagerPrototype:
"""
InstanceGroupManagerScheduledActionManagerPrototype.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionManagerPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype']))
+ ", ".join(['InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype'])
+ )
raise Exception(msg)
-class InstanceGroupMembership():
+
+class InstanceGroupMembership:
"""
InstanceGroupMembership.
@@ -39356,18 +42802,20 @@ class InstanceGroupMembership():
was updated.
"""
- def __init__(self,
- created_at: datetime,
- delete_instance_on_membership_delete: bool,
- href: str,
- id: str,
- instance: 'InstanceReference',
- instance_template: 'InstanceTemplateReference',
- name: str,
- status: str,
- updated_at: datetime,
- *,
- pool_member: 'LoadBalancerPoolMemberReference' = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ delete_instance_on_membership_delete: bool,
+ href: str,
+ id: str,
+ instance: 'InstanceReference',
+ instance_template: 'InstanceTemplateReference',
+ name: str,
+ status: str,
+ updated_at: datetime,
+ *,
+ pool_member: 'LoadBalancerPoolMemberReference' = None,
+ ) -> None:
"""
Initialize a InstanceGroupMembership object.
@@ -39512,6 +42960,7 @@ class StatusEnum(str, Enum):
- `pending`: Membership is waiting for dependent resources
- `unhealthy`: Membership has unhealthy dependent resources.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
HEALTHY = 'healthy'
@@ -39519,7 +42968,8 @@ class StatusEnum(str, Enum):
UNHEALTHY = 'unhealthy'
-class InstanceGroupMembershipCollection():
+
+class InstanceGroupMembershipCollection:
"""
InstanceGroupMembershipCollection.
@@ -39535,13 +42985,15 @@ class InstanceGroupMembershipCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'InstanceGroupMembershipCollectionFirst',
- limit: int,
- memberships: List['InstanceGroupMembership'],
- total_count: int,
- *,
- next: 'InstanceGroupMembershipCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'InstanceGroupMembershipCollectionFirst',
+ limit: int,
+ memberships: List['InstanceGroupMembership'],
+ total_count: int,
+ *,
+ next: 'InstanceGroupMembershipCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceGroupMembershipCollection object.
@@ -39636,15 +43088,18 @@ def __ne__(self, other: 'InstanceGroupMembershipCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupMembershipCollectionFirst():
+
+class InstanceGroupMembershipCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupMembershipCollectionFirst object.
@@ -39692,7 +43147,8 @@ def __ne__(self, other: 'InstanceGroupMembershipCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupMembershipCollectionNext():
+
+class InstanceGroupMembershipCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -39700,8 +43156,10 @@ class InstanceGroupMembershipCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceGroupMembershipCollectionNext object.
@@ -39749,7 +43207,8 @@ def __ne__(self, other: 'InstanceGroupMembershipCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupMembershipPatch():
+
+class InstanceGroupMembershipPatch:
"""
InstanceGroupMembershipPatch.
@@ -39757,9 +43216,11 @@ class InstanceGroupMembershipPatch():
must not be used by another membership for the instance group manager.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupMembershipPatch object.
@@ -39807,7 +43268,8 @@ def __ne__(self, other: 'InstanceGroupMembershipPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupPatch():
+
+class InstanceGroupPatch:
"""
To add or update load balancer specification for an instance group the
`membership_count` must first be set to 0.
@@ -39824,10 +43286,10 @@ class InstanceGroupPatch():
associated with the specified load balancer pool.
Required if `load_balancer_pool` is specified.
At present, only load balancers in the `application` family are supported.
- :attr LoadBalancerPoolIdentity load_balancer_pool: (optional) If specified, the
- load balancer pool this instance group will manage. A pool member
- will be created for each instance created by this group.
- If specified, `load_balancer` and `application_port` must also be specified.
+ :attr LoadBalancerPoolIdentity load_balancer_pool: (optional) If set, the load
+ balancer pool this instance group will manage. A pool member will
+ be created for each instance created by this group.
+ If set, `load_balancer` and `application_port` must also be set.
:attr int membership_count: (optional) The number of instances in the instance
group.
:attr str name: (optional) The name for this instance group. The name must not
@@ -39836,15 +43298,17 @@ class InstanceGroupPatch():
new instances.
"""
- def __init__(self,
- *,
- application_port: int = None,
- instance_template: 'InstanceTemplateIdentity' = None,
- load_balancer: 'LoadBalancerIdentity' = None,
- load_balancer_pool: 'LoadBalancerPoolIdentity' = None,
- membership_count: int = None,
- name: str = None,
- subnets: List['SubnetIdentity'] = None) -> None:
+ def __init__(
+ self,
+ *,
+ application_port: int = None,
+ instance_template: 'InstanceTemplateIdentity' = None,
+ load_balancer: 'LoadBalancerIdentity' = None,
+ load_balancer_pool: 'LoadBalancerPoolIdentity' = None,
+ membership_count: int = None,
+ name: str = None,
+ subnets: List['SubnetIdentity'] = None,
+ ) -> None:
"""
Initialize a InstanceGroupPatch object.
@@ -39860,12 +43324,10 @@ def __init__(self,
associated with the specified load balancer pool.
Required if `load_balancer_pool` is specified.
At present, only load balancers in the `application` family are supported.
- :param LoadBalancerPoolIdentity load_balancer_pool: (optional) If
- specified, the load balancer pool this instance group will manage. A pool
- member
- will be created for each instance created by this group.
- If specified, `load_balancer` and `application_port` must also be
- specified.
+ :param LoadBalancerPoolIdentity load_balancer_pool: (optional) If set, the
+ load balancer pool this instance group will manage. A pool member will
+ be created for each instance created by this group.
+ If set, `load_balancer` and `application_port` must also be set.
:param int membership_count: (optional) The number of instances in the
instance group.
:param str name: (optional) The name for this instance group. The name must
@@ -39958,7 +43420,8 @@ def __ne__(self, other: 'InstanceGroupPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupReference():
+
+class InstanceGroupReference:
"""
InstanceGroupReference.
@@ -39972,13 +43435,15 @@ class InstanceGroupReference():
instance groups in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceGroupReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceGroupReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceGroupReference object.
@@ -40062,7 +43527,8 @@ def __ne__(self, other: 'InstanceGroupReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceGroupReferenceDeleted():
+
+class InstanceGroupReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -40070,8 +43536,10 @@ class InstanceGroupReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceGroupReferenceDeleted object.
@@ -40119,7 +43587,8 @@ def __ne__(self, other: 'InstanceGroupReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceInitialization():
+
+class InstanceInitialization:
"""
InstanceInitialization.
@@ -40132,11 +43601,13 @@ class InstanceInitialization():
:attr InstanceInitializationPassword password: (optional)
"""
- def __init__(self,
- keys: List['KeyReference'],
- *,
- default_trusted_profile: 'InstanceInitializationDefaultTrustedProfile' = None,
- password: 'InstanceInitializationPassword' = None) -> None:
+ def __init__(
+ self,
+ keys: List['KeyReference'],
+ *,
+ default_trusted_profile: 'InstanceInitializationDefaultTrustedProfile' = None,
+ password: 'InstanceInitializationPassword' = None,
+ ) -> None:
"""
Initialize a InstanceInitialization object.
@@ -40212,7 +43683,8 @@ def __ne__(self, other: 'InstanceInitialization') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceInitializationDefaultTrustedProfile():
+
+class InstanceInitializationDefaultTrustedProfile:
"""
InstanceInitializationDefaultTrustedProfile.
@@ -40224,9 +43696,11 @@ class InstanceInitializationDefaultTrustedProfile():
this virtual server instance.
"""
- def __init__(self,
- auto_link: bool,
- target: 'TrustedProfileReference') -> None:
+ def __init__(
+ self,
+ auto_link: bool,
+ target: 'TrustedProfileReference',
+ ) -> None:
"""
Initialize a InstanceInitializationDefaultTrustedProfile object.
@@ -40289,7 +43763,8 @@ def __ne__(self, other: 'InstanceInitializationDefaultTrustedProfile') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceInitializationPassword():
+
+class InstanceInitializationPassword:
"""
InstanceInitializationPassword.
@@ -40299,9 +43774,11 @@ class InstanceInitializationPassword():
encrypt the administrator password.
"""
- def __init__(self,
- encrypted_password: bytes,
- encryption_key: 'KeyIdentityByFingerprint') -> None:
+ def __init__(
+ self,
+ encrypted_password: bytes,
+ encryption_key: 'KeyIdentityByFingerprint',
+ ) -> None:
"""
Initialize a InstanceInitializationPassword object.
@@ -40363,7 +43840,8 @@ def __ne__(self, other: 'InstanceInitializationPassword') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceLifecycleReason():
+
+class InstanceLifecycleReason:
"""
InstanceLifecycleReason.
@@ -40374,11 +43852,13 @@ class InstanceLifecycleReason():
lifecycle state.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a InstanceLifecycleReason object.
@@ -40446,10 +43926,12 @@ class CodeEnum(str, Enum):
"""
A snake case string succinctly identifying the reason for this lifecycle state.
"""
+
RESOURCE_SUSPENDED_BY_PROVIDER = 'resource_suspended_by_provider'
-class InstanceMetadataService():
+
+class InstanceMetadataService:
"""
The metadata service configuration.
@@ -40464,10 +43946,12 @@ class InstanceMetadataService():
enabled.
"""
- def __init__(self,
- enabled: bool,
- protocol: str,
- response_hop_limit: int) -> None:
+ def __init__(
+ self,
+ enabled: bool,
+ protocol: str,
+ response_hop_limit: int,
+ ) -> None:
"""
Initialize a InstanceMetadataService object.
@@ -40544,11 +44028,13 @@ class ProtocolEnum(str, Enum):
- `http`: HTTP protocol (unencrypted)
- `https`: HTTP Secure protocol.
"""
+
HTTP = 'http'
HTTPS = 'https'
-class InstanceMetadataServicePatch():
+
+class InstanceMetadataServicePatch:
"""
The metadata service configuration.
@@ -40563,11 +44049,13 @@ class InstanceMetadataServicePatch():
service is enabled.
"""
- def __init__(self,
- *,
- enabled: bool = None,
- protocol: str = None,
- response_hop_limit: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ enabled: bool = None,
+ protocol: str = None,
+ response_hop_limit: int = None,
+ ) -> None:
"""
Initialize a InstanceMetadataServicePatch object.
@@ -40639,11 +44127,13 @@ class ProtocolEnum(str, Enum):
- `http`: HTTP protocol (unencrypted)
- `https`: HTTP Secure protocol.
"""
+
HTTP = 'http'
HTTPS = 'https'
-class InstanceMetadataServicePrototype():
+
+class InstanceMetadataServicePrototype:
"""
The metadata service configuration.
@@ -40658,11 +44148,13 @@ class InstanceMetadataServicePrototype():
service is enabled.
"""
- def __init__(self,
- *,
- enabled: bool = None,
- protocol: str = None,
- response_hop_limit: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ enabled: bool = None,
+ protocol: str = None,
+ response_hop_limit: int = None,
+ ) -> None:
"""
Initialize a InstanceMetadataServicePrototype object.
@@ -40734,11 +44226,13 @@ class ProtocolEnum(str, Enum):
- `http`: HTTP protocol (unencrypted)
- `https`: HTTP Secure protocol.
"""
+
HTTP = 'http'
HTTPS = 'https'
-class InstancePatch():
+
+class InstancePatch:
"""
InstancePatch.
@@ -40773,14 +44267,16 @@ class InstancePatch():
`total_network_bandwidth`.
"""
- def __init__(self,
- *,
- availability_policy: 'InstanceAvailabilityPolicyPatch' = None,
- metadata_service: 'InstanceMetadataServicePatch' = None,
- name: str = None,
- placement_target: 'InstancePlacementTargetPatch' = None,
- profile: 'InstancePatchProfile' = None,
- total_volume_bandwidth: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPatch' = None,
+ metadata_service: 'InstanceMetadataServicePatch' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPatch' = None,
+ profile: 'InstancePatchProfile' = None,
+ total_volume_bandwidth: int = None,
+ ) -> None:
"""
Initialize a InstancePatch object.
@@ -40896,7 +44392,8 @@ def __ne__(self, other: 'InstancePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstancePatchProfile():
+
+class InstancePatchProfile:
"""
The profile to use for this virtual server instance. For the profile to be changed,
the instance `status` must be `stopping` or `stopped`. In addition, the requested
@@ -40912,61 +44409,77 @@ class InstancePatchProfile():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePatchProfile object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePatchProfileInstanceProfileIdentityByName', 'InstancePatchProfileInstanceProfileIdentityByHref']))
+ ", ".join(['InstancePatchProfileInstanceProfileIdentityByName', 'InstancePatchProfileInstanceProfileIdentityByHref'])
+ )
raise Exception(msg)
-class InstancePlacementTarget():
+
+class InstancePlacementTarget:
"""
InstancePlacementTarget.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetDedicatedHostGroupReference', 'InstancePlacementTargetDedicatedHostReference', 'InstancePlacementTargetPlacementGroupReference']))
+ ", ".join(['InstancePlacementTargetDedicatedHostGroupReference', 'InstancePlacementTargetDedicatedHostReference', 'InstancePlacementTargetPlacementGroupReference'])
+ )
raise Exception(msg)
-class InstancePlacementTargetPatch():
+
+class InstancePlacementTargetPatch:
"""
InstancePlacementTargetPatch.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentity', 'InstancePlacementTargetPatchDedicatedHostGroupIdentity']))
+ ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentity', 'InstancePlacementTargetPatchDedicatedHostGroupIdentity'])
+ )
raise Exception(msg)
-class InstancePlacementTargetPrototype():
+
+class InstancePlacementTargetPrototype:
"""
InstancePlacementTargetPrototype.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPrototypeDedicatedHostIdentity', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentity', 'InstancePlacementTargetPrototypePlacementGroupIdentity']))
+ ", ".join(['InstancePlacementTargetPrototypeDedicatedHostIdentity', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentity', 'InstancePlacementTargetPrototypePlacementGroupIdentity'])
+ )
raise Exception(msg)
-class InstanceProfile():
+
+class InstanceProfile:
"""
InstanceProfile.
@@ -40992,25 +44505,27 @@ class InstanceProfile():
:attr InstanceProfileVCPUManufacturer vcpu_manufacturer:
"""
- def __init__(self,
- bandwidth: 'InstanceProfileBandwidth',
- disks: List['InstanceProfileDisk'],
- family: str,
- href: str,
- memory: 'InstanceProfileMemory',
- name: str,
- network_interface_count: 'InstanceProfileNetworkInterfaceCount',
- os_architecture: 'InstanceProfileOSArchitecture',
- port_speed: 'InstanceProfilePortSpeed',
- total_volume_bandwidth: 'InstanceProfileVolumeBandwidth',
- vcpu_architecture: 'InstanceProfileVCPUArchitecture',
- vcpu_count: 'InstanceProfileVCPU',
- vcpu_manufacturer: 'InstanceProfileVCPUManufacturer',
- *,
- gpu_count: 'InstanceProfileGPU' = None,
- gpu_manufacturer: 'InstanceProfileGPUManufacturer' = None,
- gpu_memory: 'InstanceProfileGPUMemory' = None,
- gpu_model: 'InstanceProfileGPUModel' = None) -> None:
+ def __init__(
+ self,
+ bandwidth: 'InstanceProfileBandwidth',
+ disks: List['InstanceProfileDisk'],
+ family: str,
+ href: str,
+ memory: 'InstanceProfileMemory',
+ name: str,
+ network_interface_count: 'InstanceProfileNetworkInterfaceCount',
+ os_architecture: 'InstanceProfileOSArchitecture',
+ port_speed: 'InstanceProfilePortSpeed',
+ total_volume_bandwidth: 'InstanceProfileVolumeBandwidth',
+ vcpu_architecture: 'InstanceProfileVCPUArchitecture',
+ vcpu_count: 'InstanceProfileVCPU',
+ vcpu_manufacturer: 'InstanceProfileVCPUManufacturer',
+ *,
+ gpu_count: 'InstanceProfileGPU' = None,
+ gpu_manufacturer: 'InstanceProfileGPUManufacturer' = None,
+ gpu_memory: 'InstanceProfileGPUMemory' = None,
+ gpu_model: 'InstanceProfileGPUModel' = None,
+ ) -> None:
"""
Initialize a InstanceProfile object.
@@ -41226,22 +44741,27 @@ def __ne__(self, other: 'InstanceProfile') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceProfileBandwidth():
+
+class InstanceProfileBandwidth:
"""
InstanceProfileBandwidth.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileBandwidth object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileBandwidthFixed', 'InstanceProfileBandwidthRange', 'InstanceProfileBandwidthEnum', 'InstanceProfileBandwidthDependent']))
+ ", ".join(['InstanceProfileBandwidthFixed', 'InstanceProfileBandwidthRange', 'InstanceProfileBandwidthEnum', 'InstanceProfileBandwidthDependent'])
+ )
raise Exception(msg)
-class InstanceProfileCollection():
+
+class InstanceProfileCollection:
"""
InstanceProfileCollection.
@@ -41249,8 +44769,10 @@ class InstanceProfileCollection():
profiles.
"""
- def __init__(self,
- profiles: List['InstanceProfile']) -> None:
+ def __init__(
+ self,
+ profiles: List['InstanceProfile'],
+ ) -> None:
"""
Initialize a InstanceProfileCollection object.
@@ -41305,7 +44827,8 @@ def __ne__(self, other: 'InstanceProfileCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceProfileDisk():
+
+class InstanceProfileDisk:
"""
Disks provided by this profile.
@@ -41314,10 +44837,12 @@ class InstanceProfileDisk():
:attr InstanceProfileDiskSupportedInterfaces supported_interface_types:
"""
- def __init__(self,
- quantity: 'InstanceProfileDiskQuantity',
- size: 'InstanceProfileDiskSize',
- supported_interface_types: 'InstanceProfileDiskSupportedInterfaces') -> None:
+ def __init__(
+ self,
+ quantity: 'InstanceProfileDiskQuantity',
+ size: 'InstanceProfileDiskSize',
+ supported_interface_types: 'InstanceProfileDiskSupportedInterfaces',
+ ) -> None:
"""
Initialize a InstanceProfileDisk object.
@@ -41390,37 +44915,46 @@ def __ne__(self, other: 'InstanceProfileDisk') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceProfileDiskQuantity():
+
+class InstanceProfileDiskQuantity:
"""
InstanceProfileDiskQuantity.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileDiskQuantity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileDiskQuantityFixed', 'InstanceProfileDiskQuantityRange', 'InstanceProfileDiskQuantityEnum', 'InstanceProfileDiskQuantityDependent']))
+ ", ".join(['InstanceProfileDiskQuantityFixed', 'InstanceProfileDiskQuantityRange', 'InstanceProfileDiskQuantityEnum', 'InstanceProfileDiskQuantityDependent'])
+ )
raise Exception(msg)
-class InstanceProfileDiskSize():
+
+class InstanceProfileDiskSize:
"""
InstanceProfileDiskSize.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileDiskSize object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileDiskSizeFixed', 'InstanceProfileDiskSizeRange', 'InstanceProfileDiskSizeEnum', 'InstanceProfileDiskSizeDependent']))
+ ", ".join(['InstanceProfileDiskSizeFixed', 'InstanceProfileDiskSizeRange', 'InstanceProfileDiskSizeEnum', 'InstanceProfileDiskSizeDependent'])
+ )
raise Exception(msg)
-class InstanceProfileDiskSupportedInterfaces():
+
+class InstanceProfileDiskSupportedInterfaces:
"""
InstanceProfileDiskSupportedInterfaces.
@@ -41434,10 +44968,12 @@ class InstanceProfileDiskSupportedInterfaces():
disk.
"""
- def __init__(self,
- default: str,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ default: str,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a InstanceProfileDiskSupportedInterfaces object.
@@ -41514,6 +45050,7 @@ class DefaultEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
VIRTIO_BLK = 'virtio_blk'
@@ -41522,6 +45059,7 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
@@ -41533,26 +45071,32 @@ class ValuesEnum(str, Enum):
processing and surface the error, or bypass the resource on which the unexpected
property value was encountered.
"""
+
NVME = 'nvme'
VIRTIO_BLK = 'virtio_blk'
-class InstanceProfileGPU():
+
+class InstanceProfileGPU:
"""
InstanceProfileGPU.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileGPU object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileGPUFixed', 'InstanceProfileGPURange', 'InstanceProfileGPUEnum', 'InstanceProfileGPUDependent']))
+ ", ".join(['InstanceProfileGPUFixed', 'InstanceProfileGPURange', 'InstanceProfileGPUEnum', 'InstanceProfileGPUDependent'])
+ )
raise Exception(msg)
-class InstanceProfileGPUManufacturer():
+
+class InstanceProfileGPUManufacturer:
"""
InstanceProfileGPUManufacturer.
@@ -41561,9 +45105,11 @@ class InstanceProfileGPUManufacturer():
this profile.
"""
- def __init__(self,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a InstanceProfileGPUManufacturer object.
@@ -41624,25 +45170,31 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
-class InstanceProfileGPUMemory():
+
+class InstanceProfileGPUMemory:
"""
InstanceProfileGPUMemory.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileGPUMemory object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileGPUMemoryFixed', 'InstanceProfileGPUMemoryRange', 'InstanceProfileGPUMemoryEnum', 'InstanceProfileGPUMemoryDependent']))
+ ", ".join(['InstanceProfileGPUMemoryFixed', 'InstanceProfileGPUMemoryRange', 'InstanceProfileGPUMemoryEnum', 'InstanceProfileGPUMemoryDependent'])
+ )
raise Exception(msg)
-class InstanceProfileGPUModel():
+
+class InstanceProfileGPUModel:
"""
InstanceProfileGPUModel.
@@ -41651,9 +45203,11 @@ class InstanceProfileGPUModel():
profile.
"""
- def __init__(self,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a InstanceProfileGPUModel object.
@@ -41714,55 +45268,69 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
-class InstanceProfileIdentity():
+
+class InstanceProfileIdentity:
"""
Identifies an instance profile by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileIdentityByName', 'InstanceProfileIdentityByHref']))
+ ", ".join(['InstanceProfileIdentityByName', 'InstanceProfileIdentityByHref'])
+ )
raise Exception(msg)
-class InstanceProfileMemory():
+
+class InstanceProfileMemory:
"""
InstanceProfileMemory.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileMemory object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileMemoryFixed', 'InstanceProfileMemoryRange', 'InstanceProfileMemoryEnum', 'InstanceProfileMemoryDependent']))
+ ", ".join(['InstanceProfileMemoryFixed', 'InstanceProfileMemoryRange', 'InstanceProfileMemoryEnum', 'InstanceProfileMemoryDependent'])
+ )
raise Exception(msg)
-class InstanceProfileNetworkInterfaceCount():
+
+class InstanceProfileNetworkInterfaceCount:
"""
InstanceProfileNetworkInterfaceCount.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileNetworkInterfaceCount object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileNetworkInterfaceCountRange', 'InstanceProfileNetworkInterfaceCountDependent']))
+ ", ".join(['InstanceProfileNetworkInterfaceCountRange', 'InstanceProfileNetworkInterfaceCountDependent'])
+ )
raise Exception(msg)
-class InstanceProfileOSArchitecture():
+
+class InstanceProfileOSArchitecture:
"""
InstanceProfileOSArchitecture.
@@ -41773,10 +45341,12 @@ class InstanceProfileOSArchitecture():
this profile.
"""
- def __init__(self,
- default: str,
- type: str,
- values: List[str]) -> None:
+ def __init__(
+ self,
+ default: str,
+ type: str,
+ values: List[str],
+ ) -> None:
"""
Initialize a InstanceProfileOSArchitecture object.
@@ -41846,25 +45416,31 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
-class InstanceProfilePortSpeed():
+
+class InstanceProfilePortSpeed:
"""
InstanceProfilePortSpeed.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfilePortSpeed object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfilePortSpeedFixed', 'InstanceProfilePortSpeedDependent']))
+ ", ".join(['InstanceProfilePortSpeedFixed', 'InstanceProfilePortSpeedDependent'])
+ )
raise Exception(msg)
-class InstanceProfileReference():
+
+class InstanceProfileReference:
"""
InstanceProfileReference.
@@ -41873,9 +45449,11 @@ class InstanceProfileReference():
profile.
"""
- def __init__(self,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a InstanceProfileReference object.
@@ -41932,22 +45510,27 @@ def __ne__(self, other: 'InstanceProfileReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceProfileVCPU():
+
+class InstanceProfileVCPU:
"""
InstanceProfileVCPU.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileVCPU object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileVCPUFixed', 'InstanceProfileVCPURange', 'InstanceProfileVCPUEnum', 'InstanceProfileVCPUDependent']))
+ ", ".join(['InstanceProfileVCPUFixed', 'InstanceProfileVCPURange', 'InstanceProfileVCPUEnum', 'InstanceProfileVCPUDependent'])
+ )
raise Exception(msg)
-class InstanceProfileVCPUArchitecture():
+
+class InstanceProfileVCPUArchitecture:
"""
InstanceProfileVCPUArchitecture.
@@ -41957,11 +45540,13 @@ class InstanceProfileVCPUArchitecture():
:attr str value: The VCPU architecture for an instance with this profile.
"""
- def __init__(self,
- type: str,
- value: str,
- *,
- default: str = None) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: str,
+ *,
+ default: str = None,
+ ) -> None:
"""
Initialize a InstanceProfileVCPUArchitecture object.
@@ -42028,10 +45613,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class InstanceProfileVCPUManufacturer():
+
+class InstanceProfileVCPUManufacturer:
"""
InstanceProfileVCPUManufacturer.
@@ -42041,11 +45628,13 @@ class InstanceProfileVCPUManufacturer():
:attr str value: The VCPU manufacturer for an instance with this profile.
"""
- def __init__(self,
- type: str,
- value: str,
- *,
- default: str = None) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: str,
+ *,
+ default: str = None,
+ ) -> None:
"""
Initialize a InstanceProfileVCPUManufacturer object.
@@ -42112,25 +45701,31 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class InstanceProfileVolumeBandwidth():
+
+class InstanceProfileVolumeBandwidth:
"""
InstanceProfileVolumeBandwidth.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceProfileVolumeBandwidth object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceProfileVolumeBandwidthFixed', 'InstanceProfileVolumeBandwidthRange', 'InstanceProfileVolumeBandwidthEnum', 'InstanceProfileVolumeBandwidthDependent']))
+ ", ".join(['InstanceProfileVolumeBandwidthFixed', 'InstanceProfileVolumeBandwidthRange', 'InstanceProfileVolumeBandwidthEnum', 'InstanceProfileVolumeBandwidthDependent'])
+ )
raise Exception(msg)
-class InstancePrototype():
+
+class InstancePrototype:
"""
InstancePrototype.
@@ -42164,8 +45759,6 @@ class InstancePrototype():
must not be used by another virtual server instance 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.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -42192,21 +45785,22 @@ class InstancePrototype():
interfaces.
"""
- def __init__(self,
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ ) -> None:
"""
Initialize a InstancePrototype object.
@@ -42242,8 +45836,6 @@ def __init__(self,
name must not be used by another virtual server instance 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 List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -42273,10 +45865,12 @@ def __init__(self,
interfaces.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePrototypeInstanceByImage', 'InstancePrototypeInstanceByCatalogOffering', 'InstancePrototypeInstanceByVolume', 'InstancePrototypeInstanceBySourceSnapshot', 'InstancePrototypeInstanceBySourceTemplate']))
+ ", ".join(['InstancePrototypeInstanceByImage', 'InstancePrototypeInstanceByCatalogOffering', 'InstancePrototypeInstanceByVolume', 'InstancePrototypeInstanceBySourceSnapshot', 'InstancePrototypeInstanceBySourceTemplate'])
+ )
raise Exception(msg)
-class InstanceReference():
+
+class InstanceReference:
"""
InstanceReference.
@@ -42290,13 +45884,15 @@ class InstanceReference():
across all virtual server instances in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceReference object.
@@ -42380,7 +45976,8 @@ def __ne__(self, other: 'InstanceReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceReferenceDeleted():
+
+class InstanceReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -42388,8 +45985,10 @@ class InstanceReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceReferenceDeleted object.
@@ -42437,7 +46036,8 @@ def __ne__(self, other: 'InstanceReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceStatusReason():
+
+class InstanceStatusReason:
"""
InstanceStatusReason.
@@ -42446,11 +46046,13 @@ class InstanceStatusReason():
:attr str more_info: (optional) Link to documentation about this status reason.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a InstanceStatusReason object.
@@ -42518,6 +46120,7 @@ class CodeEnum(str, Enum):
"""
A snake case string succinctly identifying the status reason.
"""
+
CANNOT_START = 'cannot_start'
CANNOT_START_CAPACITY = 'cannot_start_capacity'
CANNOT_START_COMPUTE = 'cannot_start_compute'
@@ -42530,7 +46133,8 @@ class CodeEnum(str, Enum):
STOPPED_FOR_IMAGE_CREATION = 'stopped_for_image_creation'
-class InstanceTemplate():
+
+class InstanceTemplate:
"""
InstanceTemplate.
@@ -42567,8 +46171,6 @@ class InstanceTemplate():
service configuration.
:attr str name: The name for this instance template. The name is unique across
all instance templates in the region.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -42594,25 +46196,26 @@ class InstanceTemplate():
interfaces.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ ) -> None:
"""
Initialize a InstanceTemplate object.
@@ -42653,8 +46256,6 @@ def __init__(self,
property.
:param InstanceMetadataServicePrototype metadata_service: (optional) The
metadata service configuration.
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -42680,10 +46281,12 @@ def __init__(self,
interfaces.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceTemplateInstanceByImage', 'InstanceTemplateInstanceBySourceSnapshot', 'InstanceTemplateInstanceByCatalogOffering']))
+ ", ".join(['InstanceTemplateInstanceByImageInstanceTemplateContext', 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext', 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext'])
+ )
raise Exception(msg)
-class InstanceTemplateCollection():
+
+class InstanceTemplateCollection:
"""
InstanceTemplateCollection.
@@ -42698,13 +46301,15 @@ class InstanceTemplateCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'InstanceTemplateCollectionFirst',
- limit: int,
- templates: List['InstanceTemplate'],
- total_count: int,
- *,
- next: 'InstanceTemplateCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'InstanceTemplateCollectionFirst',
+ limit: int,
+ templates: List['InstanceTemplate'],
+ total_count: int,
+ *,
+ next: 'InstanceTemplateCollectionNext' = None,
+ ) -> None:
"""
Initialize a InstanceTemplateCollection object.
@@ -42798,15 +46403,18 @@ def __ne__(self, other: 'InstanceTemplateCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateCollectionFirst():
+
+class InstanceTemplateCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceTemplateCollectionFirst object.
@@ -42854,7 +46462,8 @@ def __ne__(self, other: 'InstanceTemplateCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateCollectionNext():
+
+class InstanceTemplateCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -42862,8 +46471,10 @@ class InstanceTemplateCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceTemplateCollectionNext object.
@@ -42911,22 +46522,27 @@ def __ne__(self, other: 'InstanceTemplateCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateIdentity():
+
+class InstanceTemplateIdentity:
"""
Identifies an instance template by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstanceTemplateIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceTemplateIdentityById', 'InstanceTemplateIdentityByHref', 'InstanceTemplateIdentityByCRN']))
+ ", ".join(['InstanceTemplateIdentityById', 'InstanceTemplateIdentityByHref', 'InstanceTemplateIdentityByCRN'])
+ )
raise Exception(msg)
-class InstanceTemplatePatch():
+
+class InstanceTemplatePatch:
"""
InstanceTemplatePatch.
@@ -42934,9 +46550,11 @@ class InstanceTemplatePatch():
not be used by another instance template in the region.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceTemplatePatch object.
@@ -42983,7 +46601,8 @@ def __ne__(self, other: 'InstanceTemplatePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplatePrototype():
+
+class InstanceTemplatePrototype:
"""
InstanceTemplatePrototype.
@@ -43016,8 +46635,6 @@ class InstanceTemplatePrototype():
:attr str name: (optional) The name for this instance template. The name must
not be used by another instance template in the region. If unspecified, the name
will be a hyphenated list of randomly-selected words.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -43044,21 +46661,22 @@ class InstanceTemplatePrototype():
interfaces.
"""
- def __init__(self,
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ ) -> None:
"""
Initialize a InstanceTemplatePrototype object.
@@ -43093,8 +46711,6 @@ def __init__(self,
:param str name: (optional) The name for this instance template. The name
must not be used by another instance template in the region. If
unspecified, the name will be a hyphenated list of randomly-selected words.
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -43124,10 +46740,12 @@ def __init__(self,
interfaces.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceTemplatePrototypeInstanceByImage', 'InstanceTemplatePrototypeInstanceBySourceTemplate', 'InstanceTemplatePrototypeInstanceBySourceSnapshot', 'InstanceTemplatePrototypeInstanceByCatalogOffering']))
+ ", ".join(['InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext', 'InstanceTemplatePrototypeInstanceBySourceTemplate', 'InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext', 'InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext'])
+ )
raise Exception(msg)
-class InstanceTemplateReference():
+
+class InstanceTemplateReference:
"""
InstanceTemplateReference.
@@ -43141,13 +46759,15 @@ class InstanceTemplateReference():
all instance templates in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceTemplateReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceTemplateReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstanceTemplateReference object.
@@ -43232,7 +46852,8 @@ def __ne__(self, other: 'InstanceTemplateReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateReferenceDeleted():
+
+class InstanceTemplateReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -43240,8 +46861,10 @@ class InstanceTemplateReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a InstanceTemplateReferenceDeleted object.
@@ -43289,7 +46912,8 @@ def __ne__(self, other: 'InstanceTemplateReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceVCPU():
+
+class InstanceVCPU:
"""
The virtual server instance VCPU configuration.
@@ -43298,10 +46922,12 @@ class InstanceVCPU():
:attr str manufacturer: The VCPU manufacturer.
"""
- def __init__(self,
- architecture: str,
- count: int,
- manufacturer: str) -> None:
+ def __init__(
+ self,
+ architecture: str,
+ count: int,
+ manufacturer: str,
+ ) -> None:
"""
Initialize a InstanceVCPU object.
@@ -43365,7 +46991,8 @@ def __ne__(self, other: 'InstanceVCPU') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class Key():
+
+class Key:
"""
Key.
@@ -43385,17 +47012,19 @@ class Key():
:attr str type: The crypto-system used by this key.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- fingerprint: str,
- href: str,
- id: str,
- length: int,
- name: str,
- public_key: str,
- resource_group: 'ResourceGroupReference',
- type: str) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ fingerprint: str,
+ href: str,
+ id: str,
+ length: int,
+ name: str,
+ public_key: str,
+ resource_group: 'ResourceGroupReference',
+ type: str,
+ ) -> None:
"""
Initialize a Key object.
@@ -43528,10 +47157,12 @@ class TypeEnum(str, Enum):
"""
The crypto-system used by this key.
"""
+
RSA = 'rsa'
-class KeyCollection():
+
+class KeyCollection:
"""
KeyCollection.
@@ -43545,13 +47176,15 @@ class KeyCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'KeyCollectionFirst',
- keys: List['Key'],
- limit: int,
- total_count: int,
- *,
- next: 'KeyCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'KeyCollectionFirst',
+ keys: List['Key'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'KeyCollectionNext' = None,
+ ) -> None:
"""
Initialize a KeyCollection object.
@@ -43644,15 +47277,18 @@ def __ne__(self, other: 'KeyCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class KeyCollectionFirst():
+
+class KeyCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a KeyCollectionFirst object.
@@ -43700,7 +47336,8 @@ def __ne__(self, other: 'KeyCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class KeyCollectionNext():
+
+class KeyCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -43708,8 +47345,10 @@ class KeyCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a KeyCollectionNext object.
@@ -43757,22 +47396,27 @@ def __ne__(self, other: 'KeyCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class KeyIdentity():
+
+class KeyIdentity:
"""
Identifies a key by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a KeyIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['KeyIdentityById', 'KeyIdentityByCRN', 'KeyIdentityByHref', 'KeyIdentityByFingerprint']))
+ ", ".join(['KeyIdentityById', 'KeyIdentityByCRN', 'KeyIdentityByHref', 'KeyIdentityByFingerprint'])
+ )
raise Exception(msg)
-class KeyPatch():
+
+class KeyPatch:
"""
KeyPatch.
@@ -43780,9 +47424,11 @@ class KeyPatch():
another key in the region.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a KeyPatch object.
@@ -43829,7 +47475,8 @@ def __ne__(self, other: 'KeyPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class KeyReference():
+
+class KeyReference:
"""
KeyReference.
@@ -43845,14 +47492,16 @@ class KeyReference():
region.
"""
- def __init__(self,
- crn: str,
- fingerprint: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'KeyReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ fingerprint: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'KeyReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a KeyReference object.
@@ -43946,7 +47595,8 @@ def __ne__(self, other: 'KeyReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class KeyReferenceDeleted():
+
+class KeyReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -43954,8 +47604,10 @@ class KeyReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a KeyReferenceDeleted object.
@@ -44003,30 +47655,37 @@ def __ne__(self, other: 'KeyReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LegacyCloudObjectStorageBucketIdentity():
+
+class LegacyCloudObjectStorageBucketIdentity:
"""
Identifies a Cloud Object Storage bucket by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LegacyCloudObjectStorageBucketIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName']))
+ ", ".join(['LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName'])
+ )
raise Exception(msg)
-class LegacyCloudObjectStorageBucketReference():
+
+class LegacyCloudObjectStorageBucketReference:
"""
LegacyCloudObjectStorageBucketReference.
:attr str name: The globally unique name of this Cloud Object Storage bucket.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a LegacyCloudObjectStorageBucketReference object.
@@ -44075,7 +47734,8 @@ def __ne__(self, other: 'LegacyCloudObjectStorageBucketReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancer():
+
+class LoadBalancer:
"""
LoadBalancer.
@@ -44139,31 +47799,33 @@ class LoadBalancer():
:attr bool udp_supported: Indicates whether this load balancer supports UDP.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- hostname: str,
- href: str,
- id: str,
- is_public: bool,
- listeners: List['LoadBalancerListenerReference'],
- logging: 'LoadBalancerLogging',
- name: str,
- operating_status: str,
- pools: List['LoadBalancerPoolReference'],
- private_ips: List['LoadBalancerPrivateIpsItem'],
- profile: 'LoadBalancerProfileReference',
- provisioning_status: str,
- public_ips: List['IP'],
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- route_mode: bool,
- security_groups: List['SecurityGroupReference'],
- security_groups_supported: bool,
- subnets: List['SubnetReference'],
- udp_supported: bool,
- *,
- dns: 'LoadBalancerDNS' = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ hostname: str,
+ href: str,
+ id: str,
+ is_public: bool,
+ listeners: List['LoadBalancerListenerReference'],
+ logging: 'LoadBalancerLogging',
+ name: str,
+ operating_status: str,
+ pools: List['LoadBalancerPoolReference'],
+ private_ips: List['LoadBalancerPrivateIpsItem'],
+ profile: 'LoadBalancerProfileReference',
+ provisioning_status: str,
+ public_ips: List['IP'],
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ route_mode: bool,
+ security_groups: List['SecurityGroupReference'],
+ security_groups_supported: bool,
+ subnets: List['SubnetReference'],
+ udp_supported: bool,
+ *,
+ dns: 'LoadBalancerDNS' = None,
+ ) -> None:
"""
Initialize a LoadBalancer object.
@@ -44481,6 +48143,7 @@ class OperatingStatusEnum(str, Enum):
"""
The operating status of this load balancer.
"""
+
OFFLINE = 'offline'
ONLINE = 'online'
@@ -44504,6 +48167,7 @@ class ProvisioningStatusEnum(str, Enum):
processing and surface the error, or bypass the load balancer on which the
unexpected property value was encountered.
"""
+
ACTIVE = 'active'
CREATE_PENDING = 'create_pending'
DELETE_PENDING = 'delete_pending'
@@ -44517,10 +48181,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
LOAD_BALANCER = 'load_balancer'
-class LoadBalancerCollection():
+
+class LoadBalancerCollection:
"""
LoadBalancerCollection.
@@ -44534,13 +48200,15 @@ class LoadBalancerCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'LoadBalancerCollectionFirst',
- limit: int,
- load_balancers: List['LoadBalancer'],
- total_count: int,
- *,
- next: 'LoadBalancerCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'LoadBalancerCollectionFirst',
+ limit: int,
+ load_balancers: List['LoadBalancer'],
+ total_count: int,
+ *,
+ next: 'LoadBalancerCollectionNext' = None,
+ ) -> None:
"""
Initialize a LoadBalancerCollection object.
@@ -44634,15 +48302,18 @@ def __ne__(self, other: 'LoadBalancerCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerCollectionFirst():
+
+class LoadBalancerCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerCollectionFirst object.
@@ -44690,7 +48361,8 @@ def __ne__(self, other: 'LoadBalancerCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerCollectionNext():
+
+class LoadBalancerCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -44698,8 +48370,10 @@ class LoadBalancerCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerCollectionNext object.
@@ -44747,7 +48421,8 @@ def __ne__(self, other: 'LoadBalancerCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerDNS():
+
+class LoadBalancerDNS:
"""
The DNS configuration for this load balancer.
If absent, DNS `A` records for this load balancer's `hostname` property will be added
@@ -44758,9 +48433,11 @@ class LoadBalancerDNS():
:attr DNSZoneReference zone: The DNS zone associated with this load balancer.
"""
- def __init__(self,
- instance: 'DNSInstanceReference',
- zone: 'DNSZoneReference') -> None:
+ def __init__(
+ self,
+ instance: 'DNSInstanceReference',
+ zone: 'DNSZoneReference',
+ ) -> None:
"""
Initialize a LoadBalancerDNS object.
@@ -44824,9 +48501,13 @@ def __ne__(self, other: 'LoadBalancerDNS') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerDNSPatch():
+
+class LoadBalancerDNSPatch:
"""
- LoadBalancerDNSPatch.
+ The DNS configuration for this load balancer.
+ Specify `null` to remove the existing DNS configuration, which will remove all DNS `A`
+ records for this load balancer that had been added to `zone`, and add equivalent `A`
+ records to the public DNS zone `lb.appdomain.cloud`.
:attr DNSInstanceIdentity instance: (optional) The DNS instance to associate
with this load balancer.
@@ -44838,10 +48519,12 @@ class LoadBalancerDNSPatch():
policies.
"""
- def __init__(self,
- *,
- instance: 'DNSInstanceIdentity' = None,
- zone: 'DNSZoneIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ instance: 'DNSInstanceIdentity' = None,
+ zone: 'DNSZoneIdentity' = None,
+ ) -> None:
"""
Initialize a LoadBalancerDNSPatch object.
@@ -44906,9 +48589,13 @@ def __ne__(self, other: 'LoadBalancerDNSPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerDNSPrototype():
+
+class LoadBalancerDNSPrototype:
"""
- LoadBalancerDNSPrototype.
+ The DNS configuration for this load balancer.
+ If unspecified, DNS `A` records for this load balancer's `hostname` property will be
+ added to the public DNS zone `lb.appdomain.cloud`. Otherwise, those DNS `A` records
+ will be added to the specified `zone`.
:attr DNSInstanceIdentity instance: The DNS instance to associate with this load
balancer.
@@ -44919,9 +48606,11 @@ class LoadBalancerDNSPrototype():
policies.
"""
- def __init__(self,
- instance: 'DNSInstanceIdentity',
- zone: 'DNSZoneIdentity') -> None:
+ def __init__(
+ self,
+ instance: 'DNSInstanceIdentity',
+ zone: 'DNSZoneIdentity',
+ ) -> None:
"""
Initialize a LoadBalancerDNSPrototype object.
@@ -44990,22 +48679,27 @@ def __ne__(self, other: 'LoadBalancerDNSPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerIdentity():
+
+class LoadBalancerIdentity:
"""
Identifies a load balancer by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerIdentityById', 'LoadBalancerIdentityByCRN', 'LoadBalancerIdentityByHref']))
+ ", ".join(['LoadBalancerIdentityById', 'LoadBalancerIdentityByCRN', 'LoadBalancerIdentityByHref'])
+ )
raise Exception(msg)
-class LoadBalancerListener():
+
+class LoadBalancerListener:
"""
LoadBalancerListener.
@@ -45056,23 +48750,25 @@ class LoadBalancerListener():
property value was encountered.
"""
- def __init__(self,
- accept_proxy_protocol: bool,
- created_at: datetime,
- href: str,
- id: str,
- port: int,
- port_max: int,
- port_min: int,
- protocol: str,
- provisioning_status: str,
- *,
- certificate_instance: 'CertificateInstanceReference' = None,
- connection_limit: int = None,
- default_pool: 'LoadBalancerPoolReference' = None,
- https_redirect: 'LoadBalancerListenerHTTPSRedirect' = None,
- idle_connection_timeout: int = None,
- policies: List['LoadBalancerListenerPolicyReference'] = None) -> None:
+ def __init__(
+ self,
+ accept_proxy_protocol: bool,
+ created_at: datetime,
+ href: str,
+ id: str,
+ port: int,
+ port_max: int,
+ port_min: int,
+ protocol: str,
+ provisioning_status: str,
+ *,
+ certificate_instance: 'CertificateInstanceReference' = None,
+ connection_limit: int = None,
+ default_pool: 'LoadBalancerPoolReference' = None,
+ https_redirect: 'LoadBalancerListenerHTTPSRedirect' = None,
+ idle_connection_timeout: int = None,
+ policies: List['LoadBalancerListenerPolicyReference'] = None,
+ ) -> None:
"""
Initialize a LoadBalancerListener object.
@@ -45277,6 +48973,7 @@ class ProtocolEnum(str, Enum):
processing and surface the error, or bypass the listener on which the unexpected
property value was encountered.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
@@ -45291,6 +48988,7 @@ class ProvisioningStatusEnum(str, Enum):
processing and surface the error, or bypass the listener on which the unexpected
property value was encountered.
"""
+
ACTIVE = 'active'
CREATE_PENDING = 'create_pending'
DELETE_PENDING = 'delete_pending'
@@ -45298,15 +48996,18 @@ class ProvisioningStatusEnum(str, Enum):
UPDATE_PENDING = 'update_pending'
-class LoadBalancerListenerCollection():
+
+class LoadBalancerListenerCollection:
"""
LoadBalancerListenerCollection.
:attr List[LoadBalancerListener] listeners: Collection of listeners.
"""
- def __init__(self,
- listeners: List['LoadBalancerListener']) -> None:
+ def __init__(
+ self,
+ listeners: List['LoadBalancerListener'],
+ ) -> None:
"""
Initialize a LoadBalancerListenerCollection object.
@@ -45360,7 +49061,8 @@ def __ne__(self, other: 'LoadBalancerListenerCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerHTTPSRedirect():
+
+class LoadBalancerListenerHTTPSRedirect:
"""
LoadBalancerListenerHTTPSRedirect.
@@ -45369,11 +49071,13 @@ class LoadBalancerListenerHTTPSRedirect():
:attr str uri: (optional) The redirect relative target URI.
"""
- def __init__(self,
- http_status_code: int,
- listener: 'LoadBalancerListenerReference',
- *,
- uri: str = None) -> None:
+ def __init__(
+ self,
+ http_status_code: int,
+ listener: 'LoadBalancerListenerReference',
+ *,
+ uri: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerHTTPSRedirect object.
@@ -45438,7 +49142,8 @@ def __ne__(self, other: 'LoadBalancerListenerHTTPSRedirect') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerHTTPSRedirectPatch():
+
+class LoadBalancerListenerHTTPSRedirectPatch:
"""
LoadBalancerListenerHTTPSRedirectPatch.
@@ -45448,11 +49153,13 @@ class LoadBalancerListenerHTTPSRedirectPatch():
:attr str uri: (optional) The redirect relative target URI.
"""
- def __init__(self,
- *,
- http_status_code: int = None,
- listener: 'LoadBalancerListenerIdentity' = None,
- uri: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ http_status_code: int = None,
+ listener: 'LoadBalancerListenerIdentity' = None,
+ uri: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerHTTPSRedirectPatch object.
@@ -45515,7 +49222,8 @@ def __ne__(self, other: 'LoadBalancerListenerHTTPSRedirectPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerHTTPSRedirectPrototype():
+
+class LoadBalancerListenerHTTPSRedirectPrototype:
"""
LoadBalancerListenerHTTPSRedirectPrototype.
@@ -45525,11 +49233,13 @@ class LoadBalancerListenerHTTPSRedirectPrototype():
:attr str uri: (optional) The redirect relative target URI.
"""
- def __init__(self,
- http_status_code: int,
- listener: 'LoadBalancerListenerIdentity',
- *,
- uri: str = None) -> None:
+ def __init__(
+ self,
+ http_status_code: int,
+ listener: 'LoadBalancerListenerIdentity',
+ *,
+ uri: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerHTTPSRedirectPrototype object.
@@ -45595,22 +49305,27 @@ def __ne__(self, other: 'LoadBalancerListenerHTTPSRedirectPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerIdentity():
+
+class LoadBalancerListenerIdentity:
"""
Identifies a load balancer listener by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerListenerIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerListenerIdentityById', 'LoadBalancerListenerIdentityByHref']))
+ ", ".join(['LoadBalancerListenerIdentityById', 'LoadBalancerListenerIdentityByHref'])
+ )
raise Exception(msg)
-class LoadBalancerListenerPatch():
+
+class LoadBalancerListenerPatch:
"""
LoadBalancerListenerPatch.
@@ -45674,18 +49389,20 @@ class LoadBalancerListenerPatch():
`https`.
"""
- def __init__(self,
- *,
- accept_proxy_protocol: bool = None,
- certificate_instance: 'CertificateInstanceIdentity' = None,
- connection_limit: int = None,
- default_pool: 'LoadBalancerPoolIdentity' = None,
- https_redirect: 'LoadBalancerListenerHTTPSRedirectPatch' = None,
- idle_connection_timeout: int = None,
- port: int = None,
- port_max: int = None,
- port_min: int = None,
- protocol: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ accept_proxy_protocol: bool = None,
+ certificate_instance: 'CertificateInstanceIdentity' = None,
+ connection_limit: int = None,
+ default_pool: 'LoadBalancerPoolIdentity' = None,
+ https_redirect: 'LoadBalancerListenerHTTPSRedirectPatch' = None,
+ idle_connection_timeout: int = None,
+ port: int = None,
+ port_max: int = None,
+ port_min: int = None,
+ protocol: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPatch object.
@@ -45863,13 +49580,15 @@ class ProtocolEnum(str, Enum):
be
`https`.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
UDP = 'udp'
-class LoadBalancerListenerPolicy():
+
+class LoadBalancerListenerPolicy:
"""
LoadBalancerListenerPolicy.
@@ -45900,17 +49619,19 @@ class LoadBalancerListenerPolicy():
`LoadBalancerListenerHTTPSRedirect`.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- priority: int,
- provisioning_status: str,
- rules: List['LoadBalancerListenerPolicyRuleReference'],
- *,
- target: 'LoadBalancerListenerPolicyTarget' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ priority: int,
+ provisioning_status: str,
+ rules: List['LoadBalancerListenerPolicyRuleReference'],
+ *,
+ target: 'LoadBalancerListenerPolicyTarget' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicy object.
@@ -46053,6 +49774,7 @@ class ActionEnum(str, Enum):
processing and surface the error, or bypass the policy on which the unexpected
property value was encountered.
"""
+
FORWARD = 'forward'
HTTPS_REDIRECT = 'https_redirect'
REDIRECT = 'redirect'
@@ -46067,6 +49789,7 @@ class ProvisioningStatusEnum(str, Enum):
processing and surface the error, or bypass the policy on which the unexpected
property value was encountered.
"""
+
ACTIVE = 'active'
CREATE_PENDING = 'create_pending'
DELETE_PENDING = 'delete_pending'
@@ -46074,15 +49797,18 @@ class ProvisioningStatusEnum(str, Enum):
UPDATE_PENDING = 'update_pending'
-class LoadBalancerListenerPolicyCollection():
+
+class LoadBalancerListenerPolicyCollection:
"""
LoadBalancerListenerPolicyCollection.
:attr List[LoadBalancerListenerPolicy] policies: Collection of policies.
"""
- def __init__(self,
- policies: List['LoadBalancerListenerPolicy']) -> None:
+ def __init__(
+ self,
+ policies: List['LoadBalancerListenerPolicy'],
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyCollection object.
@@ -46136,7 +49862,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyPatch():
+
+class LoadBalancerListenerPolicyPatch:
"""
LoadBalancerListenerPolicyPatch.
@@ -46152,11 +49879,13 @@ class LoadBalancerListenerPolicyPatch():
`LoadBalancerListenerPolicyHTTPSRedirectPatch`.
"""
- def __init__(self,
- *,
- name: str = None,
- priority: int = None,
- target: 'LoadBalancerListenerPolicyTargetPatch' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ priority: int = None,
+ target: 'LoadBalancerListenerPolicyTargetPatch' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyPatch object.
@@ -46224,7 +49953,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyPrototype():
+
+class LoadBalancerListenerPolicyPrototype:
"""
LoadBalancerListenerPolicyPrototype.
@@ -46248,13 +49978,15 @@ class LoadBalancerListenerPolicyPrototype():
`LoadBalancerListenerPolicyHTTPSRedirectPrototype`.
"""
- def __init__(self,
- action: str,
- priority: int,
- *,
- name: str = None,
- rules: List['LoadBalancerListenerPolicyRulePrototype'] = None,
- target: 'LoadBalancerListenerPolicyTargetPrototype' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ priority: int,
+ *,
+ name: str = None,
+ rules: List['LoadBalancerListenerPolicyRulePrototype'] = None,
+ target: 'LoadBalancerListenerPolicyTargetPrototype' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyPrototype object.
@@ -46358,13 +50090,15 @@ class ActionEnum(str, Enum):
processing and surface the error, or bypass the policy on which the unexpected
property value was encountered.
"""
+
FORWARD = 'forward'
HTTPS_REDIRECT = 'https_redirect'
REDIRECT = 'redirect'
REJECT = 'reject'
-class LoadBalancerListenerPolicyReference():
+
+class LoadBalancerListenerPolicyReference:
"""
LoadBalancerListenerPolicyReference.
@@ -46376,12 +50110,14 @@ class LoadBalancerListenerPolicyReference():
:attr object name:
"""
- def __init__(self,
- href: str,
- id: str,
- name: object,
- *,
- deleted: 'LoadBalancerListenerPolicyReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: object,
+ *,
+ deleted: 'LoadBalancerListenerPolicyReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyReference object.
@@ -46457,7 +50193,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyReferenceDeleted():
+
+class LoadBalancerListenerPolicyReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -46465,8 +50202,10 @@ class LoadBalancerListenerPolicyReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyReferenceDeleted object.
@@ -46514,7 +50253,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyRule():
+
+class LoadBalancerListenerPolicyRule:
"""
LoadBalancerListenerPolicyRule.
@@ -46542,16 +50282,18 @@ class LoadBalancerListenerPolicyRule():
value must be percent-encoded.
"""
- def __init__(self,
- condition: str,
- created_at: datetime,
- href: str,
- id: str,
- provisioning_status: str,
- type: str,
- value: str,
- *,
- field: str = None) -> None:
+ def __init__(
+ self,
+ condition: str,
+ created_at: datetime,
+ href: str,
+ id: str,
+ provisioning_status: str,
+ type: str,
+ value: str,
+ *,
+ field: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyRule object.
@@ -46671,6 +50413,7 @@ class ConditionEnum(str, Enum):
"""
The condition of the rule.
"""
+
CONTAINS = 'contains'
EQUALS = 'equals'
MATCHES_REGEX = 'matches_regex'
@@ -46684,6 +50427,7 @@ class ProvisioningStatusEnum(str, Enum):
processing and surface the error, or bypass the rule on which the unexpected
property value was encountered.
"""
+
ACTIVE = 'active'
CREATE_PENDING = 'create_pending'
DELETE_PENDING = 'delete_pending'
@@ -46697,6 +50441,7 @@ class TypeEnum(str, Enum):
Body rules are applied to form-encoded request bodies using the `UTF-8` character
set.
"""
+
BODY = 'body'
HEADER = 'header'
HOSTNAME = 'hostname'
@@ -46704,15 +50449,18 @@ class TypeEnum(str, Enum):
QUERY = 'query'
-class LoadBalancerListenerPolicyRuleCollection():
+
+class LoadBalancerListenerPolicyRuleCollection:
"""
LoadBalancerListenerPolicyRuleCollection.
:attr List[LoadBalancerListenerPolicyRule] rules: Collection of rules.
"""
- def __init__(self,
- rules: List['LoadBalancerListenerPolicyRule']) -> None:
+ def __init__(
+ self,
+ rules: List['LoadBalancerListenerPolicyRule'],
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyRuleCollection object.
@@ -46766,7 +50514,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyRuleCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyRulePatch():
+
+class LoadBalancerListenerPolicyRulePatch:
"""
LoadBalancerListenerPolicyRulePatch.
@@ -46786,12 +50535,14 @@ class LoadBalancerListenerPolicyRulePatch():
value must be percent-encoded.
"""
- def __init__(self,
- *,
- condition: str = None,
- field: str = None,
- type: str = None,
- value: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ condition: str = None,
+ field: str = None,
+ type: str = None,
+ value: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyRulePatch object.
@@ -46869,6 +50620,7 @@ class ConditionEnum(str, Enum):
"""
The condition of the rule.
"""
+
CONTAINS = 'contains'
EQUALS = 'equals'
MATCHES_REGEX = 'matches_regex'
@@ -46880,6 +50632,7 @@ class TypeEnum(str, Enum):
Body rules are applied to form-encoded request bodies using the `UTF-8` character
set.
"""
+
BODY = 'body'
HEADER = 'header'
HOSTNAME = 'hostname'
@@ -46887,7 +50640,8 @@ class TypeEnum(str, Enum):
QUERY = 'query'
-class LoadBalancerListenerPolicyRulePrototype():
+
+class LoadBalancerListenerPolicyRulePrototype:
"""
LoadBalancerListenerPolicyRulePrototype.
@@ -46907,12 +50661,14 @@ class LoadBalancerListenerPolicyRulePrototype():
value must be percent-encoded.
"""
- def __init__(self,
- condition: str,
- type: str,
- value: str,
- *,
- field: str = None) -> None:
+ def __init__(
+ self,
+ condition: str,
+ type: str,
+ value: str,
+ *,
+ field: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyRulePrototype object.
@@ -46996,6 +50752,7 @@ class ConditionEnum(str, Enum):
"""
The condition of the rule.
"""
+
CONTAINS = 'contains'
EQUALS = 'equals'
MATCHES_REGEX = 'matches_regex'
@@ -47007,6 +50764,7 @@ class TypeEnum(str, Enum):
Body rules are applied to form-encoded request bodies using the `UTF-8` character
set.
"""
+
BODY = 'body'
HEADER = 'header'
HOSTNAME = 'hostname'
@@ -47014,7 +50772,8 @@ class TypeEnum(str, Enum):
QUERY = 'query'
-class LoadBalancerListenerPolicyRuleReference():
+
+class LoadBalancerListenerPolicyRuleReference:
"""
LoadBalancerListenerPolicyRuleReference.
@@ -47026,11 +50785,13 @@ class LoadBalancerListenerPolicyRuleReference():
:attr str id: The rule's unique identifier.
"""
- def __init__(self,
- href: str,
- id: str,
- *,
- deleted: 'LoadBalancerListenerPolicyRuleReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ *,
+ deleted: 'LoadBalancerListenerPolicyRuleReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyRuleReference object.
@@ -47098,7 +50859,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyRuleReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyRuleReferenceDeleted():
+
+class LoadBalancerListenerPolicyRuleReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -47106,8 +50868,10 @@ class LoadBalancerListenerPolicyRuleReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyRuleReferenceDeleted object.
@@ -47155,7 +50919,8 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyRuleReferenceDeleted') -> boo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerPolicyTarget():
+
+class LoadBalancerListenerPolicyTarget:
"""
- If `action` is `forward`, the response is a `LoadBalancerPoolReference`
- If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`
@@ -47164,16 +50929,20 @@ class LoadBalancerListenerPolicyTarget():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerListenerPolicyTargetLoadBalancerPoolReference', 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL', 'LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect']))
+ ", ".join(['LoadBalancerListenerPolicyTargetLoadBalancerPoolReference', 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL', 'LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect'])
+ )
raise Exception(msg)
-class LoadBalancerListenerPolicyTargetPatch():
+
+class LoadBalancerListenerPolicyTargetPatch:
"""
- If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
- If `action` is `redirect`, specify a `LoadBalancerListenerPolicyRedirectURLPatch`.
@@ -47182,16 +50951,20 @@ class LoadBalancerListenerPolicyTargetPatch():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch']))
+ ", ".join(['LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch'])
+ )
raise Exception(msg)
-class LoadBalancerListenerPolicyTargetPrototype():
+
+class LoadBalancerListenerPolicyTargetPrototype:
"""
- If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
- If `action` is `redirect`, specify a
@@ -47201,16 +50974,20 @@ class LoadBalancerListenerPolicyTargetPrototype():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype']))
+ ", ".join(['LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype'])
+ )
raise Exception(msg)
-class LoadBalancerListenerPrototypeLoadBalancerContext():
+
+class LoadBalancerListenerPrototypeLoadBalancerContext:
"""
LoadBalancerListenerPrototypeLoadBalancerContext.
@@ -47275,18 +51052,20 @@ class LoadBalancerListenerPrototypeLoadBalancerContext():
- If `https_redirect` is set, the protocol must be `http`.
"""
- def __init__(self,
- protocol: str,
- *,
- accept_proxy_protocol: bool = None,
- certificate_instance: 'CertificateInstanceIdentity' = None,
- connection_limit: int = None,
- default_pool: 'LoadBalancerPoolIdentityByName' = None,
- https_redirect: 'LoadBalancerListenerHTTPSRedirectPrototype' = None,
- idle_connection_timeout: int = None,
- port: int = None,
- port_max: int = None,
- port_min: int = None) -> None:
+ def __init__(
+ self,
+ protocol: str,
+ *,
+ accept_proxy_protocol: bool = None,
+ certificate_instance: 'CertificateInstanceIdentity' = None,
+ connection_limit: int = None,
+ default_pool: 'LoadBalancerPoolIdentityByName' = None,
+ https_redirect: 'LoadBalancerListenerHTTPSRedirectPrototype' = None,
+ idle_connection_timeout: int = None,
+ port: int = None,
+ port_max: int = None,
+ port_min: int = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPrototypeLoadBalancerContext object.
@@ -47468,13 +51247,15 @@ class ProtocolEnum(str, Enum):
`https`.
- If `https_redirect` is set, the protocol must be `http`.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
UDP = 'udp'
-class LoadBalancerListenerReference():
+
+class LoadBalancerListenerReference:
"""
LoadBalancerListenerReference.
@@ -47485,11 +51266,13 @@ class LoadBalancerListenerReference():
:attr str id: The unique identifier for this load balancer listener.
"""
- def __init__(self,
- href: str,
- id: str,
- *,
- deleted: 'LoadBalancerListenerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ *,
+ deleted: 'LoadBalancerListenerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerReference object.
@@ -47557,7 +51340,8 @@ def __ne__(self, other: 'LoadBalancerListenerReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerListenerReferenceDeleted():
+
+class LoadBalancerListenerReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -47565,8 +51349,10 @@ class LoadBalancerListenerReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerReferenceDeleted object.
@@ -47614,7 +51400,8 @@ def __ne__(self, other: 'LoadBalancerListenerReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerLogging():
+
+class LoadBalancerLogging:
"""
LoadBalancerLogging.
@@ -47622,8 +51409,10 @@ class LoadBalancerLogging():
for this load balancer.
"""
- def __init__(self,
- datapath: 'LoadBalancerLoggingDatapath') -> None:
+ def __init__(
+ self,
+ datapath: 'LoadBalancerLoggingDatapath',
+ ) -> None:
"""
Initialize a LoadBalancerLogging object.
@@ -47675,7 +51464,8 @@ def __ne__(self, other: 'LoadBalancerLogging') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerLoggingDatapath():
+
+class LoadBalancerLoggingDatapath:
"""
The datapath logging configuration for this load balancer.
@@ -47683,8 +51473,10 @@ class LoadBalancerLoggingDatapath():
balancer.
"""
- def __init__(self,
- active: bool) -> None:
+ def __init__(
+ self,
+ active: bool,
+ ) -> None:
"""
Initialize a LoadBalancerLoggingDatapath object.
@@ -47733,7 +51525,8 @@ def __ne__(self, other: 'LoadBalancerLoggingDatapath') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerLoggingDatapathPatch():
+
+class LoadBalancerLoggingDatapathPatch:
"""
The datapath logging configuration for this load balancer.
@@ -47741,9 +51534,11 @@ class LoadBalancerLoggingDatapathPatch():
for this load balancer.
"""
- def __init__(self,
- *,
- active: bool = None) -> None:
+ def __init__(
+ self,
+ *,
+ active: bool = None,
+ ) -> None:
"""
Initialize a LoadBalancerLoggingDatapathPatch object.
@@ -47790,7 +51585,8 @@ def __ne__(self, other: 'LoadBalancerLoggingDatapathPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerLoggingDatapathPrototype():
+
+class LoadBalancerLoggingDatapathPrototype:
"""
The datapath logging configuration for this load balancer.
@@ -47798,9 +51594,11 @@ class LoadBalancerLoggingDatapathPrototype():
for this load balancer.
"""
- def __init__(self,
- *,
- active: bool = None) -> None:
+ def __init__(
+ self,
+ *,
+ active: bool = None,
+ ) -> None:
"""
Initialize a LoadBalancerLoggingDatapathPrototype object.
@@ -47847,7 +51645,8 @@ def __ne__(self, other: 'LoadBalancerLoggingDatapathPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerLoggingPatch():
+
+class LoadBalancerLoggingPatch:
"""
LoadBalancerLoggingPatch.
@@ -47855,9 +51654,11 @@ class LoadBalancerLoggingPatch():
configuration for this load balancer.
"""
- def __init__(self,
- *,
- datapath: 'LoadBalancerLoggingDatapathPatch' = None) -> None:
+ def __init__(
+ self,
+ *,
+ datapath: 'LoadBalancerLoggingDatapathPatch' = None,
+ ) -> None:
"""
Initialize a LoadBalancerLoggingPatch object.
@@ -47907,7 +51708,8 @@ def __ne__(self, other: 'LoadBalancerLoggingPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerLoggingPrototype():
+
+class LoadBalancerLoggingPrototype:
"""
LoadBalancerLoggingPrototype.
@@ -47915,9 +51717,11 @@ class LoadBalancerLoggingPrototype():
logging configuration for this load balancer.
"""
- def __init__(self,
- *,
- datapath: 'LoadBalancerLoggingDatapathPrototype' = None) -> None:
+ def __init__(
+ self,
+ *,
+ datapath: 'LoadBalancerLoggingDatapathPrototype' = None,
+ ) -> None:
"""
Initialize a LoadBalancerLoggingPrototype object.
@@ -47967,11 +51771,18 @@ def __ne__(self, other: 'LoadBalancerLoggingPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPatch():
+
+class LoadBalancerPatch:
"""
LoadBalancerPatch.
- :attr LoadBalancerDNSPatch dns: (optional)
+ :attr LoadBalancerDNSPatch dns: (optional) The DNS configuration for this load
+ balancer.
+ Specify `null` to remove the existing DNS configuration, which will remove all
+ DNS `A`
+ records for this load balancer that had been added to `zone`, and add equivalent
+ `A`
+ records to the public DNS zone `lb.appdomain.cloud`.
:attr LoadBalancerLoggingPatch logging: (optional) The logging configuration to
use for this load balancer.
To activate logging, the load balancer profile must support the specified
@@ -47986,16 +51797,24 @@ class LoadBalancerPatch():
The load balancer must be in the `application` family.
"""
- def __init__(self,
- *,
- dns: 'LoadBalancerDNSPatch' = None,
- logging: 'LoadBalancerLoggingPatch' = None,
- name: str = None,
- subnets: List['SubnetIdentity'] = None) -> None:
+ def __init__(
+ self,
+ *,
+ dns: 'LoadBalancerDNSPatch' = None,
+ logging: 'LoadBalancerLoggingPatch' = None,
+ name: str = None,
+ subnets: List['SubnetIdentity'] = None,
+ ) -> None:
"""
Initialize a LoadBalancerPatch object.
- :param LoadBalancerDNSPatch dns: (optional)
+ :param LoadBalancerDNSPatch dns: (optional) The DNS configuration for this
+ load balancer.
+ Specify `null` to remove the existing DNS configuration, which will remove
+ all DNS `A`
+ records for this load balancer that had been added to `zone`, and add
+ equivalent `A`
+ records to the public DNS zone `lb.appdomain.cloud`.
:param LoadBalancerLoggingPatch logging: (optional) The logging
configuration to use for this load balancer.
To activate logging, the load balancer profile must support the specified
@@ -48076,7 +51895,8 @@ def __ne__(self, other: 'LoadBalancerPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPool():
+
+class LoadBalancerPool:
"""
LoadBalancerPool.
@@ -48117,20 +51937,22 @@ class LoadBalancerPool():
property value was encountered.
"""
- def __init__(self,
- algorithm: str,
- created_at: datetime,
- health_monitor: 'LoadBalancerPoolHealthMonitor',
- href: str,
- id: str,
- name: str,
- protocol: str,
- provisioning_status: str,
- proxy_protocol: str,
- *,
- instance_group: 'InstanceGroupReference' = None,
- members: List['LoadBalancerPoolMemberReference'] = None,
- session_persistence: 'LoadBalancerPoolSessionPersistence' = None) -> None:
+ def __init__(
+ self,
+ algorithm: str,
+ created_at: datetime,
+ health_monitor: 'LoadBalancerPoolHealthMonitor',
+ href: str,
+ id: str,
+ name: str,
+ protocol: str,
+ provisioning_status: str,
+ proxy_protocol: str,
+ *,
+ instance_group: 'InstanceGroupReference' = None,
+ members: List['LoadBalancerPoolMemberReference'] = None,
+ session_persistence: 'LoadBalancerPoolSessionPersistence' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPool object.
@@ -48303,6 +52125,7 @@ class AlgorithmEnum(str, Enum):
"""
The load balancing algorithm.
"""
+
LEAST_CONNECTIONS = 'least_connections'
ROUND_ROBIN = 'round_robin'
WEIGHTED_ROUND_ROBIN = 'weighted_round_robin'
@@ -48316,6 +52139,7 @@ class ProtocolEnum(str, Enum):
processing and surface the error, or bypass the pool on which the unexpected
property value was encountered.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
@@ -48330,6 +52154,7 @@ class ProvisioningStatusEnum(str, Enum):
processing and surface the error, or bypass the pool on which the unexpected
property value was encountered.
"""
+
ACTIVE = 'active'
CREATE_PENDING = 'create_pending'
DELETE_PENDING = 'delete_pending'
@@ -48346,20 +52171,24 @@ class ProxyProtocolEnum(str, Enum):
Supported by load balancers in the `application` family (otherwise always
`disabled`).
"""
+
DISABLED = 'disabled'
V1 = 'v1'
V2 = 'v2'
-class LoadBalancerPoolCollection():
+
+class LoadBalancerPoolCollection:
"""
LoadBalancerPoolCollection.
:attr List[LoadBalancerPool] pools: Collection of pools.
"""
- def __init__(self,
- pools: List['LoadBalancerPool']) -> None:
+ def __init__(
+ self,
+ pools: List['LoadBalancerPool'],
+ ) -> None:
"""
Initialize a LoadBalancerPoolCollection object.
@@ -48413,7 +52242,8 @@ def __ne__(self, other: 'LoadBalancerPoolCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolHealthMonitor():
+
+class LoadBalancerPoolHealthMonitor:
"""
LoadBalancerPoolHealthMonitor.
@@ -48433,14 +52263,16 @@ class LoadBalancerPoolHealthMonitor():
target](https://tools.ietf.org/html/rfc7230#section-5.3.1).
"""
- def __init__(self,
- delay: int,
- max_retries: int,
- timeout: int,
- type: str,
- *,
- port: int = None,
- url_path: str = None) -> None:
+ def __init__(
+ self,
+ delay: int,
+ max_retries: int,
+ timeout: int,
+ type: str,
+ *,
+ port: int = None,
+ url_path: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolHealthMonitor object.
@@ -48540,12 +52372,14 @@ class TypeEnum(str, Enum):
processing and surface the error, or bypass the health monitor on which the
unexpected property value was encountered.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
-class LoadBalancerPoolHealthMonitorPatch():
+
+class LoadBalancerPoolHealthMonitorPatch:
"""
LoadBalancerPoolHealthMonitorPatch.
@@ -48564,14 +52398,16 @@ class LoadBalancerPoolHealthMonitorPatch():
target](https://tools.ietf.org/html/rfc7230#section-5.3.1).
"""
- def __init__(self,
- delay: int,
- max_retries: int,
- timeout: int,
- type: str,
- *,
- port: int = None,
- url_path: str = None) -> None:
+ def __init__(
+ self,
+ delay: int,
+ max_retries: int,
+ timeout: int,
+ type: str,
+ *,
+ port: int = None,
+ url_path: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolHealthMonitorPatch object.
@@ -48666,12 +52502,14 @@ class TypeEnum(str, Enum):
"""
The protocol type to use for health checks.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
-class LoadBalancerPoolHealthMonitorPrototype():
+
+class LoadBalancerPoolHealthMonitorPrototype:
"""
LoadBalancerPoolHealthMonitorPrototype.
@@ -48689,14 +52527,16 @@ class LoadBalancerPoolHealthMonitorPrototype():
target](https://tools.ietf.org/html/rfc7230#section-5.3.1).
"""
- def __init__(self,
- delay: int,
- max_retries: int,
- timeout: int,
- type: str,
- *,
- port: int = None,
- url_path: str = None) -> None:
+ def __init__(
+ self,
+ delay: int,
+ max_retries: int,
+ timeout: int,
+ type: str,
+ *,
+ port: int = None,
+ url_path: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolHealthMonitorPrototype object.
@@ -48790,27 +52630,33 @@ class TypeEnum(str, Enum):
"""
The protocol type to use for health checks.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
-class LoadBalancerPoolIdentity():
+
+class LoadBalancerPoolIdentity:
"""
Identifies a load balancer pool by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerPoolIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerPoolIdentityById', 'LoadBalancerPoolIdentityByHref']))
+ ", ".join(['LoadBalancerPoolIdentityById', 'LoadBalancerPoolIdentityByHref'])
+ )
raise Exception(msg)
-class LoadBalancerPoolIdentityByName():
+
+class LoadBalancerPoolIdentityByName:
"""
LoadBalancerPoolIdentityByName.
@@ -48818,8 +52664,10 @@ class LoadBalancerPoolIdentityByName():
all pools for the load balancer.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolIdentityByName object.
@@ -48868,7 +52716,8 @@ def __ne__(self, other: 'LoadBalancerPoolIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolMember():
+
+class LoadBalancerPoolMember:
"""
LoadBalancerPoolMember.
@@ -48899,16 +52748,18 @@ class LoadBalancerPoolMember():
`weighted_round_robin`.
"""
- def __init__(self,
- created_at: datetime,
- health: str,
- href: str,
- id: str,
- port: int,
- provisioning_status: str,
- target: 'LoadBalancerPoolMemberTarget',
- *,
- weight: int = None) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ health: str,
+ href: str,
+ id: str,
+ port: int,
+ provisioning_status: str,
+ target: 'LoadBalancerPoolMemberTarget',
+ *,
+ weight: int = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMember object.
@@ -49035,6 +52886,7 @@ class HealthEnum(str, Enum):
"""
Health of the server member in the pool.
"""
+
FAULTED = 'faulted'
OK = 'ok'
UNKNOWN = 'unknown'
@@ -49048,6 +52900,7 @@ class ProvisioningStatusEnum(str, Enum):
processing and surface the error, or bypass the pool member on which the
unexpected property value was encountered.
"""
+
ACTIVE = 'active'
CREATE_PENDING = 'create_pending'
DELETE_PENDING = 'delete_pending'
@@ -49055,15 +52908,18 @@ class ProvisioningStatusEnum(str, Enum):
UPDATE_PENDING = 'update_pending'
-class LoadBalancerPoolMemberCollection():
+
+class LoadBalancerPoolMemberCollection:
"""
LoadBalancerPoolMemberCollection.
:attr List[LoadBalancerPoolMember] members: Collection of members.
"""
- def __init__(self,
- members: List['LoadBalancerPoolMember']) -> None:
+ def __init__(
+ self,
+ members: List['LoadBalancerPoolMember'],
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberCollection object.
@@ -49117,7 +52973,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolMemberPatch():
+
+class LoadBalancerPoolMemberPatch:
"""
LoadBalancerPoolMemberPatch.
@@ -49141,11 +52998,13 @@ class LoadBalancerPoolMemberPatch():
`weighted_round_robin`.
"""
- def __init__(self,
- *,
- port: int = None,
- target: 'LoadBalancerPoolMemberTargetPrototype' = None,
- weight: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ port: int = None,
+ target: 'LoadBalancerPoolMemberTargetPrototype' = None,
+ weight: int = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberPatch object.
@@ -49223,7 +53082,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolMemberPrototype():
+
+class LoadBalancerPoolMemberPrototype:
"""
LoadBalancerPoolMemberPrototype.
@@ -49247,11 +53107,13 @@ class LoadBalancerPoolMemberPrototype():
`weighted_round_robin`.
"""
- def __init__(self,
- port: int,
- target: 'LoadBalancerPoolMemberTargetPrototype',
- *,
- weight: int = None) -> None:
+ def __init__(
+ self,
+ port: int,
+ target: 'LoadBalancerPoolMemberTargetPrototype',
+ *,
+ weight: int = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberPrototype object.
@@ -49332,7 +53194,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolMemberReference():
+
+class LoadBalancerPoolMemberReference:
"""
LoadBalancerPoolMemberReference.
@@ -49343,11 +53206,13 @@ class LoadBalancerPoolMemberReference():
:attr str id: The unique identifier for this load balancer pool member.
"""
- def __init__(self,
- href: str,
- id: str,
- *,
- deleted: 'LoadBalancerPoolMemberReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ *,
+ deleted: 'LoadBalancerPoolMemberReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberReference object.
@@ -49415,7 +53280,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolMemberReferenceDeleted():
+
+class LoadBalancerPoolMemberReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -49423,8 +53289,10 @@ class LoadBalancerPoolMemberReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberReferenceDeleted object.
@@ -49472,7 +53340,8 @@ def __ne__(self, other: 'LoadBalancerPoolMemberReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolMemberTarget():
+
+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
@@ -49481,16 +53350,20 @@ class LoadBalancerPoolMemberTarget():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerPoolMemberTargetInstanceReference', 'LoadBalancerPoolMemberTargetIP']))
+ ", ".join(['LoadBalancerPoolMemberTargetInstanceReference', 'LoadBalancerPoolMemberTargetIP'])
+ )
raise Exception(msg)
-class LoadBalancerPoolMemberTargetPrototype():
+
+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
@@ -49499,16 +53372,20 @@ class LoadBalancerPoolMemberTargetPrototype():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentity', 'LoadBalancerPoolMemberTargetPrototypeIP']))
+ ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentity', 'LoadBalancerPoolMemberTargetPrototypeIP'])
+ )
raise Exception(msg)
-class LoadBalancerPoolPatch():
+
+class LoadBalancerPoolPatch:
"""
LoadBalancerPoolPatch.
@@ -49535,14 +53412,16 @@ class LoadBalancerPoolPatch():
The session persistence of this pool.
"""
- def __init__(self,
- *,
- algorithm: str = None,
- health_monitor: 'LoadBalancerPoolHealthMonitorPatch' = None,
- name: str = None,
- protocol: str = None,
- proxy_protocol: str = None,
- session_persistence: 'LoadBalancerPoolSessionPersistencePatch' = None) -> None:
+ def __init__(
+ self,
+ *,
+ algorithm: str = None,
+ health_monitor: 'LoadBalancerPoolHealthMonitorPatch' = None,
+ name: str = None,
+ protocol: str = None,
+ proxy_protocol: str = None,
+ session_persistence: 'LoadBalancerPoolSessionPersistencePatch' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolPatch object.
@@ -49644,6 +53523,7 @@ class AlgorithmEnum(str, Enum):
"""
The load balancing algorithm.
"""
+
LEAST_CONNECTIONS = 'least_connections'
ROUND_ROBIN = 'round_robin'
WEIGHTED_ROUND_ROBIN = 'weighted_round_robin'
@@ -49659,6 +53539,7 @@ class ProtocolEnum(str, Enum):
must match, or be compatible with the listener's protocol. At present, the
compatible protocols are `http` and `https`.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
@@ -49674,12 +53555,14 @@ class ProxyProtocolEnum(str, Enum):
Supported by load balancers in the `application` family (otherwise always
`disabled`).
"""
+
DISABLED = 'disabled'
V1 = 'v1'
V2 = 'v2'
-class LoadBalancerPoolPrototype():
+
+class LoadBalancerPoolPrototype:
"""
LoadBalancerPoolPrototype.
@@ -49707,15 +53590,17 @@ class LoadBalancerPoolPrototype():
(optional) The session persistence of this pool.
"""
- def __init__(self,
- algorithm: str,
- health_monitor: 'LoadBalancerPoolHealthMonitorPrototype',
- protocol: str,
- *,
- members: List['LoadBalancerPoolMemberPrototype'] = None,
- name: str = None,
- proxy_protocol: str = None,
- session_persistence: 'LoadBalancerPoolSessionPersistencePrototype' = None) -> None:
+ def __init__(
+ self,
+ algorithm: str,
+ health_monitor: 'LoadBalancerPoolHealthMonitorPrototype',
+ protocol: str,
+ *,
+ members: List['LoadBalancerPoolMemberPrototype'] = None,
+ name: str = None,
+ proxy_protocol: str = None,
+ session_persistence: 'LoadBalancerPoolSessionPersistencePrototype' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolPrototype object.
@@ -49835,6 +53720,7 @@ class AlgorithmEnum(str, Enum):
"""
The load balancing algorithm.
"""
+
LEAST_CONNECTIONS = 'least_connections'
ROUND_ROBIN = 'round_robin'
WEIGHTED_ROUND_ROBIN = 'weighted_round_robin'
@@ -49847,6 +53733,7 @@ class ProtocolEnum(str, Enum):
the
`application` family support `tcp`, `http`, and `https`.
"""
+
HTTP = 'http'
HTTPS = 'https'
TCP = 'tcp'
@@ -49862,12 +53749,14 @@ class ProxyProtocolEnum(str, Enum):
Supported by load balancers in the `application` family (otherwise always
`disabled`).
"""
+
DISABLED = 'disabled'
V1 = 'v1'
V2 = 'v2'
-class LoadBalancerPoolReference():
+
+class LoadBalancerPoolReference:
"""
LoadBalancerPoolReference.
@@ -49880,12 +53769,14 @@ class LoadBalancerPoolReference():
all pools for the load balancer.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'LoadBalancerPoolReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'LoadBalancerPoolReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolReference object.
@@ -49962,7 +53853,8 @@ def __ne__(self, other: 'LoadBalancerPoolReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolReferenceDeleted():
+
+class LoadBalancerPoolReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -49970,8 +53862,10 @@ class LoadBalancerPoolReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolReferenceDeleted object.
@@ -50019,7 +53913,8 @@ def __ne__(self, other: 'LoadBalancerPoolReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerPoolSessionPersistence():
+
+class LoadBalancerPoolSessionPersistence:
"""
LoadBalancerPoolSessionPersistence.
@@ -50030,10 +53925,12 @@ class LoadBalancerPoolSessionPersistence():
types are applicable only to the `http` and `https` protocols.
"""
- def __init__(self,
- type: str,
- *,
- cookie_name: str = None) -> None:
+ def __init__(
+ self,
+ type: str,
+ *,
+ cookie_name: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolSessionPersistence object.
@@ -50095,12 +53992,14 @@ class TypeEnum(str, Enum):
The session persistence type. The `http_cookie` and `app_cookie` types are
applicable only to the `http` and `https` protocols.
"""
+
APP_COOKIE = 'app_cookie'
HTTP_COOKIE = 'http_cookie'
SOURCE_IP = 'source_ip'
-class LoadBalancerPoolSessionPersistencePatch():
+
+class LoadBalancerPoolSessionPersistencePatch:
"""
The session persistence configuration. Specify `null` to remove any existing session
persistence configuration.
@@ -50112,10 +54011,12 @@ class LoadBalancerPoolSessionPersistencePatch():
`app_cookie` types are applicable only to the `http` and `https` protocols.
"""
- def __init__(self,
- *,
- cookie_name: str = None,
- type: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ cookie_name: str = None,
+ type: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolSessionPersistencePatch object.
@@ -50176,12 +54077,14 @@ class TypeEnum(str, Enum):
The session persistence type. The `http_cookie` and `app_cookie` types are
applicable only to the `http` and `https` protocols.
"""
+
APP_COOKIE = 'app_cookie'
HTTP_COOKIE = 'http_cookie'
SOURCE_IP = 'source_ip'
-class LoadBalancerPoolSessionPersistencePrototype():
+
+class LoadBalancerPoolSessionPersistencePrototype:
"""
LoadBalancerPoolSessionPersistencePrototype.
@@ -50192,10 +54095,12 @@ class LoadBalancerPoolSessionPersistencePrototype():
types are applicable only to the `http` and `https` protocols.
"""
- def __init__(self,
- type: str,
- *,
- cookie_name: str = None) -> None:
+ def __init__(
+ self,
+ type: str,
+ *,
+ cookie_name: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolSessionPersistencePrototype object.
@@ -50257,12 +54162,14 @@ class TypeEnum(str, Enum):
The session persistence type. The `http_cookie` and `app_cookie` types are
applicable only to the `http` and `https` protocols.
"""
+
APP_COOKIE = 'app_cookie'
HTTP_COOKIE = 'http_cookie'
SOURCE_IP = 'source_ip'
-class LoadBalancerPrivateIpsItem():
+
+class LoadBalancerPrivateIpsItem:
"""
LoadBalancerPrivateIpsItem.
@@ -50282,14 +54189,16 @@ class LoadBalancerPrivateIpsItem():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- address: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'ReservedIPReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ address: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'ReservedIPReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPrivateIpsItem object.
@@ -50391,10 +54300,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SUBNET_RESERVED_IP = 'subnet_reserved_ip'
-class LoadBalancerProfile():
+
+class LoadBalancerProfile:
"""
LoadBalancerProfile.
@@ -50408,14 +54319,16 @@ class LoadBalancerProfile():
:attr LoadBalancerProfileUDPSupported udp_supported:
"""
- def __init__(self,
- family: str,
- href: str,
- logging_supported: 'LoadBalancerProfileLoggingSupported',
- name: str,
- route_mode_supported: 'LoadBalancerProfileRouteModeSupported',
- security_groups_supported: 'LoadBalancerProfileSecurityGroupsSupported',
- udp_supported: 'LoadBalancerProfileUDPSupported') -> None:
+ def __init__(
+ self,
+ family: str,
+ href: str,
+ logging_supported: 'LoadBalancerProfileLoggingSupported',
+ name: str,
+ route_mode_supported: 'LoadBalancerProfileRouteModeSupported',
+ security_groups_supported: 'LoadBalancerProfileSecurityGroupsSupported',
+ udp_supported: 'LoadBalancerProfileUDPSupported',
+ ) -> None:
"""
Initialize a LoadBalancerProfile object.
@@ -50526,7 +54439,8 @@ def __ne__(self, other: 'LoadBalancerProfile') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerProfileCollection():
+
+class LoadBalancerProfileCollection:
"""
LoadBalancerProfileCollection.
@@ -50541,13 +54455,15 @@ class LoadBalancerProfileCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'LoadBalancerProfileCollectionFirst',
- limit: int,
- profiles: List['LoadBalancerProfile'],
- total_count: int,
- *,
- next: 'LoadBalancerProfileCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'LoadBalancerProfileCollectionFirst',
+ limit: int,
+ profiles: List['LoadBalancerProfile'],
+ total_count: int,
+ *,
+ next: 'LoadBalancerProfileCollectionNext' = None,
+ ) -> None:
"""
Initialize a LoadBalancerProfileCollection object.
@@ -50642,15 +54558,18 @@ def __ne__(self, other: 'LoadBalancerProfileCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerProfileCollectionFirst():
+
+class LoadBalancerProfileCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileCollectionFirst object.
@@ -50698,7 +54617,8 @@ def __ne__(self, other: 'LoadBalancerProfileCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerProfileCollectionNext():
+
+class LoadBalancerProfileCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -50706,8 +54626,10 @@ class LoadBalancerProfileCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileCollectionNext object.
@@ -50755,22 +54677,27 @@ def __ne__(self, other: 'LoadBalancerProfileCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerProfileIdentity():
+
+class LoadBalancerProfileIdentity:
"""
Identifies a load balancer profile by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerProfileIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerProfileIdentityByName', 'LoadBalancerProfileIdentityByHref']))
+ ", ".join(['LoadBalancerProfileIdentityByName', 'LoadBalancerProfileIdentityByHref'])
+ )
raise Exception(msg)
-class LoadBalancerProfileLoggingSupported():
+
+class LoadBalancerProfileLoggingSupported:
"""
Indicates which logging type(s) are supported for a load balancer with this profile.
@@ -50779,9 +54706,11 @@ class LoadBalancerProfileLoggingSupported():
this profile.
"""
- def __init__(self,
- type: str,
- value: List[str]) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: List[str],
+ ) -> None:
"""
Initialize a LoadBalancerProfileLoggingSupported object.
@@ -50842,10 +54771,12 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
-class LoadBalancerProfileReference():
+
+class LoadBalancerProfileReference:
"""
LoadBalancerProfileReference.
@@ -50854,10 +54785,12 @@ class LoadBalancerProfileReference():
:attr str name: The globally unique name for this load balancer profile.
"""
- def __init__(self,
- family: str,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ family: str,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileReference object.
@@ -50922,52 +54855,65 @@ def __ne__(self, other: 'LoadBalancerProfileReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerProfileRouteModeSupported():
+
+class LoadBalancerProfileRouteModeSupported:
"""
LoadBalancerProfileRouteModeSupported.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerProfileRouteModeSupported object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerProfileRouteModeSupportedFixed', 'LoadBalancerProfileRouteModeSupportedDependent']))
+ ", ".join(['LoadBalancerProfileRouteModeSupportedFixed', 'LoadBalancerProfileRouteModeSupportedDependent'])
+ )
raise Exception(msg)
-class LoadBalancerProfileSecurityGroupsSupported():
+
+class LoadBalancerProfileSecurityGroupsSupported:
"""
LoadBalancerProfileSecurityGroupsSupported.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerProfileSecurityGroupsSupported object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerProfileSecurityGroupsSupportedFixed', 'LoadBalancerProfileSecurityGroupsSupportedDependent']))
+ ", ".join(['LoadBalancerProfileSecurityGroupsSupportedFixed', 'LoadBalancerProfileSecurityGroupsSupportedDependent'])
+ )
raise Exception(msg)
-class LoadBalancerProfileUDPSupported():
+
+class LoadBalancerProfileUDPSupported:
"""
LoadBalancerProfileUDPSupported.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerProfileUDPSupported object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerProfileUDPSupportedFixed', 'LoadBalancerProfileUDPSupportedDependent']))
+ ", ".join(['LoadBalancerProfileUDPSupportedFixed', 'LoadBalancerProfileUDPSupportedDependent'])
+ )
raise Exception(msg)
-class LoadBalancerReferenceDeleted():
+
+class LoadBalancerReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -50975,8 +54921,10 @@ class LoadBalancerReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a LoadBalancerReferenceDeleted object.
@@ -51024,7 +54972,8 @@ def __ne__(self, other: 'LoadBalancerReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class LoadBalancerStatistics():
+
+class LoadBalancerStatistics:
"""
LoadBalancerStatistics.
@@ -51037,11 +54986,13 @@ class LoadBalancerStatistics():
:attr float throughput: Current throughput (Mbps) of this load balancer.
"""
- def __init__(self,
- active_connections: int,
- connection_rate: float,
- data_processed_this_month: int,
- throughput: float) -> None:
+ def __init__(
+ self,
+ active_connections: int,
+ connection_rate: float,
+ data_processed_this_month: int,
+ throughput: float,
+ ) -> None:
"""
Initialize a LoadBalancerStatistics object.
@@ -51116,7 +55067,8 @@ def __ne__(self, other: 'LoadBalancerStatistics') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACL():
+
+class NetworkACL:
"""
NetworkACL.
@@ -51135,16 +55087,18 @@ class NetworkACL():
:attr VPCReference vpc: The VPC this network ACL resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- rules: List['NetworkACLRuleItem'],
- subnets: List['SubnetReference'],
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ rules: List['NetworkACLRuleItem'],
+ subnets: List['SubnetReference'],
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a NetworkACL object.
@@ -51279,7 +55233,8 @@ def __ne__(self, other: 'NetworkACL') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLCollection():
+
+class NetworkACLCollection:
"""
NetworkACLCollection.
@@ -51293,13 +55248,15 @@ class NetworkACLCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'NetworkACLCollectionFirst',
- limit: int,
- network_acls: List['NetworkACL'],
- total_count: int,
- *,
- next: 'NetworkACLCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'NetworkACLCollectionFirst',
+ limit: int,
+ network_acls: List['NetworkACL'],
+ total_count: int,
+ *,
+ next: 'NetworkACLCollectionNext' = None,
+ ) -> None:
"""
Initialize a NetworkACLCollection object.
@@ -51393,15 +55350,18 @@ def __ne__(self, other: 'NetworkACLCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLCollectionFirst():
+
+class NetworkACLCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLCollectionFirst object.
@@ -51449,7 +55409,8 @@ def __ne__(self, other: 'NetworkACLCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLCollectionNext():
+
+class NetworkACLCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -51457,8 +55418,10 @@ class NetworkACLCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLCollectionNext object.
@@ -51506,22 +55469,27 @@ def __ne__(self, other: 'NetworkACLCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLIdentity():
+
+class NetworkACLIdentity:
"""
Identifies a network ACL by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a NetworkACLIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLIdentityById', 'NetworkACLIdentityByCRN', 'NetworkACLIdentityByHref']))
+ ", ".join(['NetworkACLIdentityById', 'NetworkACLIdentityByCRN', 'NetworkACLIdentityByHref'])
+ )
raise Exception(msg)
-class NetworkACLPatch():
+
+class NetworkACLPatch:
"""
NetworkACLPatch.
@@ -51529,9 +55497,11 @@ class NetworkACLPatch():
used by another network ACL for the VPC.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkACLPatch object.
@@ -51578,7 +55548,8 @@ def __ne__(self, other: 'NetworkACLPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLPrototype():
+
+class NetworkACLPrototype:
"""
NetworkACLPrototype.
@@ -51591,11 +55562,13 @@ class NetworkACLPrototype():
:attr VPCIdentity vpc: The VPC this network ACL will reside in.
"""
- def __init__(self,
- vpc: 'VPCIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ vpc: 'VPCIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a NetworkACLPrototype object.
@@ -51609,10 +55582,12 @@ def __init__(self,
used.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLPrototypeNetworkACLByRules', 'NetworkACLPrototypeNetworkACLBySourceNetworkACL']))
+ ", ".join(['NetworkACLPrototypeNetworkACLByRules', 'NetworkACLPrototypeNetworkACLBySourceNetworkACL'])
+ )
raise Exception(msg)
-class NetworkACLReference():
+
+class NetworkACLReference:
"""
NetworkACLReference.
@@ -51626,13 +55601,15 @@ class NetworkACLReference():
network ACLs for the VPC.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'NetworkACLReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'NetworkACLReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a NetworkACLReference object.
@@ -51716,7 +55693,8 @@ def __ne__(self, other: 'NetworkACLReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLReferenceDeleted():
+
+class NetworkACLReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -51724,8 +55702,10 @@ class NetworkACLReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a NetworkACLReferenceDeleted object.
@@ -51773,7 +55753,8 @@ def __ne__(self, other: 'NetworkACLReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLRule():
+
+class NetworkACLRule:
"""
NetworkACLRule.
@@ -51794,19 +55775,21 @@ class NetworkACLRule():
`0.0.0.0/0` matches all source addresses.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- protocol: str,
- source: str,
- *,
- before: 'NetworkACLRuleReference' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ protocol: str,
+ source: str,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ ) -> None:
"""
Initialize a NetworkACLRule object.
@@ -51827,7 +55810,8 @@ def __init__(self,
is immediately before. If absent, this is the last rule.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLRuleNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleNetworkACLRuleProtocolICMP', 'NetworkACLRuleNetworkACLRuleProtocolAll']))
+ ", ".join(['NetworkACLRuleNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleNetworkACLRuleProtocolICMP', 'NetworkACLRuleNetworkACLRuleProtocolAll'])
+ )
raise Exception(msg)
@classmethod
@@ -51836,9 +55820,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRule':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'NetworkACLRule'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['NetworkACLRuleNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleNetworkACLRuleProtocolICMP', 'NetworkACLRuleNetworkACLRuleProtocolAll']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -51869,6 +55853,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -51877,6 +55862,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -51885,6 +55871,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -51892,45 +55879,55 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class NetworkACLRuleBeforePatch():
+
+class NetworkACLRuleBeforePatch:
"""
The rule to move this rule immediately before.
Specify `null` to move this rule after all existing rules.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a NetworkACLRuleBeforePatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLRuleBeforePatchNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref']))
+ ", ".join(['NetworkACLRuleBeforePatchNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref'])
+ )
raise Exception(msg)
-class NetworkACLRuleBeforePrototype():
+
+class NetworkACLRuleBeforePrototype:
"""
The rule to insert this rule immediately before.
If unspecified, this rule will be inserted after all existing rules.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a NetworkACLRuleBeforePrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref']))
+ ", ".join(['NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById', 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref'])
+ )
raise Exception(msg)
-class NetworkACLRuleCollection():
+
+class NetworkACLRuleCollection:
"""
NetworkACLRuleCollection.
@@ -51945,13 +55942,15 @@ class NetworkACLRuleCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'NetworkACLRuleCollectionFirst',
- limit: int,
- rules: List['NetworkACLRuleItem'],
- total_count: int,
- *,
- next: 'NetworkACLRuleCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'NetworkACLRuleCollectionFirst',
+ limit: int,
+ rules: List['NetworkACLRuleItem'],
+ total_count: int,
+ *,
+ next: 'NetworkACLRuleCollectionNext' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleCollection object.
@@ -52046,15 +56045,18 @@ def __ne__(self, other: 'NetworkACLRuleCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLRuleCollectionFirst():
+
+class NetworkACLRuleCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleCollectionFirst object.
@@ -52102,7 +56104,8 @@ def __ne__(self, other: 'NetworkACLRuleCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLRuleCollectionNext():
+
+class NetworkACLRuleCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -52110,8 +56113,10 @@ class NetworkACLRuleCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleCollectionNext object.
@@ -52159,7 +56164,8 @@ def __ne__(self, other: 'NetworkACLRuleCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLRuleItem():
+
+class NetworkACLRuleItem:
"""
NetworkACLRuleItem.
@@ -52181,19 +56187,21 @@ class NetworkACLRuleItem():
`0.0.0.0/0` matches all source addresses.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- protocol: str,
- source: str,
- *,
- before: 'NetworkACLRuleReference' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ protocol: str,
+ source: str,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleItem object.
@@ -52216,7 +56224,8 @@ def __init__(self,
rule.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', 'NetworkACLRuleItemNetworkACLRuleProtocolAll']))
+ ", ".join(['NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', 'NetworkACLRuleItemNetworkACLRuleProtocolAll'])
+ )
raise Exception(msg)
@classmethod
@@ -52225,9 +56234,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRuleItem':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'NetworkACLRuleItem'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP', 'NetworkACLRuleItemNetworkACLRuleProtocolICMP', 'NetworkACLRuleItemNetworkACLRuleProtocolAll']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -52258,6 +56267,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -52266,6 +56276,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -52274,6 +56285,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -52281,13 +56293,15 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class NetworkACLRulePatch():
+
+class NetworkACLRulePatch:
"""
NetworkACLRulePatch.
@@ -52319,21 +56333,23 @@ class NetworkACLRulePatch():
Specify `null` to remove an existing ICMP traffic type value.
"""
- def __init__(self,
- *,
- action: str = None,
- before: 'NetworkACLRuleBeforePatch' = None,
- code: int = None,
- destination: str = None,
- destination_port_max: int = None,
- destination_port_min: int = None,
- direction: str = None,
- name: str = None,
- protocol: str = None,
- source: str = None,
- source_port_max: int = None,
- source_port_min: int = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ action: str = None,
+ before: 'NetworkACLRuleBeforePatch' = None,
+ code: int = None,
+ destination: str = None,
+ destination_port_max: int = None,
+ destination_port_min: int = None,
+ direction: str = None,
+ name: str = None,
+ protocol: str = None,
+ source: str = None,
+ source_port_max: int = None,
+ source_port_min: int = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePatch object.
@@ -52471,6 +56487,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -52479,6 +56496,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -52487,13 +56505,15 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class NetworkACLRulePrototype():
+
+class NetworkACLRulePrototype:
"""
NetworkACLRulePrototype.
@@ -52513,16 +56533,18 @@ class NetworkACLRulePrototype():
`0.0.0.0/0` matches all source addresses.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- protocol: str,
- source: str,
- *,
- before: 'NetworkACLRuleBeforePrototype' = None,
- ip_version: str = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ protocol: str,
+ source: str,
+ *,
+ before: 'NetworkACLRuleBeforePrototype' = None,
+ ip_version: str = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototype object.
@@ -52542,7 +56564,8 @@ def __init__(self,
name will be a hyphenated list of randomly-selected words.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype']))
+ ", ".join(['NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype'])
+ )
raise Exception(msg)
@classmethod
@@ -52551,9 +56574,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototype':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'NetworkACLRulePrototype'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -52584,6 +56607,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -52592,6 +56616,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -52600,6 +56625,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -52607,13 +56633,15 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class NetworkACLRulePrototypeNetworkACLContext():
+
+class NetworkACLRulePrototypeNetworkACLContext:
"""
NetworkACLRulePrototypeNetworkACLContext.
@@ -52630,15 +56658,17 @@ class NetworkACLRulePrototypeNetworkACLContext():
`0.0.0.0/0` matches all source addresses.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- protocol: str,
- source: str,
- *,
- ip_version: str = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ protocol: str,
+ source: str,
+ *,
+ ip_version: str = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLContext object.
@@ -52655,7 +56685,8 @@ def __init__(self,
name will be a hyphenated list of randomly-selected words.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype']))
+ ", ".join(['NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype'])
+ )
raise Exception(msg)
@classmethod
@@ -52664,9 +56695,9 @@ def from_dict(cls, _dict: Dict) -> 'NetworkACLRulePrototypeNetworkACLContext':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'NetworkACLRulePrototypeNetworkACLContext'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype', 'NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -52697,6 +56728,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -52705,6 +56737,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -52713,6 +56746,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -52720,13 +56754,15 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class NetworkACLRuleReference():
+
+class NetworkACLRuleReference:
"""
NetworkACLRuleReference.
@@ -52739,12 +56775,14 @@ class NetworkACLRuleReference():
all rules for the network ACL.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'NetworkACLRuleReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'NetworkACLRuleReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleReference object.
@@ -52820,7 +56858,8 @@ def __ne__(self, other: 'NetworkACLRuleReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkACLRuleReferenceDeleted():
+
+class NetworkACLRuleReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -52828,8 +56867,10 @@ class NetworkACLRuleReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleReferenceDeleted object.
@@ -52877,7 +56918,8 @@ def __ne__(self, other: 'NetworkACLRuleReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterface():
+
+class NetworkInterface:
"""
NetworkInterface.
@@ -52901,20 +56943,22 @@ class NetworkInterface():
:attr str type: The type of this network interface as it relates to an instance.
"""
- def __init__(self,
- allow_ip_spoofing: bool,
- created_at: datetime,
- floating_ips: List['FloatingIPReference'],
- href: str,
- id: str,
- name: str,
- port_speed: int,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- status: str,
- subnet: 'SubnetReference',
- type: str) -> None:
+ def __init__(
+ self,
+ allow_ip_spoofing: bool,
+ created_at: datetime,
+ floating_ips: List['FloatingIPReference'],
+ href: str,
+ id: str,
+ name: str,
+ port_speed: int,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ status: str,
+ subnet: 'SubnetReference',
+ type: str,
+ ) -> None:
"""
Initialize a NetworkInterface object.
@@ -53086,6 +57130,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
@@ -53093,6 +57138,7 @@ class StatusEnum(str, Enum):
"""
The status of the network interface.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -53103,11 +57149,13 @@ class TypeEnum(str, Enum):
"""
The type of this network interface as it relates to an instance.
"""
+
PRIMARY = 'primary'
SECONDARY = 'secondary'
-class NetworkInterfaceBareMetalServerContextReference():
+
+class NetworkInterfaceBareMetalServerContextReference:
"""
NetworkInterfaceBareMetalServerContextReference.
@@ -53123,15 +57171,17 @@ class NetworkInterfaceBareMetalServerContextReference():
:attr SubnetReference subnet: The associated subnet.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- subnet: 'SubnetReference',
- *,
- deleted: 'NetworkInterfaceBareMetalServerContextReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ subnet: 'SubnetReference',
+ *,
+ deleted: 'NetworkInterfaceBareMetalServerContextReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a NetworkInterfaceBareMetalServerContextReference object.
@@ -53241,10 +57291,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
-class NetworkInterfaceBareMetalServerContextReferenceDeleted():
+
+class NetworkInterfaceBareMetalServerContextReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -53252,8 +57304,10 @@ class NetworkInterfaceBareMetalServerContextReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a NetworkInterfaceBareMetalServerContextReferenceDeleted object.
@@ -53301,22 +57355,27 @@ def __ne__(self, other: 'NetworkInterfaceBareMetalServerContextReferenceDeleted'
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterfaceIPPrototype():
+
+class NetworkInterfaceIPPrototype:
"""
NetworkInterfaceIPPrototype.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a NetworkInterfaceIPPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentity', 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext']))
+ ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentity', 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext'])
+ )
raise Exception(msg)
-class NetworkInterfaceInstanceContextReference():
+
+class NetworkInterfaceInstanceContextReference:
"""
NetworkInterfaceInstanceContextReference.
@@ -53332,15 +57391,17 @@ class NetworkInterfaceInstanceContextReference():
:attr SubnetReference subnet: The associated subnet.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- subnet: 'SubnetReference',
- *,
- deleted: 'NetworkInterfaceInstanceContextReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ subnet: 'SubnetReference',
+ *,
+ deleted: 'NetworkInterfaceInstanceContextReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a NetworkInterfaceInstanceContextReference object.
@@ -53450,10 +57511,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
-class NetworkInterfaceInstanceContextReferenceDeleted():
+
+class NetworkInterfaceInstanceContextReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -53461,8 +57524,10 @@ class NetworkInterfaceInstanceContextReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a NetworkInterfaceInstanceContextReferenceDeleted object.
@@ -53510,7 +57575,8 @@ def __ne__(self, other: 'NetworkInterfaceInstanceContextReferenceDeleted') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterfacePatch():
+
+class NetworkInterfacePatch:
"""
NetworkInterfacePatch.
@@ -53521,10 +57587,12 @@ class NetworkInterfacePatch():
used by another network interface on the virtual server instance.
"""
- def __init__(self,
- *,
- allow_ip_spoofing: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ allow_ip_spoofing: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkInterfacePatch object.
@@ -53580,7 +57648,8 @@ def __ne__(self, other: 'NetworkInterfacePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterfacePrototype():
+
+class NetworkInterfacePrototype:
"""
NetworkInterfacePrototype.
@@ -53604,13 +57673,15 @@ class NetworkInterfacePrototype():
:attr SubnetIdentity subnet: The associated subnet.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- *,
- allow_ip_spoofing: bool = None,
- name: str = None,
- primary_ip: 'NetworkInterfaceIPPrototype' = None,
- security_groups: List['SecurityGroupIdentity'] = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ *,
+ allow_ip_spoofing: bool = None,
+ name: str = None,
+ primary_ip: 'NetworkInterfaceIPPrototype' = None,
+ security_groups: List['SecurityGroupIdentity'] = None,
+ ) -> None:
"""
Initialize a NetworkInterfacePrototype object.
@@ -53708,7 +57779,8 @@ def __ne__(self, other: 'NetworkInterfacePrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterfaceReferenceDeleted():
+
+class NetworkInterfaceReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -53716,8 +57788,10 @@ class NetworkInterfaceReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a NetworkInterfaceReferenceDeleted object.
@@ -53765,7 +57839,8 @@ def __ne__(self, other: 'NetworkInterfaceReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterfaceReferenceTargetContextDeleted():
+
+class NetworkInterfaceReferenceTargetContextDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -53773,8 +57848,10 @@ class NetworkInterfaceReferenceTargetContextDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a NetworkInterfaceReferenceTargetContextDeleted object.
@@ -53822,7 +57899,8 @@ def __ne__(self, other: 'NetworkInterfaceReferenceTargetContextDeleted') -> bool
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class NetworkInterfaceUnpaginatedCollection():
+
+class NetworkInterfaceUnpaginatedCollection:
"""
NetworkInterfaceUnpaginatedCollection.
@@ -53830,8 +57908,10 @@ class NetworkInterfaceUnpaginatedCollection():
interfaces.
"""
- def __init__(self,
- network_interfaces: List['NetworkInterface']) -> None:
+ def __init__(
+ self,
+ network_interfaces: List['NetworkInterface'],
+ ) -> None:
"""
Initialize a NetworkInterfaceUnpaginatedCollection object.
@@ -53886,7 +57966,8 @@ def __ne__(self, other: 'NetworkInterfaceUnpaginatedCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class OperatingSystem():
+
+class OperatingSystem:
"""
OperatingSystem.
@@ -53902,15 +57983,17 @@ class OperatingSystem():
:attr str version: The major release version of this operating system.
"""
- def __init__(self,
- architecture: str,
- dedicated_host_only: bool,
- display_name: str,
- family: str,
- href: str,
- name: str,
- vendor: str,
- version: str) -> None:
+ def __init__(
+ self,
+ architecture: str,
+ dedicated_host_only: bool,
+ display_name: str,
+ family: str,
+ href: str,
+ name: str,
+ vendor: str,
+ version: str,
+ ) -> None:
"""
Initialize a OperatingSystem object.
@@ -54016,7 +58099,8 @@ def __ne__(self, other: 'OperatingSystem') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class OperatingSystemCollection():
+
+class OperatingSystemCollection:
"""
OperatingSystemCollection.
@@ -54030,12 +58114,14 @@ class OperatingSystemCollection():
:attr List[OperatingSystem] operating_systems: Collection of operating systems.
"""
- def __init__(self,
- first: 'OperatingSystemCollectionFirst',
- limit: int,
- operating_systems: List['OperatingSystem'],
- *,
- next: 'OperatingSystemCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'OperatingSystemCollectionFirst',
+ limit: int,
+ operating_systems: List['OperatingSystem'],
+ *,
+ next: 'OperatingSystemCollectionNext' = None,
+ ) -> None:
"""
Initialize a OperatingSystemCollection object.
@@ -54122,15 +58208,18 @@ def __ne__(self, other: 'OperatingSystemCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class OperatingSystemCollectionFirst():
+
+class OperatingSystemCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a OperatingSystemCollectionFirst object.
@@ -54178,7 +58267,8 @@ def __ne__(self, other: 'OperatingSystemCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class OperatingSystemCollectionNext():
+
+class OperatingSystemCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -54186,8 +58276,10 @@ class OperatingSystemCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a OperatingSystemCollectionNext object.
@@ -54235,22 +58327,27 @@ def __ne__(self, other: 'OperatingSystemCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class OperatingSystemIdentity():
+
+class OperatingSystemIdentity:
"""
Identifies an operating system by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a OperatingSystemIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['OperatingSystemIdentityByName', 'OperatingSystemIdentityByHref']))
+ ", ".join(['OperatingSystemIdentityByName', 'OperatingSystemIdentityByHref'])
+ )
raise Exception(msg)
-class PlacementGroup():
+
+class PlacementGroup:
"""
PlacementGroup.
@@ -54274,16 +58371,18 @@ class PlacementGroup():
unexpected strategy was encountered.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- strategy: str) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ strategy: str,
+ ) -> None:
"""
Initialize a PlacementGroup object.
@@ -54411,6 +58510,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the placement group.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -54424,6 +58524,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
PLACEMENT_GROUP = 'placement_group'
@@ -54437,11 +58538,13 @@ class StrategyEnum(str, Enum):
surface the error, or bypass the placement group on which the unexpected strategy
was encountered.
"""
+
HOST_SPREAD = 'host_spread'
POWER_SPREAD = 'power_spread'
-class PlacementGroupCollection():
+
+class PlacementGroupCollection:
"""
PlacementGroupCollection.
@@ -54456,13 +58559,15 @@ class PlacementGroupCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'PlacementGroupCollectionFirst',
- limit: int,
- placement_groups: List['PlacementGroup'],
- total_count: int,
- *,
- next: 'PlacementGroupCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'PlacementGroupCollectionFirst',
+ limit: int,
+ placement_groups: List['PlacementGroup'],
+ total_count: int,
+ *,
+ next: 'PlacementGroupCollectionNext' = None,
+ ) -> None:
"""
Initialize a PlacementGroupCollection object.
@@ -54557,15 +58662,18 @@ def __ne__(self, other: 'PlacementGroupCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PlacementGroupCollectionFirst():
+
+class PlacementGroupCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a PlacementGroupCollectionFirst object.
@@ -54613,7 +58721,8 @@ def __ne__(self, other: 'PlacementGroupCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PlacementGroupCollectionNext():
+
+class PlacementGroupCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -54621,8 +58730,10 @@ class PlacementGroupCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a PlacementGroupCollectionNext object.
@@ -54670,7 +58781,8 @@ def __ne__(self, other: 'PlacementGroupCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PlacementGroupPatch():
+
+class PlacementGroupPatch:
"""
PlacementGroupPatch.
@@ -54678,9 +58790,11 @@ class PlacementGroupPatch():
be used by another placement group in the region.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a PlacementGroupPatch object.
@@ -54727,7 +58841,8 @@ def __ne__(self, other: 'PlacementGroupPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PlacementGroupReferenceDeleted():
+
+class PlacementGroupReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -54735,8 +58850,10 @@ class PlacementGroupReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a PlacementGroupReferenceDeleted object.
@@ -54784,7 +58901,8 @@ def __ne__(self, other: 'PlacementGroupReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PublicGateway():
+
+class PublicGateway:
"""
PublicGateway.
@@ -54805,18 +58923,20 @@ class PublicGateway():
:attr ZoneReference zone: The zone this public gateway resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- floating_ip: 'PublicGatewayFloatingIp',
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- status: str,
- vpc: 'VPCReference',
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ floating_ip: 'PublicGatewayFloatingIp',
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ status: str,
+ vpc: 'VPCReference',
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a PublicGateway object.
@@ -54964,6 +59084,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
PUBLIC_GATEWAY = 'public_gateway'
@@ -54971,13 +59092,15 @@ class StatusEnum(str, Enum):
"""
The status of this public gateway.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
-class PublicGatewayCollection():
+
+class PublicGatewayCollection:
"""
PublicGatewayCollection.
@@ -54991,13 +59114,15 @@ class PublicGatewayCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'PublicGatewayCollectionFirst',
- limit: int,
- public_gateways: List['PublicGateway'],
- total_count: int,
- *,
- next: 'PublicGatewayCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'PublicGatewayCollectionFirst',
+ limit: int,
+ public_gateways: List['PublicGateway'],
+ total_count: int,
+ *,
+ next: 'PublicGatewayCollectionNext' = None,
+ ) -> None:
"""
Initialize a PublicGatewayCollection object.
@@ -55091,15 +59216,18 @@ def __ne__(self, other: 'PublicGatewayCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PublicGatewayCollectionFirst():
+
+class PublicGatewayCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a PublicGatewayCollectionFirst object.
@@ -55147,7 +59275,8 @@ def __ne__(self, other: 'PublicGatewayCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PublicGatewayCollectionNext():
+
+class PublicGatewayCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -55155,8 +59284,10 @@ class PublicGatewayCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a PublicGatewayCollectionNext object.
@@ -55204,22 +59335,27 @@ def __ne__(self, other: 'PublicGatewayCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PublicGatewayFloatingIPPrototype():
+
+class PublicGatewayFloatingIPPrototype:
"""
PublicGatewayFloatingIPPrototype.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentity', 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext']))
+ ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentity', 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext'])
+ )
raise Exception(msg)
-class PublicGatewayFloatingIp():
+
+class PublicGatewayFloatingIp:
"""
The floating IP bound to this public gateway.
@@ -55234,14 +59370,16 @@ class PublicGatewayFloatingIp():
floating IPs in the region.
"""
- def __init__(self,
- address: str,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'FloatingIPReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ address: str,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'FloatingIPReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIp object.
@@ -55333,22 +59471,27 @@ def __ne__(self, other: 'PublicGatewayFloatingIp') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PublicGatewayIdentity():
+
+class PublicGatewayIdentity:
"""
Identifies a public gateway by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a PublicGatewayIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['PublicGatewayIdentityPublicGatewayIdentityById', 'PublicGatewayIdentityPublicGatewayIdentityByCRN', 'PublicGatewayIdentityPublicGatewayIdentityByHref']))
+ ", ".join(['PublicGatewayIdentityPublicGatewayIdentityById', 'PublicGatewayIdentityPublicGatewayIdentityByCRN', 'PublicGatewayIdentityPublicGatewayIdentityByHref'])
+ )
raise Exception(msg)
-class PublicGatewayPatch():
+
+class PublicGatewayPatch:
"""
PublicGatewayPatch.
@@ -55356,9 +59499,11 @@ class PublicGatewayPatch():
be used by another public gateway in the VPC.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a PublicGatewayPatch object.
@@ -55405,7 +59550,8 @@ def __ne__(self, other: 'PublicGatewayPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class PublicGatewayReference():
+
+class PublicGatewayReference:
"""
PublicGatewayReference.
@@ -55420,14 +59566,16 @@ class PublicGatewayReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'PublicGatewayReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'PublicGatewayReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a PublicGatewayReference object.
@@ -55523,10 +59671,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
PUBLIC_GATEWAY = 'public_gateway'
-class PublicGatewayReferenceDeleted():
+
+class PublicGatewayReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -55534,8 +59684,10 @@ class PublicGatewayReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a PublicGatewayReferenceDeleted object.
@@ -55583,7 +59735,8 @@ def __ne__(self, other: 'PublicGatewayReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class Region():
+
+class Region:
"""
Region.
@@ -55593,11 +59746,13 @@ class Region():
:attr str status: The availability status of this region.
"""
- def __init__(self,
- endpoint: str,
- href: str,
- name: str,
- status: str) -> None:
+ def __init__(
+ self,
+ endpoint: str,
+ href: str,
+ name: str,
+ status: str,
+ ) -> None:
"""
Initialize a Region object.
@@ -55673,19 +59828,23 @@ class StatusEnum(str, Enum):
"""
The availability status of this region.
"""
+
AVAILABLE = 'available'
UNAVAILABLE = 'unavailable'
-class RegionCollection():
+
+class RegionCollection:
"""
RegionCollection.
:attr List[Region] regions: Collection of regions.
"""
- def __init__(self,
- regions: List['Region']) -> None:
+ def __init__(
+ self,
+ regions: List['Region'],
+ ) -> None:
"""
Initialize a RegionCollection object.
@@ -55739,7 +59898,8 @@ def __ne__(self, other: 'RegionCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RegionReference():
+
+class RegionReference:
"""
RegionReference.
@@ -55747,9 +59907,11 @@ class RegionReference():
:attr str name: The globally unique name for this region.
"""
- def __init__(self,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a RegionReference object.
@@ -55805,7 +59967,8 @@ def __ne__(self, other: 'RegionReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIP():
+
+class ReservedIP:
"""
ReservedIP.
@@ -55831,18 +59994,20 @@ class ReservedIP():
If absent, this reserved IP is provider-owned or unbound.
"""
- def __init__(self,
- address: str,
- auto_delete: bool,
- created_at: datetime,
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- owner: str,
- resource_type: str,
- *,
- target: 'ReservedIPTarget' = None) -> None:
+ def __init__(
+ self,
+ address: str,
+ auto_delete: bool,
+ created_at: datetime,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ owner: str,
+ resource_type: str,
+ *,
+ target: 'ReservedIPTarget' = None,
+ ) -> None:
"""
Initialize a ReservedIP object.
@@ -55979,6 +60144,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the reserved IP.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -55992,6 +60158,7 @@ class OwnerEnum(str, Enum):
"""
The owner of the reserved IP.
"""
+
PROVIDER = 'provider'
USER = 'user'
@@ -56000,10 +60167,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SUBNET_RESERVED_IP = 'subnet_reserved_ip'
-class ReservedIPCollection():
+
+class ReservedIPCollection:
"""
ReservedIPCollection.
@@ -56017,13 +60186,15 @@ class ReservedIPCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'ReservedIPCollectionFirst',
- limit: int,
- reserved_ips: List['ReservedIP'],
- total_count: int,
- *,
- next: 'ReservedIPCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'ReservedIPCollectionFirst',
+ limit: int,
+ reserved_ips: List['ReservedIP'],
+ total_count: int,
+ *,
+ next: 'ReservedIPCollectionNext' = None,
+ ) -> None:
"""
Initialize a ReservedIPCollection object.
@@ -56118,7 +60289,8 @@ def __ne__(self, other: 'ReservedIPCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionEndpointGatewayContext():
+
+class ReservedIPCollectionEndpointGatewayContext:
"""
ReservedIPCollectionEndpointGatewayContext.
@@ -56134,13 +60306,15 @@ class ReservedIPCollectionEndpointGatewayContext():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'ReservedIPCollectionEndpointGatewayContextFirst',
- ips: List['ReservedIP'],
- limit: int,
- total_count: int,
- *,
- next: 'ReservedIPCollectionEndpointGatewayContextNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'ReservedIPCollectionEndpointGatewayContextFirst',
+ ips: List['ReservedIP'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'ReservedIPCollectionEndpointGatewayContextNext' = None,
+ ) -> None:
"""
Initialize a ReservedIPCollectionEndpointGatewayContext object.
@@ -56235,15 +60409,18 @@ def __ne__(self, other: 'ReservedIPCollectionEndpointGatewayContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionEndpointGatewayContextFirst():
+
+class ReservedIPCollectionEndpointGatewayContextFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPCollectionEndpointGatewayContextFirst object.
@@ -56291,7 +60468,8 @@ def __ne__(self, other: 'ReservedIPCollectionEndpointGatewayContextFirst') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionEndpointGatewayContextNext():
+
+class ReservedIPCollectionEndpointGatewayContextNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -56299,8 +60477,10 @@ class ReservedIPCollectionEndpointGatewayContextNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPCollectionEndpointGatewayContextNext object.
@@ -56348,15 +60528,18 @@ def __ne__(self, other: 'ReservedIPCollectionEndpointGatewayContextNext') -> boo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionFirst():
+
+class ReservedIPCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPCollectionFirst object.
@@ -56404,7 +60587,8 @@ def __ne__(self, other: 'ReservedIPCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionNetworkInterfaceContext():
+
+class ReservedIPCollectionNetworkInterfaceContext:
"""
ReservedIPCollectionNetworkInterfaceContext.
@@ -56420,13 +60604,15 @@ class ReservedIPCollectionNetworkInterfaceContext():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'ReservedIPCollectionNetworkInterfaceContextFirst',
- ips: List['ReservedIP'],
- limit: int,
- total_count: int,
- *,
- next: 'ReservedIPCollectionNetworkInterfaceContextNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'ReservedIPCollectionNetworkInterfaceContextFirst',
+ ips: List['ReservedIP'],
+ limit: int,
+ total_count: int,
+ *,
+ next: 'ReservedIPCollectionNetworkInterfaceContextNext' = None,
+ ) -> None:
"""
Initialize a ReservedIPCollectionNetworkInterfaceContext object.
@@ -56521,15 +60707,18 @@ def __ne__(self, other: 'ReservedIPCollectionNetworkInterfaceContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionNetworkInterfaceContextFirst():
+
+class ReservedIPCollectionNetworkInterfaceContextFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPCollectionNetworkInterfaceContextFirst object.
@@ -56577,7 +60766,8 @@ def __ne__(self, other: 'ReservedIPCollectionNetworkInterfaceContextFirst') -> b
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionNetworkInterfaceContextNext():
+
+class ReservedIPCollectionNetworkInterfaceContextNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -56585,8 +60775,10 @@ class ReservedIPCollectionNetworkInterfaceContextNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPCollectionNetworkInterfaceContextNext object.
@@ -56634,7 +60826,8 @@ def __ne__(self, other: 'ReservedIPCollectionNetworkInterfaceContextNext') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPCollectionNext():
+
+class ReservedIPCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -56642,8 +60835,10 @@ class ReservedIPCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPCollectionNext object.
@@ -56691,7 +60886,8 @@ def __ne__(self, other: 'ReservedIPCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPPatch():
+
+class ReservedIPPatch:
"""
ReservedIPPatch.
@@ -56704,10 +60900,12 @@ class ReservedIPPatch():
reserved for provider-owned resources, and are not allowed.
"""
- def __init__(self,
- *,
- auto_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ auto_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a ReservedIPPatch object.
@@ -56764,7 +60962,8 @@ def __ne__(self, other: 'ReservedIPPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPReference():
+
+class ReservedIPReference:
"""
ReservedIPReference.
@@ -56784,14 +60983,16 @@ class ReservedIPReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- address: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'ReservedIPReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ address: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'ReservedIPReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPReference object.
@@ -56893,10 +61094,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SUBNET_RESERVED_IP = 'subnet_reserved_ip'
-class ReservedIPReferenceDeleted():
+
+class ReservedIPReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -56904,8 +61107,10 @@ class ReservedIPReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a ReservedIPReferenceDeleted object.
@@ -56953,23 +61158,28 @@ def __ne__(self, other: 'ReservedIPReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ReservedIPTarget():
+
+class ReservedIPTarget:
"""
The target this reserved IP is bound to.
If absent, this reserved IP is provider-owned or unbound.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a ReservedIPTarget object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ReservedIPTargetEndpointGatewayReference', 'ReservedIPTargetNetworkInterfaceReferenceTargetContext', 'ReservedIPTargetLoadBalancerReference', 'ReservedIPTargetVPNGatewayReference', 'ReservedIPTargetVPNServerReference', 'ReservedIPTargetGenericResourceReference']))
+ ", ".join(['ReservedIPTargetEndpointGatewayReference', 'ReservedIPTargetNetworkInterfaceReferenceTargetContext', 'ReservedIPTargetLoadBalancerReference', 'ReservedIPTargetVPNGatewayReference', 'ReservedIPTargetVPNServerReference', 'ReservedIPTargetGenericResourceReference'])
+ )
raise Exception(msg)
-class ReservedIPTargetPrototype():
+
+class ReservedIPTargetPrototype:
"""
The target to bind this reserved IP to. The target must be in the same VPC.
At present, only endpoint gateway targets are supported. The endpoint gateway must
@@ -56978,25 +61188,31 @@ class ReservedIPTargetPrototype():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a ReservedIPTargetPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentity']))
+ ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentity'])
+ )
raise Exception(msg)
-class ResourceFilter():
+
+class ResourceFilter:
"""
Identifies one or more resources according to the specified filter property.
:attr str resource_type: (optional) The resource type.
"""
- def __init__(self,
- *,
- resource_type: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ resource_type: str = None,
+ ) -> None:
"""
Initialize a ResourceFilter object.
@@ -57042,23 +61258,28 @@ def __ne__(self, other: 'ResourceFilter') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ResourceGroupIdentity():
+
+class ResourceGroupIdentity:
"""
The resource group to use. If unspecified, the account's [default resource
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a ResourceGroupIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ResourceGroupIdentityById']))
+ ", ".join(['ResourceGroupIdentityById'])
+ )
raise Exception(msg)
-class ResourceGroupReference():
+
+class ResourceGroupReference:
"""
ResourceGroupReference.
@@ -57067,10 +61288,12 @@ class ResourceGroupReference():
:attr str name: The name for this resource group.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ ) -> None:
"""
Initialize a ResourceGroupReference object.
@@ -57134,7 +61357,8 @@ def __ne__(self, other: 'ResourceGroupReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class Route():
+
+class Route:
"""
Route.
@@ -57177,20 +61401,22 @@ class Route():
subject to this route.).
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- next_hop: 'RouteNextHop',
- priority: int,
- zone: 'ZoneReference',
- *,
- creator: 'RouteCreator' = None,
- origin: str = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ next_hop: 'RouteNextHop',
+ priority: int,
+ zone: 'ZoneReference',
+ *,
+ creator: 'RouteCreator' = None,
+ origin: str = None,
+ ) -> None:
"""
Initialize a Route object.
@@ -57353,6 +61579,7 @@ class ActionEnum(str, Enum):
- `deliver`: deliver the packet to the specified `next_hop`
- `drop`: drop the packet.
"""
+
DELEGATE = 'delegate'
DELEGATE_VPC = 'delegate_vpc'
DELIVER = 'deliver'
@@ -57363,6 +61590,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the route.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -57382,11 +61610,13 @@ class OriginEnum(str, Enum):
processing and surface the error, or bypass the route on which the unexpected
property value was encountered.
"""
+
SERVICE = 'service'
USER = 'user'
-class RouteCollection():
+
+class RouteCollection:
"""
RouteCollection.
@@ -57400,13 +61630,15 @@ class RouteCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'RouteCollectionFirst',
- limit: int,
- routes: List['Route'],
- total_count: int,
- *,
- next: 'RouteCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'RouteCollectionFirst',
+ limit: int,
+ routes: List['Route'],
+ total_count: int,
+ *,
+ next: 'RouteCollectionNext' = None,
+ ) -> None:
"""
Initialize a RouteCollection object.
@@ -57499,15 +61731,18 @@ def __ne__(self, other: 'RouteCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RouteCollectionFirst():
+
+class RouteCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RouteCollectionFirst object.
@@ -57555,7 +61790,8 @@ def __ne__(self, other: 'RouteCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RouteCollectionNext():
+
+class RouteCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -57563,8 +61799,10 @@ class RouteCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RouteCollectionNext object.
@@ -57612,7 +61850,8 @@ def __ne__(self, other: 'RouteCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RouteCreator():
+
+class RouteCreator:
"""
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
@@ -57620,62 +61859,74 @@ class RouteCreator():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RouteCreator object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RouteCreatorVPNGatewayReference', 'RouteCreatorVPNServerReference']))
+ ", ".join(['RouteCreatorVPNGatewayReference', 'RouteCreatorVPNServerReference'])
+ )
raise Exception(msg)
-class RouteNextHop():
+
+class RouteNextHop:
"""
RouteNextHop.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RouteNextHop object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RouteNextHopIP', 'RouteNextHopVPNGatewayConnectionReference']))
+ ", ".join(['RouteNextHopIP', 'RouteNextHopVPNGatewayConnectionReference'])
+ )
raise Exception(msg)
-class RouteNextHopPatch():
+
+class RouteNextHopPatch:
"""
- The next hop that packets will be delivered to, if `action` is `deliver`. For other
+ If `action` is `deliver`, the next hop that packets will be delivered to. For other
`action` values, specify `0.0.0.0` or remove it by specifying `null`.
At most two routes per `zone` in a table can have the same `destination` and
- `priority`, and only if both routes have an `action` of `deliver` and the `next_hop`
- is an IP address.
+ `priority`, and only when each route has an `action` of `deliver` and `next_hop` is an
+ IP address.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RouteNextHopPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RouteNextHopPatchRouteNextHopIP', 'RouteNextHopPatchVPNGatewayConnectionIdentity']))
+ ", ".join(['RouteNextHopPatchRouteNextHopIP', 'RouteNextHopPatchVPNGatewayConnectionIdentity'])
+ )
raise Exception(msg)
-class RoutePatch():
+
+class RoutePatch:
"""
RoutePatch.
:attr str name: (optional) The name for this route. The name must not be used by
another route in the routing table. Names starting with `ibm-` are reserved for
system-provided routes, and are not allowed.
- :attr RouteNextHopPatch next_hop: (optional) The next hop that packets will be
- delivered to, if `action` is `deliver`. For other `action`
- values, specify `0.0.0.0` or remove it by specifying `null`.
+ :attr RouteNextHopPatch next_hop: (optional) If `action` is `deliver`, the next
+ hop that packets will be delivered to. For other
+ `action` values, specify `0.0.0.0` or remove it by specifying `null`.
At most two routes per `zone` in a table can have the same `destination` and
- `priority`, and
- only if both routes have an `action` of `deliver` and the `next_hop` is an IP
+ `priority`,
+ and only when each route has an `action` of `deliver` and `next_hop` is an IP
address.
:attr int priority: (optional) The priority of this route. Smaller values have
higher priority.
@@ -57683,28 +61934,27 @@ class RoutePatch():
`destination`, the route with the highest priority (smallest value) is selected.
If two routes have the same `destination` and `priority`, traffic is distributed
between them.
- At most two routes per `zone` in a table can have the same `destination` and
- `priority`, and only if both routes have an `action` of `deliver` and the
- `next_hop` is an IP address.
"""
- def __init__(self,
- *,
- name: str = None,
- next_hop: 'RouteNextHopPatch' = None,
- priority: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ next_hop: 'RouteNextHopPatch' = None,
+ priority: int = None,
+ ) -> None:
"""
Initialize a RoutePatch object.
:param str name: (optional) The name for this route. The name must not be
used by another route in the routing table. Names starting with `ibm-` are
reserved for system-provided routes, and are not allowed.
- :param RouteNextHopPatch next_hop: (optional) The next hop that packets
- will be delivered to, if `action` is `deliver`. For other `action`
- values, specify `0.0.0.0` or remove it by specifying `null`.
+ :param RouteNextHopPatch next_hop: (optional) If `action` is `deliver`, the
+ next hop that packets will be delivered to. For other
+ `action` values, specify `0.0.0.0` or remove it by specifying `null`.
At most two routes per `zone` in a table can have the same `destination`
- and `priority`, and
- only if both routes have an `action` of `deliver` and the `next_hop` is an
+ and `priority`,
+ and only when each route has an `action` of `deliver` and `next_hop` is an
IP address.
:param int priority: (optional) The priority of this route. Smaller values
have higher priority.
@@ -57712,10 +61962,6 @@ def __init__(self,
`destination`, the route with the highest priority (smallest value) is
selected. If two routes have the same `destination` and `priority`, traffic
is distributed between them.
- At most two routes per `zone` in a table can have the same `destination`
- and
- `priority`, and only if both routes have an `action` of `deliver` and the
- `next_hop` is an IP address.
"""
self.name = name
self.next_hop = next_hop
@@ -57770,7 +62016,8 @@ def __ne__(self, other: 'RoutePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RoutePrototype():
+
+class RoutePrototype:
"""
RoutePrototype.
@@ -57789,30 +62036,33 @@ class RoutePrototype():
system-provided routes, and are not allowed. If unspecified, the name will be a
hyphenated list of randomly-selected words.
:attr RoutePrototypeNextHop next_hop: (optional) If `action` is `deliver`, the
- next hop that packets will be delivered to. For other `action`
- values, it must be omitted or specified as `0.0.0.0`.
+ next hop that packets will be delivered to. For other
+ `action` values, it must be omitted or specified as `0.0.0.0`.
+ At most two routes per `zone` in a table can have the same `destination` and
+ `priority`,
+ and only when each route has an `action` of `deliver` and `next_hop` is an IP
+ address.
:attr int priority: (optional) The priority of this route. Smaller values have
higher priority.
If a routing table contains multiple routes with the same `zone` and
`destination`, the route with the highest priority (smallest value) is selected.
If two routes have the same `destination` and `priority`, traffic is distributed
between them.
- At most two routes per `zone` in a table can have the same `destination` and
- `priority`, and only if both routes have an `action` of `deliver` and the
- `next_hop` is an IP address.
:attr ZoneIdentity zone: The zone to apply the route to. (Traffic from subnets
in this zone will be
subject to this route.).
"""
- def __init__(self,
- destination: str,
- zone: 'ZoneIdentity',
- *,
- action: str = None,
- name: str = None,
- next_hop: 'RoutePrototypeNextHop' = None,
- priority: int = None) -> None:
+ def __init__(
+ self,
+ destination: str,
+ zone: 'ZoneIdentity',
+ *,
+ action: str = None,
+ name: str = None,
+ next_hop: 'RoutePrototypeNextHop' = None,
+ priority: int = None,
+ ) -> None:
"""
Initialize a RoutePrototype object.
@@ -57835,18 +62085,18 @@ def __init__(self,
reserved for system-provided routes, and are not allowed. If unspecified,
the name will be a hyphenated list of randomly-selected words.
:param RoutePrototypeNextHop next_hop: (optional) If `action` is `deliver`,
- the next hop that packets will be delivered to. For other `action`
- values, it must be omitted or specified as `0.0.0.0`.
+ the next hop that packets will be delivered to. For other
+ `action` values, it must be omitted or specified as `0.0.0.0`.
+ At most two routes per `zone` in a table can have the same `destination`
+ and `priority`,
+ and only when each route has an `action` of `deliver` and `next_hop` is an
+ IP address.
:param int priority: (optional) The priority of this route. Smaller values
have higher priority.
If a routing table contains multiple routes with the same `zone` and
`destination`, the route with the highest priority (smallest value) is
selected. If two routes have the same `destination` and `priority`, traffic
is distributed between them.
- At most two routes per `zone` in a table can have the same `destination`
- and
- `priority`, and only if both routes have an `action` of `deliver` and the
- `next_hop` is an IP address.
"""
self.action = action
self.destination = destination
@@ -57932,29 +62182,38 @@ class ActionEnum(str, Enum):
- `deliver`: deliver the packet to the specified `next_hop`
- `drop`: drop the packet.
"""
+
DELEGATE = 'delegate'
DELEGATE_VPC = 'delegate_vpc'
DELIVER = 'deliver'
DROP = 'drop'
-class RoutePrototypeNextHop():
+
+class RoutePrototypeNextHop:
"""
If `action` is `deliver`, the next hop that packets will be delivered to. For other
`action` values, it must be omitted or specified as `0.0.0.0`.
+ At most two routes per `zone` in a table can have the same `destination` and
+ `priority`, and only when each route has an `action` of `deliver` and `next_hop` is an
+ IP address.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RoutePrototypeNextHop object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP', 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity']))
+ ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP', 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity'])
+ )
raise Exception(msg)
-class RouteReference():
+
+class RouteReference:
"""
RouteReference.
@@ -57967,12 +62226,14 @@ class RouteReference():
the routing table.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'RouteReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'RouteReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a RouteReference object.
@@ -58048,7 +62309,8 @@ def __ne__(self, other: 'RouteReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RouteReferenceDeleted():
+
+class RouteReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -58056,8 +62318,10 @@ class RouteReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a RouteReferenceDeleted object.
@@ -58105,7 +62369,8 @@ def __ne__(self, other: 'RouteReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RoutingTable():
+
+class RoutingTable:
"""
RoutingTable.
@@ -58167,21 +62432,23 @@ class RoutingTable():
attached.
"""
- def __init__(self,
- accept_routes_from: List['ResourceFilter'],
- created_at: datetime,
- href: str,
- id: str,
- is_default: bool,
- lifecycle_state: str,
- name: str,
- resource_type: str,
- route_direct_link_ingress: bool,
- route_internet_ingress: bool,
- route_transit_gateway_ingress: bool,
- route_vpc_zone_ingress: bool,
- routes: List['RouteReference'],
- subnets: List['SubnetReference']) -> None:
+ def __init__(
+ self,
+ accept_routes_from: List['ResourceFilter'],
+ created_at: datetime,
+ href: str,
+ id: str,
+ is_default: bool,
+ lifecycle_state: str,
+ name: str,
+ resource_type: str,
+ route_direct_link_ingress: bool,
+ route_internet_ingress: bool,
+ route_transit_gateway_ingress: bool,
+ route_vpc_zone_ingress: bool,
+ routes: List['RouteReference'],
+ subnets: List['SubnetReference'],
+ ) -> None:
"""
Initialize a RoutingTable object.
@@ -58400,6 +62667,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the routing table.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -58413,10 +62681,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
ROUTING_TABLE = 'routing_table'
-class RoutingTableCollection():
+
+class RoutingTableCollection:
"""
RoutingTableCollection.
@@ -58430,13 +62700,15 @@ class RoutingTableCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'RoutingTableCollectionFirst',
- limit: int,
- routing_tables: List['RoutingTable'],
- total_count: int,
- *,
- next: 'RoutingTableCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'RoutingTableCollectionFirst',
+ limit: int,
+ routing_tables: List['RoutingTable'],
+ total_count: int,
+ *,
+ next: 'RoutingTableCollectionNext' = None,
+ ) -> None:
"""
Initialize a RoutingTableCollection object.
@@ -58530,15 +62802,18 @@ def __ne__(self, other: 'RoutingTableCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RoutingTableCollectionFirst():
+
+class RoutingTableCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RoutingTableCollectionFirst object.
@@ -58586,7 +62861,8 @@ def __ne__(self, other: 'RoutingTableCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RoutingTableCollectionNext():
+
+class RoutingTableCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -58594,8 +62870,10 @@ class RoutingTableCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RoutingTableCollectionNext object.
@@ -58643,22 +62921,27 @@ def __ne__(self, other: 'RoutingTableCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RoutingTableIdentity():
+
+class RoutingTableIdentity:
"""
Identifies a routing table by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RoutingTableIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RoutingTableIdentityById', 'RoutingTableIdentityByHref']))
+ ", ".join(['RoutingTableIdentityById', 'RoutingTableIdentityByHref'])
+ )
raise Exception(msg)
-class RoutingTablePatch():
+
+class RoutingTablePatch:
"""
RoutingTablePatch.
@@ -58734,14 +63017,16 @@ class RoutingTablePatch():
packet will be dropped.
"""
- def __init__(self,
- *,
- accept_routes_from: List['ResourceFilter'] = None,
- name: str = None,
- route_direct_link_ingress: bool = None,
- route_internet_ingress: bool = None,
- route_transit_gateway_ingress: bool = None,
- route_vpc_zone_ingress: bool = None) -> None:
+ def __init__(
+ self,
+ *,
+ accept_routes_from: List['ResourceFilter'] = None,
+ name: str = None,
+ route_direct_link_ingress: bool = None,
+ route_internet_ingress: bool = None,
+ route_transit_gateway_ingress: bool = None,
+ route_vpc_zone_ingress: bool = None,
+ ) -> None:
"""
Initialize a RoutingTablePatch object.
@@ -58887,7 +63172,8 @@ def __ne__(self, other: 'RoutingTablePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class RoutingTableReference():
+
+class RoutingTableReference:
"""
RoutingTableReference.
@@ -58901,13 +63187,15 @@ class RoutingTableReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'RoutingTableReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'RoutingTableReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a RoutingTableReference object.
@@ -58995,10 +63283,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
ROUTING_TABLE = 'routing_table'
-class RoutingTableReferenceDeleted():
+
+class RoutingTableReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -59006,8 +63296,10 @@ class RoutingTableReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a RoutingTableReferenceDeleted object.
@@ -59055,7 +63347,8 @@ def __ne__(self, other: 'RoutingTableReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroup():
+
+class SecurityGroup:
"""
SecurityGroup.
@@ -59075,16 +63368,18 @@ class SecurityGroup():
:attr VPCReference vpc: The VPC this security group resides in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- rules: List['SecurityGroupRule'],
- targets: List['SecurityGroupTargetReference'],
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ rules: List['SecurityGroupRule'],
+ targets: List['SecurityGroupTargetReference'],
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a SecurityGroup object.
@@ -59219,7 +63514,8 @@ def __ne__(self, other: 'SecurityGroup') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupCollection():
+
+class SecurityGroupCollection:
"""
SecurityGroupCollection.
@@ -59233,13 +63529,15 @@ class SecurityGroupCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'SecurityGroupCollectionFirst',
- limit: int,
- security_groups: List['SecurityGroup'],
- total_count: int,
- *,
- next: 'SecurityGroupCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'SecurityGroupCollectionFirst',
+ limit: int,
+ security_groups: List['SecurityGroup'],
+ total_count: int,
+ *,
+ next: 'SecurityGroupCollectionNext' = None,
+ ) -> None:
"""
Initialize a SecurityGroupCollection object.
@@ -59333,15 +63631,18 @@ def __ne__(self, other: 'SecurityGroupCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupCollectionFirst():
+
+class SecurityGroupCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupCollectionFirst object.
@@ -59389,7 +63690,8 @@ def __ne__(self, other: 'SecurityGroupCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupCollectionNext():
+
+class SecurityGroupCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -59397,8 +63699,10 @@ class SecurityGroupCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupCollectionNext object.
@@ -59446,22 +63750,27 @@ def __ne__(self, other: 'SecurityGroupCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupIdentity():
+
+class SecurityGroupIdentity:
"""
Identifies a security group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupIdentityById', 'SecurityGroupIdentityByCRN', 'SecurityGroupIdentityByHref']))
+ ", ".join(['SecurityGroupIdentityById', 'SecurityGroupIdentityByCRN', 'SecurityGroupIdentityByHref'])
+ )
raise Exception(msg)
-class SecurityGroupPatch():
+
+class SecurityGroupPatch:
"""
SecurityGroupPatch.
@@ -59469,9 +63778,11 @@ class SecurityGroupPatch():
be used by another security group for the VPC.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a SecurityGroupPatch object.
@@ -59518,7 +63829,8 @@ def __ne__(self, other: 'SecurityGroupPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupReference():
+
+class SecurityGroupReference:
"""
SecurityGroupReference.
@@ -59532,13 +63844,15 @@ class SecurityGroupReference():
security groups for the VPC.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'SecurityGroupReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'SecurityGroupReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SecurityGroupReference object.
@@ -59622,7 +63936,8 @@ def __ne__(self, other: 'SecurityGroupReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupReferenceDeleted():
+
+class SecurityGroupReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -59630,8 +63945,10 @@ class SecurityGroupReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a SecurityGroupReferenceDeleted object.
@@ -59679,7 +63996,8 @@ def __ne__(self, other: 'SecurityGroupReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupRule():
+
+class SecurityGroupRule:
"""
SecurityGroupRule.
@@ -59701,13 +64019,15 @@ class SecurityGroupRule():
outbound rules).
"""
- def __init__(self,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- protocol: str,
- remote: 'SecurityGroupRuleRemote') -> None:
+ def __init__(
+ self,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ protocol: str,
+ remote: 'SecurityGroupRuleRemote',
+ ) -> None:
"""
Initialize a SecurityGroupRule object.
@@ -59729,7 +64049,8 @@ def __init__(self,
outbound rules).
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRuleSecurityGroupRuleProtocolAll', 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP']))
+ ", ".join(['SecurityGroupRuleSecurityGroupRuleProtocolAll', 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP'])
+ )
raise Exception(msg)
@classmethod
@@ -59738,9 +64059,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRule':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'SecurityGroupRule'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['SecurityGroupRuleSecurityGroupRuleProtocolAll', 'SecurityGroupRuleSecurityGroupRuleProtocolICMP', 'SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -59771,6 +64092,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -59782,6 +64104,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -59789,21 +64112,25 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class SecurityGroupRuleCollection():
+
+class SecurityGroupRuleCollection:
"""
Collection of rules in a security group.
:attr List[SecurityGroupRule] rules: Array of rules.
"""
- def __init__(self,
- rules: List['SecurityGroupRule']) -> None:
+ def __init__(
+ self,
+ rules: List['SecurityGroupRule'],
+ ) -> None:
"""
Initialize a SecurityGroupRuleCollection object.
@@ -59857,7 +64184,8 @@ def __ne__(self, other: 'SecurityGroupRuleCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupRulePatch():
+
+class SecurityGroupRulePatch:
"""
SecurityGroupRulePatch.
@@ -59887,15 +64215,17 @@ class SecurityGroupRulePatch():
Specify `null` to remove an existing ICMP traffic type value.
"""
- def __init__(self,
- *,
- code: int = None,
- direction: str = None,
- ip_version: str = None,
- port_max: int = None,
- port_min: int = None,
- remote: 'SecurityGroupRuleRemotePatch' = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ code: int = None,
+ direction: str = None,
+ ip_version: str = None,
+ port_max: int = None,
+ port_min: int = None,
+ remote: 'SecurityGroupRuleRemotePatch' = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a SecurityGroupRulePatch object.
@@ -60001,6 +64331,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -60012,10 +64343,12 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
-class SecurityGroupRulePrototype():
+
+class SecurityGroupRulePrototype:
"""
SecurityGroupRulePrototype.
@@ -60036,12 +64369,14 @@ class SecurityGroupRulePrototype():
(or to any destination, for outbound rules).
"""
- def __init__(self,
- direction: str,
- protocol: str,
- *,
- ip_version: str = None,
- remote: 'SecurityGroupRuleRemotePrototype' = None) -> None:
+ def __init__(
+ self,
+ direction: str,
+ protocol: str,
+ *,
+ ip_version: str = None,
+ remote: 'SecurityGroupRuleRemotePrototype' = None,
+ ) -> None:
"""
Initialize a SecurityGroupRulePrototype object.
@@ -60062,7 +64397,8 @@ def __init__(self,
(or to any destination, for outbound rules).
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP']))
+ ", ".join(['SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP'])
+ )
raise Exception(msg)
@classmethod
@@ -60071,9 +64407,9 @@ def from_dict(cls, _dict: Dict) -> 'SecurityGroupRulePrototype':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'SecurityGroupRulePrototype'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP']))
+ msg = "Cannot convert dictionary into an instance of base class 'SecurityGroupRulePrototype'. The discriminator value should map to a valid subclass: {1}".format(
+ ", ".join(['SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP', 'SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP'])
+ )
raise Exception(msg)
@classmethod
@@ -60104,6 +64440,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -60115,6 +64452,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -60122,13 +64460,15 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
-class SecurityGroupRuleRemote():
+
+class SecurityGroupRuleRemote:
"""
The IP addresses or security groups from which this rule allows traffic (or to which,
for outbound rules). Can be specified as an IP address, a CIDR block, or a security
@@ -60137,16 +64477,20 @@ class SecurityGroupRuleRemote():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemote object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRuleRemoteIP', 'SecurityGroupRuleRemoteCIDR', 'SecurityGroupRuleRemoteSecurityGroupReference']))
+ ", ".join(['SecurityGroupRuleRemoteIP', 'SecurityGroupRuleRemoteCIDR', 'SecurityGroupRuleRemoteSecurityGroupReference'])
+ )
raise Exception(msg)
-class SecurityGroupRuleRemotePatch():
+
+class SecurityGroupRuleRemotePatch:
"""
The IP addresses or security groups from which this rule will allow traffic (or to
which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
@@ -60155,16 +64499,20 @@ class SecurityGroupRuleRemotePatch():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRuleRemotePatchIP', 'SecurityGroupRuleRemotePatchCIDR', 'SecurityGroupRuleRemotePatchSecurityGroupIdentity']))
+ ", ".join(['SecurityGroupRuleRemotePatchIP', 'SecurityGroupRuleRemotePatchCIDR', 'SecurityGroupRuleRemotePatchSecurityGroupIdentity'])
+ )
raise Exception(msg)
-class SecurityGroupRuleRemotePrototype():
+
+class SecurityGroupRuleRemotePrototype:
"""
The IP addresses or security groups from which this rule will allow traffic (or to
which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
@@ -60175,16 +64523,20 @@ class SecurityGroupRuleRemotePrototype():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRuleRemotePrototypeIP', 'SecurityGroupRuleRemotePrototypeCIDR', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentity']))
+ ", ".join(['SecurityGroupRuleRemotePrototypeIP', 'SecurityGroupRuleRemotePrototypeCIDR', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentity'])
+ )
raise Exception(msg)
-class SecurityGroupTargetCollection():
+
+class SecurityGroupTargetCollection:
"""
SecurityGroupTargetCollection.
@@ -60200,13 +64552,15 @@ class SecurityGroupTargetCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'SecurityGroupTargetCollectionFirst',
- limit: int,
- targets: List['SecurityGroupTargetReference'],
- total_count: int,
- *,
- next: 'SecurityGroupTargetCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'SecurityGroupTargetCollectionFirst',
+ limit: int,
+ targets: List['SecurityGroupTargetReference'],
+ total_count: int,
+ *,
+ next: 'SecurityGroupTargetCollectionNext' = None,
+ ) -> None:
"""
Initialize a SecurityGroupTargetCollection object.
@@ -60301,15 +64655,18 @@ def __ne__(self, other: 'SecurityGroupTargetCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupTargetCollectionFirst():
+
+class SecurityGroupTargetCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupTargetCollectionFirst object.
@@ -60357,7 +64714,8 @@ def __ne__(self, other: 'SecurityGroupTargetCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupTargetCollectionNext():
+
+class SecurityGroupTargetCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -60365,8 +64723,10 @@ class SecurityGroupTargetCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupTargetCollectionNext object.
@@ -60414,7 +64774,8 @@ def __ne__(self, other: 'SecurityGroupTargetCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SecurityGroupTargetReference():
+
+class SecurityGroupTargetReference:
"""
The resource types that can be security group targets are expected to expand in the
future. When iterating over security group targets, do not assume that every target
@@ -60423,16 +64784,20 @@ class SecurityGroupTargetReference():
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupTargetReference object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext', 'SecurityGroupTargetReferenceLoadBalancerReference', 'SecurityGroupTargetReferenceEndpointGatewayReference', 'SecurityGroupTargetReferenceVPNServerReference']))
+ ", ".join(['SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext', 'SecurityGroupTargetReferenceLoadBalancerReference', 'SecurityGroupTargetReferenceEndpointGatewayReference', 'SecurityGroupTargetReferenceVPNServerReference'])
+ )
raise Exception(msg)
-class Snapshot():
+
+class Snapshot:
"""
Snapshot.
@@ -60482,30 +64847,32 @@ class Snapshot():
snapshot.
"""
- def __init__(self,
- bootable: bool,
- clones: List['SnapshotClone'],
- created_at: datetime,
- crn: str,
- deletable: bool,
- encryption: str,
- href: str,
- id: str,
- lifecycle_state: str,
- minimum_capacity: int,
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- service_tags: List[str],
- size: int,
- source_volume: 'VolumeReference',
- user_tags: List[str],
- *,
- backup_policy_plan: 'BackupPolicyPlanReference' = None,
- captured_at: datetime = None,
- encryption_key: 'EncryptionKeyReference' = None,
- operating_system: 'OperatingSystem' = None,
- source_image: 'ImageReference' = None) -> None:
+ def __init__(
+ self,
+ bootable: bool,
+ clones: List['SnapshotClone'],
+ created_at: datetime,
+ crn: str,
+ deletable: bool,
+ encryption: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ minimum_capacity: int,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ service_tags: List[str],
+ size: int,
+ source_volume: 'VolumeReference',
+ user_tags: List[str],
+ *,
+ backup_policy_plan: 'BackupPolicyPlanReference' = None,
+ captured_at: datetime = None,
+ encryption_key: 'EncryptionKeyReference' = None,
+ operating_system: 'OperatingSystem' = None,
+ source_image: 'ImageReference' = None,
+ ) -> None:
"""
Initialize a Snapshot object.
@@ -60762,6 +65129,7 @@ class EncryptionEnum(str, Enum):
"""
The type of encryption used on the source volume.
"""
+
PROVIDER_MANAGED = 'provider_managed'
USER_MANAGED = 'user_managed'
@@ -60770,6 +65138,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of this snapshot.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -60783,10 +65152,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SNAPSHOT = 'snapshot'
-class SnapshotClone():
+
+class SnapshotClone:
"""
SnapshotClone.
@@ -60797,10 +65168,12 @@ class SnapshotClone():
:attr ZoneReference zone: The zone this snapshot clone resides in.
"""
- def __init__(self,
- available: bool,
- created_at: datetime,
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ available: bool,
+ created_at: datetime,
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a SnapshotClone object.
@@ -60869,15 +65242,18 @@ def __ne__(self, other: 'SnapshotClone') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotCloneCollection():
+
+class SnapshotCloneCollection:
"""
SnapshotCloneCollection.
:attr List[SnapshotClone] clones: Collection of snapshot clones.
"""
- def __init__(self,
- clones: List['SnapshotClone']) -> None:
+ def __init__(
+ self,
+ clones: List['SnapshotClone'],
+ ) -> None:
"""
Initialize a SnapshotCloneCollection object.
@@ -60931,7 +65307,8 @@ def __ne__(self, other: 'SnapshotCloneCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotClonePrototype():
+
+class SnapshotClonePrototype:
"""
SnapshotClonePrototype.
@@ -60940,8 +65317,10 @@ class SnapshotClonePrototype():
snapshot.
"""
- def __init__(self,
- zone: 'ZoneIdentity') -> None:
+ def __init__(
+ self,
+ zone: 'ZoneIdentity',
+ ) -> None:
"""
Initialize a SnapshotClonePrototype object.
@@ -60994,7 +65373,8 @@ def __ne__(self, other: 'SnapshotClonePrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotCollection():
+
+class SnapshotCollection:
"""
SnapshotCollection.
@@ -61008,13 +65388,15 @@ class SnapshotCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'SnapshotCollectionFirst',
- limit: int,
- snapshots: List['Snapshot'],
- total_count: int,
- *,
- next: 'SnapshotCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'SnapshotCollectionFirst',
+ limit: int,
+ snapshots: List['Snapshot'],
+ total_count: int,
+ *,
+ next: 'SnapshotCollectionNext' = None,
+ ) -> None:
"""
Initialize a SnapshotCollection object.
@@ -61108,15 +65490,18 @@ def __ne__(self, other: 'SnapshotCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotCollectionFirst():
+
+class SnapshotCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SnapshotCollectionFirst object.
@@ -61164,7 +65549,8 @@ def __ne__(self, other: 'SnapshotCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotCollectionNext():
+
+class SnapshotCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -61172,8 +65558,10 @@ class SnapshotCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SnapshotCollectionNext object.
@@ -61221,22 +65609,27 @@ def __ne__(self, other: 'SnapshotCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotIdentity():
+
+class SnapshotIdentity:
"""
Identifies a snapshot by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SnapshotIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SnapshotIdentityById', 'SnapshotIdentityByCRN', 'SnapshotIdentityByHref']))
+ ", ".join(['SnapshotIdentityById', 'SnapshotIdentityByCRN', 'SnapshotIdentityByHref'])
+ )
raise Exception(msg)
-class SnapshotPatch():
+
+class SnapshotPatch:
"""
SnapshotPatch.
@@ -61247,10 +65640,12 @@ class SnapshotPatch():
snapshot.
"""
- def __init__(self,
- *,
- name: str = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a SnapshotPatch object.
@@ -61305,7 +65700,8 @@ def __ne__(self, other: 'SnapshotPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SnapshotPrototype():
+
+class SnapshotPrototype:
"""
SnapshotPrototype.
@@ -61322,12 +65718,14 @@ class SnapshotPrototype():
snapshot.
"""
- def __init__(self,
- *,
- clones: List['SnapshotClonePrototype'] = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ *,
+ clones: List['SnapshotClonePrototype'] = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a SnapshotPrototype object.
@@ -61345,10 +65743,12 @@ def __init__(self,
this snapshot.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SnapshotPrototypeSnapshotBySourceVolume']))
+ ", ".join(['SnapshotPrototypeSnapshotBySourceVolume'])
+ )
raise Exception(msg)
-class SnapshotReference():
+
+class SnapshotReference:
"""
SnapshotReference.
@@ -61363,14 +65763,16 @@ class SnapshotReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'SnapshotReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'SnapshotReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SnapshotReference object.
@@ -61466,10 +65868,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SNAPSHOT = 'snapshot'
-class SnapshotReferenceDeleted():
+
+class SnapshotReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -61477,8 +65881,10 @@ class SnapshotReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a SnapshotReferenceDeleted object.
@@ -61526,7 +65932,8 @@ def __ne__(self, other: 'SnapshotReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class Subnet():
+
+class Subnet:
"""
Subnet.
@@ -61558,25 +65965,27 @@ class Subnet():
:attr ZoneReference zone: The zone this subnet resides in.
"""
- def __init__(self,
- available_ipv4_address_count: int,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- ip_version: str,
- ipv4_cidr_block: str,
- name: str,
- network_acl: 'NetworkACLReference',
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- routing_table: 'RoutingTableReference',
- status: str,
- total_ipv4_address_count: int,
- vpc: 'VPCReference',
- zone: 'ZoneReference',
- *,
- public_gateway: 'PublicGatewayReference' = None) -> None:
+ def __init__(
+ self,
+ available_ipv4_address_count: int,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ ipv4_cidr_block: str,
+ name: str,
+ network_acl: 'NetworkACLReference',
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ routing_table: 'RoutingTableReference',
+ status: str,
+ total_ipv4_address_count: int,
+ vpc: 'VPCReference',
+ zone: 'ZoneReference',
+ *,
+ public_gateway: 'PublicGatewayReference' = None,
+ ) -> None:
"""
Initialize a Subnet object.
@@ -61783,6 +66192,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version(s) supported by this subnet.
"""
+
IPV4 = 'ipv4'
@@ -61790,6 +66200,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SUBNET = 'subnet'
@@ -61797,13 +66208,15 @@ class StatusEnum(str, Enum):
"""
The status of the subnet.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
-class SubnetCollection():
+
+class SubnetCollection:
"""
SubnetCollection.
@@ -61817,13 +66230,15 @@ class SubnetCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'SubnetCollectionFirst',
- limit: int,
- subnets: List['Subnet'],
- total_count: int,
- *,
- next: 'SubnetCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'SubnetCollectionFirst',
+ limit: int,
+ subnets: List['Subnet'],
+ total_count: int,
+ *,
+ next: 'SubnetCollectionNext' = None,
+ ) -> None:
"""
Initialize a SubnetCollection object.
@@ -61916,15 +66331,18 @@ def __ne__(self, other: 'SubnetCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SubnetCollectionFirst():
+
+class SubnetCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SubnetCollectionFirst object.
@@ -61972,7 +66390,8 @@ def __ne__(self, other: 'SubnetCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SubnetCollectionNext():
+
+class SubnetCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -61980,8 +66399,10 @@ class SubnetCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SubnetCollectionNext object.
@@ -62029,22 +66450,27 @@ def __ne__(self, other: 'SubnetCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SubnetIdentity():
+
+class SubnetIdentity:
"""
Identifies a subnet by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SubnetIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SubnetIdentityById', 'SubnetIdentityByCRN', 'SubnetIdentityByHref']))
+ ", ".join(['SubnetIdentityById', 'SubnetIdentityByCRN', 'SubnetIdentityByHref'])
+ )
raise Exception(msg)
-class SubnetPatch():
+
+class SubnetPatch:
"""
SubnetPatch.
@@ -62060,12 +66486,14 @@ class SubnetPatch():
`route_transit_gateway_ingress`, and `route_vpc_zone_ingress` must be `false`.
"""
- def __init__(self,
- *,
- name: str = None,
- network_acl: 'NetworkACLIdentity' = None,
- public_gateway: 'SubnetPublicGatewayPatch' = None,
- routing_table: 'RoutingTableIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ network_acl: 'NetworkACLIdentity' = None,
+ public_gateway: 'SubnetPublicGatewayPatch' = None,
+ routing_table: 'RoutingTableIdentity' = None,
+ ) -> None:
"""
Initialize a SubnetPatch object.
@@ -62145,7 +66573,8 @@ def __ne__(self, other: 'SubnetPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class SubnetPrototype():
+
+class SubnetPrototype:
"""
SubnetPrototype.
@@ -62169,15 +66598,17 @@ class SubnetPrototype():
:attr VPCIdentity vpc: The VPC the subnet will reside in.
"""
- def __init__(self,
- vpc: 'VPCIdentity',
- *,
- ip_version: str = None,
- name: str = None,
- network_acl: 'NetworkACLIdentity' = None,
- public_gateway: 'PublicGatewayIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- routing_table: 'RoutingTableIdentity' = None) -> None:
+ def __init__(
+ self,
+ vpc: 'VPCIdentity',
+ *,
+ ip_version: str = None,
+ name: str = None,
+ network_acl: 'NetworkACLIdentity' = None,
+ public_gateway: 'PublicGatewayIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ routing_table: 'RoutingTableIdentity' = None,
+ ) -> None:
"""
Initialize a SubnetPrototype object.
@@ -62204,32 +66635,39 @@ def __init__(self,
`route_vpc_zone_ingress` must be `false`.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SubnetPrototypeSubnetByTotalCount', 'SubnetPrototypeSubnetByCIDR']))
+ ", ".join(['SubnetPrototypeSubnetByTotalCount', 'SubnetPrototypeSubnetByCIDR'])
+ )
raise Exception(msg)
class IpVersionEnum(str, Enum):
"""
The IP version(s) to support for this subnet.
"""
+
IPV4 = 'ipv4'
-class SubnetPublicGatewayPatch():
+
+class SubnetPublicGatewayPatch:
"""
The public gateway to use for internet-bound traffic for this subnet.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SubnetPublicGatewayPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SubnetPublicGatewayPatchPublicGatewayIdentityById', 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN', 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref']))
+ ", ".join(['SubnetPublicGatewayPatchPublicGatewayIdentityById', 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN', 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref'])
+ )
raise Exception(msg)
-class SubnetReference():
+
+class SubnetReference:
"""
SubnetReference.
@@ -62244,14 +66682,16 @@ class SubnetReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'SubnetReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'SubnetReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SubnetReference object.
@@ -62347,10 +66787,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SUBNET = 'subnet'
-class SubnetReferenceDeleted():
+
+class SubnetReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -62358,8 +66800,10 @@ class SubnetReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a SubnetReferenceDeleted object.
@@ -62407,22 +66851,27 @@ def __ne__(self, other: 'SubnetReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class TrustedProfileIdentity():
+
+class TrustedProfileIdentity:
"""
Identifies a trusted profile by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a TrustedProfileIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['TrustedProfileIdentityTrustedProfileById', 'TrustedProfileIdentityTrustedProfileByCRN']))
+ ", ".join(['TrustedProfileIdentityTrustedProfileById', 'TrustedProfileIdentityTrustedProfileByCRN'])
+ )
raise Exception(msg)
-class TrustedProfileReference():
+
+class TrustedProfileReference:
"""
TrustedProfileReference.
@@ -62431,10 +66880,12 @@ class TrustedProfileReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- id: str,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ id: str,
+ resource_type: str,
+ ) -> None:
"""
Initialize a TrustedProfileReference object.
@@ -62502,10 +66953,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
TRUSTED_PROFILE = 'trusted_profile'
-class VCPU():
+
+class VCPU:
"""
The VCPU configuration.
@@ -62514,10 +66967,12 @@ class VCPU():
:attr str manufacturer: The VCPU manufacturer.
"""
- def __init__(self,
- architecture: str,
- count: int,
- manufacturer: str) -> None:
+ def __init__(
+ self,
+ architecture: str,
+ count: int,
+ manufacturer: str,
+ ) -> None:
"""
Initialize a VCPU object.
@@ -62581,7 +67036,8 @@ def __ne__(self, other: 'VCPU') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPC():
+
+class VPC:
"""
VPC.
@@ -62613,21 +67069,23 @@ class VPC():
:attr str status: The status of this VPC.
"""
- def __init__(self,
- classic_access: bool,
- created_at: datetime,
- crn: str,
- default_network_acl: 'NetworkACLReference',
- default_routing_table: 'RoutingTableReference',
- default_security_group: 'SecurityGroupReference',
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- status: str,
- *,
- cse_source_ips: List['VPCCSESourceIP'] = None) -> None:
+ def __init__(
+ self,
+ classic_access: bool,
+ created_at: datetime,
+ crn: str,
+ default_network_acl: 'NetworkACLReference',
+ default_routing_table: 'RoutingTableReference',
+ default_security_group: 'SecurityGroupReference',
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ status: str,
+ *,
+ cse_source_ips: List['VPCCSESourceIP'] = None,
+ ) -> None:
"""
Initialize a VPC object.
@@ -62806,6 +67264,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPC = 'vpc'
@@ -62813,13 +67272,15 @@ class StatusEnum(str, Enum):
"""
The status of this VPC.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
-class VPCCSESourceIP():
+
+class VPCCSESourceIP:
"""
VPCCSESourceIP.
@@ -62828,9 +67289,11 @@ class VPCCSESourceIP():
in.
"""
- def __init__(self,
- ip: 'IP',
- zone: 'ZoneReference') -> None:
+ def __init__(
+ self,
+ ip: 'IP',
+ zone: 'ZoneReference',
+ ) -> None:
"""
Initialize a VPCCSESourceIP object.
@@ -62893,7 +67356,8 @@ def __ne__(self, other: 'VPCCSESourceIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPCCollection():
+
+class VPCCollection:
"""
VPCCollection.
@@ -62907,13 +67371,15 @@ class VPCCollection():
:attr List[VPC] vpcs: Collection of VPCs.
"""
- def __init__(self,
- first: 'VPCCollectionFirst',
- limit: int,
- total_count: int,
- vpcs: List['VPC'],
- *,
- next: 'VPCCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'VPCCollectionFirst',
+ limit: int,
+ total_count: int,
+ vpcs: List['VPC'],
+ *,
+ next: 'VPCCollectionNext' = None,
+ ) -> None:
"""
Initialize a VPCCollection object.
@@ -63006,15 +67472,18 @@ def __ne__(self, other: 'VPCCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPCCollectionFirst():
+
+class VPCCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPCCollectionFirst object.
@@ -63062,7 +67531,8 @@ def __ne__(self, other: 'VPCCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPCCollectionNext():
+
+class VPCCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -63070,8 +67540,10 @@ class VPCCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPCCollectionNext object.
@@ -63119,22 +67591,27 @@ def __ne__(self, other: 'VPCCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPCIdentity():
+
+class VPCIdentity:
"""
Identifies a VPC by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VPCIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPCIdentityById', 'VPCIdentityByCRN', 'VPCIdentityByHref']))
+ ", ".join(['VPCIdentityById', 'VPCIdentityByCRN', 'VPCIdentityByHref'])
+ )
raise Exception(msg)
-class VPCPatch():
+
+class VPCPatch:
"""
VPCPatch.
@@ -63142,9 +67619,11 @@ class VPCPatch():
another VPC in the region.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a VPCPatch object.
@@ -63191,7 +67670,8 @@ def __ne__(self, other: 'VPCPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPCReference():
+
+class VPCReference:
"""
VPCReference.
@@ -63206,14 +67686,16 @@ class VPCReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPCReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPCReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a VPCReference object.
@@ -63309,10 +67791,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPC = 'vpc'
-class VPCReferenceDeleted():
+
+class VPCReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -63320,8 +67804,10 @@ class VPCReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VPCReferenceDeleted object.
@@ -63369,7 +67855,8 @@ def __ne__(self, other: 'VPCReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGateway():
+
+class VPNGateway:
"""
VPNGateway.
@@ -63390,19 +67877,21 @@ class VPNGateway():
:attr VPCReference vpc: The VPC this VPN gateway resides in.
"""
- def __init__(self,
- connections: List['VPNGatewayConnectionReference'],
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- members: List['VPNGatewayMember'],
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- status: str,
- subnet: 'SubnetReference',
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ connections: List['VPNGatewayConnectionReference'],
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ members: List['VPNGatewayMember'],
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ status: str,
+ subnet: 'SubnetReference',
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a VPNGateway object.
@@ -63424,13 +67913,15 @@ def __init__(self,
:param VPCReference vpc: The VPC this VPN gateway resides in.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayRouteMode', 'VPNGatewayPolicyMode']))
+ ", ".join(['VPNGatewayRouteMode', 'VPNGatewayPolicyMode'])
+ )
raise Exception(msg)
class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY = 'vpn_gateway'
@@ -63438,13 +67929,15 @@ class StatusEnum(str, Enum):
"""
The status of the VPN gateway.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
-class VPNGatewayCollection():
+
+class VPNGatewayCollection:
"""
VPNGatewayCollection.
@@ -63458,13 +67951,15 @@ class VPNGatewayCollection():
:attr List[VPNGateway] vpn_gateways: Collection of VPN gateways.
"""
- def __init__(self,
- first: 'VPNGatewayCollectionFirst',
- limit: int,
- total_count: int,
- vpn_gateways: List['VPNGateway'],
- *,
- next: 'VPNGatewayCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'VPNGatewayCollectionFirst',
+ limit: int,
+ total_count: int,
+ vpn_gateways: List['VPNGateway'],
+ *,
+ next: 'VPNGatewayCollectionNext' = None,
+ ) -> None:
"""
Initialize a VPNGatewayCollection object.
@@ -63558,15 +68053,18 @@ def __ne__(self, other: 'VPNGatewayCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayCollectionFirst():
+
+class VPNGatewayCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNGatewayCollectionFirst object.
@@ -63614,7 +68112,8 @@ def __ne__(self, other: 'VPNGatewayCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayCollectionNext():
+
+class VPNGatewayCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -63622,8 +68121,10 @@ class VPNGatewayCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNGatewayCollectionNext object.
@@ -63671,7 +68172,8 @@ def __ne__(self, other: 'VPNGatewayCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayConnection():
+
+class VPNGatewayConnection:
"""
VPNGatewayConnection.
@@ -63700,22 +68202,24 @@ class VPNGatewayConnection():
:attr str status: The status of a VPN gateway connection.
"""
- def __init__(self,
- admin_state_up: bool,
- authentication_mode: str,
- created_at: datetime,
- dead_peer_detection: 'VPNGatewayConnectionDPD',
- href: str,
- id: str,
- mode: str,
- name: str,
- peer_address: str,
- psk: str,
- resource_type: str,
- status: str,
- *,
- ike_policy: 'IKEPolicyReference' = None,
- ipsec_policy: 'IPsecPolicyReference' = None) -> None:
+ def __init__(
+ self,
+ admin_state_up: bool,
+ authentication_mode: str,
+ created_at: datetime,
+ dead_peer_detection: 'VPNGatewayConnectionDPD',
+ href: str,
+ id: str,
+ mode: str,
+ name: str,
+ peer_address: str,
+ psk: str,
+ resource_type: str,
+ status: str,
+ *,
+ ike_policy: 'IKEPolicyReference' = None,
+ ipsec_policy: 'IPsecPolicyReference' = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnection object.
@@ -63744,13 +68248,15 @@ def __init__(self,
used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionStaticRouteMode', 'VPNGatewayConnectionPolicyMode']))
+ ", ".join(['VPNGatewayConnectionStaticRouteMode', 'VPNGatewayConnectionPolicyMode'])
+ )
raise Exception(msg)
class AuthenticationModeEnum(str, Enum):
"""
The authentication mode. Only `psk` is currently supported.
"""
+
PSK = 'psk'
@@ -63758,6 +68264,7 @@ class ModeEnum(str, Enum):
"""
The mode of the VPN gateway.
"""
+
POLICY = 'policy'
ROUTE = 'route'
@@ -63766,6 +68273,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection'
@@ -63773,19 +68281,23 @@ class StatusEnum(str, Enum):
"""
The status of a VPN gateway connection.
"""
+
DOWN = 'down'
UP = 'up'
-class VPNGatewayConnectionCollection():
+
+class VPNGatewayConnectionCollection:
"""
Collection of VPN gateway connections in a VPN gateway.
:attr List[VPNGatewayConnection] connections: Array of VPN gateway connections.
"""
- def __init__(self,
- connections: List['VPNGatewayConnection']) -> None:
+ def __init__(
+ self,
+ connections: List['VPNGatewayConnection'],
+ ) -> None:
"""
Initialize a VPNGatewayConnectionCollection object.
@@ -63840,7 +68352,8 @@ def __ne__(self, other: 'VPNGatewayConnectionCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayConnectionDPD():
+
+class VPNGatewayConnectionDPD:
"""
The Dead Peer Detection settings.
@@ -63850,10 +68363,12 @@ class VPNGatewayConnectionDPD():
interval.
"""
- def __init__(self,
- action: str,
- interval: int,
- timeout: int) -> None:
+ def __init__(
+ self,
+ action: str,
+ interval: int,
+ timeout: int,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionDPD object.
@@ -63922,13 +68437,15 @@ class ActionEnum(str, Enum):
"""
Dead Peer Detection actions.
"""
+
CLEAR = 'clear'
HOLD = 'hold'
NONE = 'none'
RESTART = 'restart'
-class VPNGatewayConnectionDPDPatch():
+
+class VPNGatewayConnectionDPDPatch:
"""
The Dead Peer Detection settings.
@@ -63938,11 +68455,13 @@ class VPNGatewayConnectionDPDPatch():
least the interval.
"""
- def __init__(self,
- *,
- action: str = None,
- interval: int = None,
- timeout: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ action: str = None,
+ interval: int = None,
+ timeout: int = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionDPDPatch object.
@@ -64005,13 +68524,15 @@ class ActionEnum(str, Enum):
"""
Dead Peer Detection actions.
"""
+
CLEAR = 'clear'
HOLD = 'hold'
NONE = 'none'
RESTART = 'restart'
-class VPNGatewayConnectionDPDPrototype():
+
+class VPNGatewayConnectionDPDPrototype:
"""
The Dead Peer Detection settings.
@@ -64021,11 +68542,13 @@ class VPNGatewayConnectionDPDPrototype():
least the interval.
"""
- def __init__(self,
- *,
- action: str = None,
- interval: int = None,
- timeout: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ action: str = None,
+ interval: int = None,
+ timeout: int = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionDPDPrototype object.
@@ -64088,86 +68611,106 @@ class ActionEnum(str, Enum):
"""
Dead Peer Detection actions.
"""
+
CLEAR = 'clear'
HOLD = 'hold'
NONE = 'none'
RESTART = 'restart'
-class VPNGatewayConnectionIKEPolicyPatch():
+
+class VPNGatewayConnectionIKEPolicyPatch:
"""
The IKE policy to use. Specify `null` to remove any existing policy, [resulting in
auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIKEPolicyPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref']))
+ ", ".join(['VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref'])
+ )
raise Exception(msg)
-class VPNGatewayConnectionIKEPolicyPrototype():
+
+class VPNGatewayConnectionIKEPolicyPrototype:
"""
The IKE policy to use. If unspecified, [auto-negotiation will be
used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIKEPolicyPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref']))
+ ", ".join(['VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById', 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref'])
+ )
raise Exception(msg)
-class VPNGatewayConnectionIPsecPolicyPatch():
+
+class VPNGatewayConnectionIPsecPolicyPatch:
"""
The IPsec policy to use. Specify `null` to remove any existing policy, [resulting in
auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIPsecPolicyPatch object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref']))
+ ", ".join(['VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref'])
+ )
raise Exception(msg)
-class VPNGatewayConnectionIPsecPolicyPrototype():
+
+class VPNGatewayConnectionIPsecPolicyPrototype:
"""
The IPsec policy to use. If unspecified, [auto-negotiation will be
used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIPsecPolicyPrototype object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref']))
+ ", ".join(['VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById', 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref'])
+ )
raise Exception(msg)
-class VPNGatewayConnectionLocalCIDRs():
+
+class VPNGatewayConnectionLocalCIDRs:
"""
VPNGatewayConnectionLocalCIDRs.
:attr List[str] local_cidrs: (optional) The local CIDRs for this resource.
"""
- def __init__(self,
- *,
- local_cidrs: List[str] = None) -> None:
+ def __init__(
+ self,
+ *,
+ local_cidrs: List[str] = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionLocalCIDRs object.
@@ -64213,7 +68756,8 @@ def __ne__(self, other: 'VPNGatewayConnectionLocalCIDRs') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayConnectionPatch():
+
+class VPNGatewayConnectionPatch:
"""
VPNGatewayConnectionPatch.
@@ -64233,15 +68777,17 @@ class VPNGatewayConnectionPatch():
:attr str psk: (optional) The preshared key.
"""
- def __init__(self,
- *,
- admin_state_up: bool = None,
- dead_peer_detection: 'VPNGatewayConnectionDPDPatch' = None,
- ike_policy: 'VPNGatewayConnectionIKEPolicyPatch' = None,
- ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPatch' = None,
- name: str = None,
- peer_address: str = None,
- psk: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ admin_state_up: bool = None,
+ dead_peer_detection: 'VPNGatewayConnectionDPDPatch' = None,
+ ike_policy: 'VPNGatewayConnectionIKEPolicyPatch' = None,
+ ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPatch' = None,
+ name: str = None,
+ peer_address: str = None,
+ psk: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPatch object.
@@ -64262,19 +68808,23 @@ def __init__(self,
:param str psk: (optional) The preshared key.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch']))
+ ", ".join(['VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch'])
+ )
raise Exception(msg)
-class VPNGatewayConnectionPeerCIDRs():
+
+class VPNGatewayConnectionPeerCIDRs:
"""
VPNGatewayConnectionPeerCIDRs.
:attr List[str] peer_cidrs: (optional) The peer CIDRs for this resource.
"""
- def __init__(self,
- *,
- peer_cidrs: List[str] = None) -> None:
+ def __init__(
+ self,
+ *,
+ peer_cidrs: List[str] = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPeerCIDRs object.
@@ -64320,7 +68870,8 @@ def __ne__(self, other: 'VPNGatewayConnectionPeerCIDRs') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayConnectionPrototype():
+
+class VPNGatewayConnectionPrototype:
"""
VPNGatewayConnectionPrototype.
@@ -64341,15 +68892,17 @@ class VPNGatewayConnectionPrototype():
:attr str psk: The preshared key.
"""
- def __init__(self,
- peer_address: str,
- psk: str,
- *,
- admin_state_up: bool = None,
- dead_peer_detection: 'VPNGatewayConnectionDPDPrototype' = None,
- ike_policy: 'VPNGatewayConnectionIKEPolicyPrototype' = None,
- ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPrototype' = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ peer_address: str,
+ psk: str,
+ *,
+ admin_state_up: bool = None,
+ dead_peer_detection: 'VPNGatewayConnectionDPDPrototype' = None,
+ ike_policy: 'VPNGatewayConnectionIKEPolicyPrototype' = None,
+ ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPrototype' = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPrototype object.
@@ -64370,10 +68923,12 @@ def __init__(self,
unspecified, the name will be a hyphenated list of randomly-selected words.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype', 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype']))
+ ", ".join(['VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype', 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype'])
+ )
raise Exception(msg)
-class VPNGatewayConnectionReference():
+
+class VPNGatewayConnectionReference:
"""
VPNGatewayConnectionReference.
@@ -64387,13 +68942,15 @@ class VPNGatewayConnectionReference():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNGatewayConnectionReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNGatewayConnectionReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionReference object.
@@ -64482,10 +69039,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection'
-class VPNGatewayConnectionReferenceDeleted():
+
+class VPNGatewayConnectionReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -64493,8 +69052,10 @@ class VPNGatewayConnectionReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionReferenceDeleted object.
@@ -64542,7 +69103,8 @@ def __ne__(self, other: 'VPNGatewayConnectionReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayConnectionStaticRouteModeTunnel():
+
+class VPNGatewayConnectionStaticRouteModeTunnel:
"""
VPNGatewayConnectionStaticRouteModeTunnel.
@@ -64551,9 +69113,11 @@ class VPNGatewayConnectionStaticRouteModeTunnel():
:attr str status: The status of the VPN Tunnel.
"""
- def __init__(self,
- public_ip: 'IP',
- status: str) -> None:
+ def __init__(
+ self,
+ public_ip: 'IP',
+ status: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionStaticRouteModeTunnel object.
@@ -64617,11 +69181,13 @@ class StatusEnum(str, Enum):
"""
The status of the VPN Tunnel.
"""
+
DOWN = 'down'
UP = 'up'
-class VPNGatewayMember():
+
+class VPNGatewayMember:
"""
VPNGatewayMember.
@@ -64633,12 +69199,14 @@ class VPNGatewayMember():
:attr str status: The status of the VPN gateway member.
"""
- def __init__(self,
- public_ip: 'IP',
- role: str,
- status: str,
- *,
- private_ip: 'IP' = None) -> None:
+ def __init__(
+ self,
+ public_ip: 'IP',
+ role: str,
+ status: str,
+ *,
+ private_ip: 'IP' = None,
+ ) -> None:
"""
Initialize a VPNGatewayMember object.
@@ -64723,6 +69291,7 @@ class RoleEnum(str, Enum):
"""
The high availability role assigned to the VPN gateway member.
"""
+
ACTIVE = 'active'
STANDBY = 'standby'
@@ -64731,13 +69300,15 @@ class StatusEnum(str, Enum):
"""
The status of the VPN gateway member.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
-class VPNGatewayPatch():
+
+class VPNGatewayPatch:
"""
VPNGatewayPatch.
@@ -64745,9 +69316,11 @@ class VPNGatewayPatch():
used by another VPN gateway in the VPC.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayPatch object.
@@ -64794,7 +69367,8 @@ def __ne__(self, other: 'VPNGatewayPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNGatewayPrototype():
+
+class VPNGatewayPrototype:
"""
VPNGatewayPrototype.
@@ -64807,11 +69381,13 @@ class VPNGatewayPrototype():
:attr SubnetIdentity subnet: Identifies a subnet by a unique property.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a VPNGatewayPrototype object.
@@ -64825,10 +69401,12 @@ def __init__(self,
used.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNGatewayPrototypeVPNGatewayRouteModePrototype', 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype']))
+ ", ".join(['VPNGatewayPrototypeVPNGatewayRouteModePrototype', 'VPNGatewayPrototypeVPNGatewayPolicyModePrototype'])
+ )
raise Exception(msg)
-class VPNGatewayReferenceDeleted():
+
+class VPNGatewayReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -64836,8 +69414,10 @@ class VPNGatewayReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VPNGatewayReferenceDeleted object.
@@ -64885,7 +69465,8 @@ def __ne__(self, other: 'VPNGatewayReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServer():
+
+class VPNServer:
"""
VPNServer.
@@ -64942,31 +69523,33 @@ class VPNServer():
:attr VPCReference vpc: The VPC this VPN server resides in.
"""
- def __init__(self,
- certificate: 'CertificateInstanceReference',
- client_authentication: List['VPNServerAuthentication'],
- client_auto_delete: bool,
- client_auto_delete_timeout: int,
- client_dns_server_ips: List['IP'],
- client_idle_timeout: int,
- client_ip_pool: str,
- created_at: datetime,
- crn: str,
- enable_split_tunneling: bool,
- health_state: str,
- hostname: str,
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- port: int,
- private_ips: List['ReservedIPReference'],
- protocol: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- subnets: List['SubnetReference'],
- vpc: 'VPCReference') -> None:
+ def __init__(
+ self,
+ certificate: 'CertificateInstanceReference',
+ client_authentication: List['VPNServerAuthentication'],
+ client_auto_delete: bool,
+ client_auto_delete_timeout: int,
+ client_dns_server_ips: List['IP'],
+ client_idle_timeout: int,
+ client_ip_pool: str,
+ created_at: datetime,
+ crn: str,
+ enable_split_tunneling: bool,
+ health_state: str,
+ hostname: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ port: int,
+ private_ips: List['ReservedIPReference'],
+ protocol: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ subnets: List['SubnetReference'],
+ vpc: 'VPCReference',
+ ) -> None:
"""
Initialize a VPNServer object.
@@ -65278,6 +69861,7 @@ class HealthStateEnum(str, Enum):
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'
@@ -65288,6 +69872,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the VPN server.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -65301,6 +69886,7 @@ class ProtocolEnum(str, Enum):
"""
The transport protocol used by this VPN server.
"""
+
TCP = 'tcp'
UDP = 'udp'
@@ -65309,66 +69895,80 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_SERVER = 'vpn_server'
-class VPNServerAuthentication():
+
+class VPNServerAuthentication:
"""
An authentication method for this VPN server.
:attr str method: The type of authentication.
"""
- def __init__(self,
- method: str) -> None:
+ def __init__(
+ self,
+ method: str,
+ ) -> None:
"""
Initialize a VPNServerAuthentication object.
:param str method: The type of authentication.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNServerAuthenticationByUsername', 'VPNServerAuthenticationByCertificate']))
+ ", ".join(['VPNServerAuthenticationByUsername', 'VPNServerAuthenticationByCertificate'])
+ )
raise Exception(msg)
class MethodEnum(str, Enum):
"""
The type of authentication.
"""
+
CERTIFICATE = 'certificate'
USERNAME = 'username'
-class VPNServerAuthenticationByUsernameIdProvider():
+
+class VPNServerAuthenticationByUsernameIdProvider:
"""
The type of identity provider to be used by VPN client.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VPNServerAuthenticationByUsernameIdProvider object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNServerAuthenticationByUsernameIdProviderByIAM']))
+ ", ".join(['VPNServerAuthenticationByUsernameIdProviderByIAM'])
+ )
raise Exception(msg)
-class VPNServerAuthenticationPrototype():
+
+class VPNServerAuthenticationPrototype:
"""
An authentication method for this VPN server.
:attr str method: The type of authentication.
"""
- def __init__(self,
- method: str) -> None:
+ def __init__(
+ self,
+ method: str,
+ ) -> None:
"""
Initialize a VPNServerAuthenticationPrototype object.
:param str method: The type of authentication.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype']))
+ ", ".join(['VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype'])
+ )
raise Exception(msg)
@classmethod
@@ -65377,9 +69977,9 @@ def from_dict(cls, _dict: Dict) -> 'VPNServerAuthenticationPrototype':
disc_class = cls._get_class_by_discriminator(_dict)
if disc_class != cls:
return disc_class.from_dict(_dict)
- msg = ("Cannot convert dictionary into an instance of base class 'VPNServerAuthenticationPrototype'. " +
- "The discriminator value should map to a valid subclass: {1}").format(
- ", ".join(['VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype', 'VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype']))
+ 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'])
+ )
raise Exception(msg)
@classmethod
@@ -65408,11 +70008,13 @@ class MethodEnum(str, Enum):
"""
The type of authentication.
"""
+
CERTIFICATE = 'certificate'
USERNAME = 'username'
-class VPNServerClient():
+
+class VPNServerClient:
"""
VPNServerClient.
@@ -65444,19 +70046,21 @@ class VPNServerClient():
method is enabled on the VPN server.
"""
- def __init__(self,
- client_ip: 'IP',
- created_at: datetime,
- href: str,
- id: str,
- remote_ip: 'IP',
- remote_port: int,
- resource_type: str,
- status: str,
- *,
- common_name: str = None,
- disconnected_at: datetime = None,
- username: str = None) -> None:
+ def __init__(
+ self,
+ client_ip: 'IP',
+ created_at: datetime,
+ href: str,
+ id: str,
+ remote_ip: 'IP',
+ remote_port: int,
+ resource_type: str,
+ status: str,
+ *,
+ common_name: str = None,
+ disconnected_at: datetime = None,
+ username: str = None,
+ ) -> None:
"""
Initialize a VPNServerClient object.
@@ -65605,6 +70209,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_SERVER_CLIENT = 'vpn_server_client'
@@ -65618,11 +70223,13 @@ class StatusEnum(str, Enum):
processing and surface the error, or bypass the VPN client on which the unexpected
property value was encountered.
"""
+
CONNECTED = 'connected'
DISCONNECTED = 'disconnected'
-class VPNServerClientCollection():
+
+class VPNServerClientCollection:
"""
VPNServerClientCollection.
@@ -65637,13 +70244,15 @@ class VPNServerClientCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- clients: List['VPNServerClient'],
- first: 'VPNServerClientCollectionFirst',
- limit: int,
- total_count: int,
- *,
- next: 'VPNServerClientCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ clients: List['VPNServerClient'],
+ first: 'VPNServerClientCollectionFirst',
+ limit: int,
+ total_count: int,
+ *,
+ next: 'VPNServerClientCollectionNext' = None,
+ ) -> None:
"""
Initialize a VPNServerClientCollection object.
@@ -65737,15 +70346,18 @@ def __ne__(self, other: 'VPNServerClientCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerClientCollectionFirst():
+
+class VPNServerClientCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNServerClientCollectionFirst object.
@@ -65793,7 +70405,8 @@ def __ne__(self, other: 'VPNServerClientCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerClientCollectionNext():
+
+class VPNServerClientCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -65801,8 +70414,10 @@ class VPNServerClientCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNServerClientCollectionNext object.
@@ -65850,7 +70465,8 @@ def __ne__(self, other: 'VPNServerClientCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerCollection():
+
+class VPNServerCollection:
"""
VPNServerCollection.
@@ -65864,13 +70480,15 @@ class VPNServerCollection():
:attr List[VPNServer] vpn_servers: Collection of VPN servers.
"""
- def __init__(self,
- first: 'VPNServerCollectionFirst',
- limit: int,
- total_count: int,
- vpn_servers: List['VPNServer'],
- *,
- next: 'VPNServerCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'VPNServerCollectionFirst',
+ limit: int,
+ total_count: int,
+ vpn_servers: List['VPNServer'],
+ *,
+ next: 'VPNServerCollectionNext' = None,
+ ) -> None:
"""
Initialize a VPNServerCollection object.
@@ -65964,15 +70582,18 @@ def __ne__(self, other: 'VPNServerCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerCollectionFirst():
+
+class VPNServerCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNServerCollectionFirst object.
@@ -66020,7 +70641,8 @@ def __ne__(self, other: 'VPNServerCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerCollectionNext():
+
+class VPNServerCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -66028,8 +70650,10 @@ class VPNServerCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNServerCollectionNext object.
@@ -66077,7 +70701,8 @@ def __ne__(self, other: 'VPNServerCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerPatch():
+
+class VPNServerPatch:
"""
VPNServerPatch.
@@ -66114,18 +70739,20 @@ class VPNServerPatch():
server in (replacing the existing subnets).
"""
- def __init__(self,
- *,
- certificate: 'CertificateInstanceIdentity' = None,
- client_authentication: List['VPNServerAuthenticationPrototype'] = None,
- client_dns_server_ips: List['IP'] = None,
- client_idle_timeout: int = None,
- client_ip_pool: str = None,
- enable_split_tunneling: bool = None,
- name: str = None,
- port: int = None,
- protocol: str = None,
- subnets: List['SubnetIdentity'] = None) -> None:
+ def __init__(
+ self,
+ *,
+ certificate: 'CertificateInstanceIdentity' = None,
+ client_authentication: List['VPNServerAuthenticationPrototype'] = None,
+ client_dns_server_ips: List['IP'] = None,
+ client_idle_timeout: int = None,
+ client_ip_pool: str = None,
+ enable_split_tunneling: bool = None,
+ name: str = None,
+ port: int = None,
+ protocol: str = None,
+ subnets: List['SubnetIdentity'] = None,
+ ) -> None:
"""
Initialize a VPNServerPatch object.
@@ -66274,11 +70901,13 @@ class ProtocolEnum(str, Enum):
"""
The transport protocol used by this VPN server.
"""
+
TCP = 'tcp'
UDP = 'udp'
-class VPNServerReferenceDeleted():
+
+class VPNServerReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -66286,8 +70915,10 @@ class VPNServerReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VPNServerReferenceDeleted object.
@@ -66335,7 +70966,8 @@ def __ne__(self, other: 'VPNServerReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerRoute():
+
+class VPNServerRoute:
"""
VPNServerRoute.
@@ -66359,15 +70991,17 @@ class VPNServerRoute():
:attr str resource_type: The resource type.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- href: str,
- id: str,
- lifecycle_state: str,
- name: str,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ href: str,
+ id: str,
+ lifecycle_state: str,
+ name: str,
+ resource_type: str,
+ ) -> None:
"""
Initialize a VPNServerRoute object.
@@ -66496,6 +71130,7 @@ class ActionEnum(str, Enum):
processing and surface the error, or bypass the VPN route on which the unexpected
property value was encountered.
"""
+
DELIVER = 'deliver'
DROP = 'drop'
TRANSLATE = 'translate'
@@ -66505,6 +71140,7 @@ class LifecycleStateEnum(str, Enum):
"""
The lifecycle state of the VPN route.
"""
+
DELETING = 'deleting'
FAILED = 'failed'
PENDING = 'pending'
@@ -66518,10 +71154,12 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_SERVER_ROUTE = 'vpn_server_route'
-class VPNServerRouteCollection():
+
+class VPNServerRouteCollection:
"""
VPNServerRouteCollection.
@@ -66536,13 +71174,15 @@ class VPNServerRouteCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'VPNServerRouteCollectionFirst',
- limit: int,
- routes: List['VPNServerRoute'],
- total_count: int,
- *,
- next: 'VPNServerRouteCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'VPNServerRouteCollectionFirst',
+ limit: int,
+ routes: List['VPNServerRoute'],
+ total_count: int,
+ *,
+ next: 'VPNServerRouteCollectionNext' = None,
+ ) -> None:
"""
Initialize a VPNServerRouteCollection object.
@@ -66636,15 +71276,18 @@ def __ne__(self, other: 'VPNServerRouteCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerRouteCollectionFirst():
+
+class VPNServerRouteCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNServerRouteCollectionFirst object.
@@ -66692,7 +71335,8 @@ def __ne__(self, other: 'VPNServerRouteCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerRouteCollectionNext():
+
+class VPNServerRouteCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -66700,8 +71344,10 @@ class VPNServerRouteCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNServerRouteCollectionNext object.
@@ -66749,7 +71395,8 @@ def __ne__(self, other: 'VPNServerRouteCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VPNServerRoutePatch():
+
+class VPNServerRoutePatch:
"""
VPNServerRoutePatch.
@@ -66757,9 +71404,11 @@ class VPNServerRoutePatch():
be used by another route for the VPN server.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a VPNServerRoutePatch object.
@@ -66806,7 +71455,8 @@ def __ne__(self, other: 'VPNServerRoutePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class Volume():
+
+class Volume:
"""
Volume.
@@ -66884,33 +71534,35 @@ class Volume():
:attr ZoneReference zone: The zone this volume resides in.
"""
- def __init__(self,
- active: bool,
- attachment_state: str,
- bandwidth: int,
- busy: bool,
- capacity: int,
- created_at: datetime,
- crn: str,
- encryption: str,
- health_reasons: List['VolumeHealthReason'],
- health_state: str,
- href: str,
- id: str,
- iops: int,
- name: str,
- profile: 'VolumeProfileReference',
- resource_group: 'ResourceGroupReference',
- status: str,
- status_reasons: List['VolumeStatusReason'],
- user_tags: List[str],
- volume_attachments: List['VolumeAttachmentReferenceVolumeContext'],
- zone: 'ZoneReference',
- *,
- encryption_key: 'EncryptionKeyReference' = None,
- operating_system: 'OperatingSystem' = None,
- source_image: 'ImageReference' = None,
- source_snapshot: 'SnapshotReference' = None) -> None:
+ def __init__(
+ self,
+ active: bool,
+ attachment_state: str,
+ bandwidth: int,
+ busy: bool,
+ capacity: int,
+ created_at: datetime,
+ crn: str,
+ encryption: str,
+ health_reasons: List['VolumeHealthReason'],
+ health_state: str,
+ href: str,
+ id: str,
+ iops: int,
+ name: str,
+ profile: 'VolumeProfileReference',
+ resource_group: 'ResourceGroupReference',
+ status: str,
+ status_reasons: List['VolumeStatusReason'],
+ user_tags: List[str],
+ volume_attachments: List['VolumeAttachmentReferenceVolumeContext'],
+ zone: 'ZoneReference',
+ *,
+ encryption_key: 'EncryptionKeyReference' = None,
+ operating_system: 'OperatingSystem' = None,
+ source_image: 'ImageReference' = None,
+ source_snapshot: 'SnapshotReference' = None,
+ ) -> None:
"""
Initialize a Volume object.
@@ -67240,6 +71892,7 @@ class AttachmentStateEnum(str, Enum):
stopped)
- `unusable`: Not able to be attached to any virtual server instances.
"""
+
ATTACHED = 'attached'
UNATTACHED = 'unattached'
UNUSABLE = 'unusable'
@@ -67249,6 +71902,7 @@ class EncryptionEnum(str, Enum):
"""
The type of encryption used on the volume.
"""
+
PROVIDER_MANAGED = 'provider_managed'
USER_MANAGED = 'user_managed'
@@ -67264,6 +71918,7 @@ class HealthStateEnum(str, Enum):
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'
@@ -67278,6 +71933,7 @@ class StatusEnum(str, Enum):
surface the error, or bypass the volume on which the unexpected property value was
encountered.
"""
+
AVAILABLE = 'available'
FAILED = 'failed'
PENDING = 'pending'
@@ -67286,7 +71942,8 @@ class StatusEnum(str, Enum):
UPDATING = 'updating'
-class VolumeAttachment():
+
+class VolumeAttachment:
"""
VolumeAttachment.
@@ -67311,18 +71968,20 @@ class VolumeAttachment():
This property will be absent if the volume has not yet been provisioned.
"""
- def __init__(self,
- bandwidth: int,
- created_at: datetime,
- delete_volume_on_instance_delete: bool,
- href: str,
- id: str,
- name: str,
- status: str,
- type: str,
- *,
- device: 'VolumeAttachmentDevice' = None,
- volume: 'VolumeReferenceVolumeAttachmentContext' = None) -> None:
+ def __init__(
+ self,
+ bandwidth: int,
+ created_at: datetime,
+ delete_volume_on_instance_delete: bool,
+ href: str,
+ id: str,
+ name: str,
+ status: str,
+ type: str,
+ *,
+ device: 'VolumeAttachmentDevice' = None,
+ volume: 'VolumeReferenceVolumeAttachmentContext' = None,
+ ) -> None:
"""
Initialize a VolumeAttachment object.
@@ -67457,6 +72116,7 @@ class StatusEnum(str, Enum):
"""
The status of this volume attachment.
"""
+
ATTACHED = 'attached'
ATTACHING = 'attaching'
DELETING = 'deleting'
@@ -67467,11 +72127,13 @@ class TypeEnum(str, Enum):
"""
The type of volume attachment.
"""
+
BOOT = 'boot'
DATA = 'data'
-class VolumeAttachmentCollection():
+
+class VolumeAttachmentCollection:
"""
VolumeAttachmentCollection.
@@ -67479,8 +72141,10 @@ class VolumeAttachmentCollection():
attachments.
"""
- def __init__(self,
- volume_attachments: List['VolumeAttachment']) -> None:
+ def __init__(
+ self,
+ volume_attachments: List['VolumeAttachment'],
+ ) -> None:
"""
Initialize a VolumeAttachmentCollection object.
@@ -67535,7 +72199,8 @@ def __ne__(self, other: 'VolumeAttachmentCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentDevice():
+
+class VolumeAttachmentDevice:
"""
VolumeAttachmentDevice.
@@ -67543,9 +72208,11 @@ class VolumeAttachmentDevice():
the instance operating system.
"""
- def __init__(self,
- *,
- id: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ id: str = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentDevice object.
@@ -67592,7 +72259,8 @@ def __ne__(self, other: 'VolumeAttachmentDevice') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentPatch():
+
+class VolumeAttachmentPatch:
"""
VolumeAttachmentPatch.
@@ -67602,10 +72270,12 @@ class VolumeAttachmentPatch():
not be used by another volume attachment on the instance.
"""
- def __init__(self,
- *,
- delete_volume_on_instance_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ delete_volume_on_instance_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPatch object.
@@ -67659,7 +72329,8 @@ def __ne__(self, other: 'VolumeAttachmentPatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentPrototype():
+
+class VolumeAttachmentPrototype:
"""
VolumeAttachmentPrototype.
@@ -67672,11 +72343,13 @@ class VolumeAttachmentPrototype():
the instance, or a prototype object for a new volume.
"""
- def __init__(self,
- volume: 'VolumeAttachmentPrototypeVolume',
- *,
- delete_volume_on_instance_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ volume: 'VolumeAttachmentPrototypeVolume',
+ *,
+ delete_volume_on_instance_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototype object.
@@ -67743,7 +72416,8 @@ def __ne__(self, other: 'VolumeAttachmentPrototype') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentPrototypeInstanceByImageContext():
+
+class VolumeAttachmentPrototypeInstanceByImageContext:
"""
VolumeAttachmentPrototypeInstanceByImageContext.
@@ -67756,11 +72430,13 @@ class VolumeAttachmentPrototypeInstanceByImageContext():
volume.
"""
- def __init__(self,
- volume: 'VolumePrototypeInstanceByImageContext',
- *,
- delete_volume_on_instance_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ volume: 'VolumePrototypeInstanceByImageContext',
+ *,
+ delete_volume_on_instance_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeInstanceByImageContext object.
@@ -67827,7 +72503,8 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceByImageContext') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentPrototypeInstanceBySourceSnapshotContext():
+
+class VolumeAttachmentPrototypeInstanceBySourceSnapshotContext:
"""
VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.
@@ -67840,11 +72517,13 @@ class VolumeAttachmentPrototypeInstanceBySourceSnapshotContext():
for a new volume from a snapshot.
"""
- def __init__(self,
- volume: 'VolumePrototypeInstanceBySourceSnapshotContext',
- *,
- delete_volume_on_instance_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ volume: 'VolumePrototypeInstanceBySourceSnapshotContext',
+ *,
+ delete_volume_on_instance_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeInstanceBySourceSnapshotContext object.
@@ -67911,7 +72590,8 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContex
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentPrototypeInstanceByVolumeContext():
+
+class VolumeAttachmentPrototypeInstanceByVolumeContext:
"""
VolumeAttachmentPrototypeInstanceByVolumeContext.
@@ -67923,11 +72603,13 @@ class VolumeAttachmentPrototypeInstanceByVolumeContext():
:attr VolumeIdentity volume: An existing volume to attach.
"""
- def __init__(self,
- volume: 'VolumeIdentity',
- *,
- delete_volume_on_instance_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ volume: 'VolumeIdentity',
+ *,
+ delete_volume_on_instance_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeInstanceByVolumeContext object.
@@ -67993,22 +72675,27 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeInstanceByVolumeContext') -> b
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentPrototypeVolume():
+
+class VolumeAttachmentPrototypeVolume:
"""
An existing volume to attach to the instance, or a prototype object for a new volume.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolume object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentity', 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext']))
+ ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentity', 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext'])
+ )
raise Exception(msg)
-class VolumeAttachmentReferenceInstanceContext():
+
+class VolumeAttachmentReferenceInstanceContext:
"""
VolumeAttachmentReferenceInstanceContext.
@@ -68029,14 +72716,16 @@ class VolumeAttachmentReferenceInstanceContext():
This property will be absent if the volume has not yet been provisioned.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'VolumeAttachmentReferenceInstanceContextDeleted' = None,
- device: 'VolumeAttachmentDevice' = None,
- volume: 'VolumeReferenceVolumeAttachmentContext' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'VolumeAttachmentReferenceInstanceContextDeleted' = None,
+ device: 'VolumeAttachmentDevice' = None,
+ volume: 'VolumeReferenceVolumeAttachmentContext' = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentReferenceInstanceContext object.
@@ -68136,7 +72825,8 @@ def __ne__(self, other: 'VolumeAttachmentReferenceInstanceContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentReferenceInstanceContextDeleted():
+
+class VolumeAttachmentReferenceInstanceContextDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -68144,8 +72834,10 @@ class VolumeAttachmentReferenceInstanceContextDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VolumeAttachmentReferenceInstanceContextDeleted object.
@@ -68193,7 +72885,8 @@ def __ne__(self, other: 'VolumeAttachmentReferenceInstanceContextDeleted') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeAttachmentReferenceVolumeContext():
+
+class VolumeAttachmentReferenceVolumeContext:
"""
VolumeAttachmentReferenceVolumeContext.
@@ -68215,16 +72908,18 @@ class VolumeAttachmentReferenceVolumeContext():
:attr str type: The type of volume attachment.
"""
- def __init__(self,
- delete_volume_on_instance_delete: bool,
- href: str,
- id: str,
- instance: 'InstanceReference',
- name: str,
- type: str,
- *,
- deleted: 'VolumeAttachmentReferenceVolumeContextDeleted' = None,
- device: 'VolumeAttachmentDevice' = None) -> None:
+ def __init__(
+ self,
+ delete_volume_on_instance_delete: bool,
+ href: str,
+ id: str,
+ instance: 'InstanceReference',
+ name: str,
+ type: str,
+ *,
+ deleted: 'VolumeAttachmentReferenceVolumeContextDeleted' = None,
+ device: 'VolumeAttachmentDevice' = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentReferenceVolumeContext object.
@@ -68345,11 +73040,13 @@ class TypeEnum(str, Enum):
"""
The type of volume attachment.
"""
+
BOOT = 'boot'
DATA = 'data'
-class VolumeAttachmentReferenceVolumeContextDeleted():
+
+class VolumeAttachmentReferenceVolumeContextDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -68357,8 +73054,10 @@ class VolumeAttachmentReferenceVolumeContextDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VolumeAttachmentReferenceVolumeContextDeleted object.
@@ -68406,7 +73105,8 @@ def __ne__(self, other: 'VolumeAttachmentReferenceVolumeContextDeleted') -> bool
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeCollection():
+
+class VolumeCollection:
"""
VolumeCollection.
@@ -68419,12 +73119,14 @@ class VolumeCollection():
:attr List[Volume] volumes: Collection of volumes.
"""
- def __init__(self,
- first: 'VolumeCollectionFirst',
- limit: int,
- volumes: List['Volume'],
- *,
- next: 'VolumeCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'VolumeCollectionFirst',
+ limit: int,
+ volumes: List['Volume'],
+ *,
+ next: 'VolumeCollectionNext' = None,
+ ) -> None:
"""
Initialize a VolumeCollection object.
@@ -68509,15 +73211,18 @@ def __ne__(self, other: 'VolumeCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeCollectionFirst():
+
+class VolumeCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeCollectionFirst object.
@@ -68565,7 +73270,8 @@ def __ne__(self, other: 'VolumeCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeCollectionNext():
+
+class VolumeCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -68573,8 +73279,10 @@ class VolumeCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeCollectionNext object.
@@ -68622,7 +73330,8 @@ def __ne__(self, other: 'VolumeCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeHealthReason():
+
+class VolumeHealthReason:
"""
VolumeHealthReason.
@@ -68633,11 +73342,13 @@ class VolumeHealthReason():
health state.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a VolumeHealthReason object.
@@ -68705,25 +73416,31 @@ class CodeEnum(str, Enum):
"""
A snake case string succinctly identifying the reason for this health state.
"""
+
INITIALIZING_FROM_SNAPSHOT = 'initializing_from_snapshot'
-class VolumeIdentity():
+
+class VolumeIdentity:
"""
Identifies a volume by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VolumeIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VolumeIdentityById', 'VolumeIdentityByCRN', 'VolumeIdentityByHref']))
+ ", ".join(['VolumeIdentityById', 'VolumeIdentityByCRN', 'VolumeIdentityByHref'])
+ )
raise Exception(msg)
-class VolumePatch():
+
+class VolumePatch:
"""
VolumePatch.
@@ -68743,21 +73460,22 @@ class VolumePatch():
:attr VolumeProfileIdentity profile: (optional) The profile to use for this
volume. The requested profile must be in the same
`family` as the current profile. The volume must be attached as a data volume to
- a
- running virtual server instance, and must have a `capacity` within the range
+ a running virtual server instance, and must have a `capacity` within the range
supported by the specified profile.
:attr List[str] user_tags: (optional) The [user
tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this
volume.
"""
- def __init__(self,
- *,
- capacity: int = None,
- iops: int = None,
- name: str = None,
- profile: 'VolumeProfileIdentity' = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ *,
+ capacity: int = None,
+ iops: int = None,
+ name: str = None,
+ profile: 'VolumeProfileIdentity' = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a VolumePatch object.
@@ -68777,8 +73495,8 @@ def __init__(self,
:param VolumeProfileIdentity profile: (optional) The profile to use for
this volume. The requested profile must be in the same
`family` as the current profile. The volume must be attached as a data
- volume to a
- running virtual server instance, and must have a `capacity` within the
+ volume to
+ a running virtual server instance, and must have a `capacity` within the
range
supported by the specified profile.
:param List[str] user_tags: (optional) The [user
@@ -68848,7 +73566,8 @@ def __ne__(self, other: 'VolumePatch') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeProfile():
+
+class VolumeProfile:
"""
VolumeProfile.
@@ -68861,10 +73580,12 @@ class VolumeProfile():
:attr str name: The globally unique name for this volume profile.
"""
- def __init__(self,
- family: str,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ family: str,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a VolumeProfile object.
@@ -68940,11 +73661,13 @@ class FamilyEnum(str, Enum):
surface the error, or bypass the volume profile on which the unexpected property
value was encountered.
"""
+
CUSTOM = 'custom'
TIERED = 'tiered'
-class VolumeProfileCollection():
+
+class VolumeProfileCollection:
"""
VolumeProfileCollection.
@@ -68958,13 +73681,15 @@ class VolumeProfileCollection():
:attr int total_count: The total number of resources across all pages.
"""
- def __init__(self,
- first: 'VolumeProfileCollectionFirst',
- limit: int,
- profiles: List['VolumeProfile'],
- total_count: int,
- *,
- next: 'VolumeProfileCollectionNext' = None) -> None:
+ def __init__(
+ self,
+ first: 'VolumeProfileCollectionFirst',
+ limit: int,
+ profiles: List['VolumeProfile'],
+ total_count: int,
+ *,
+ next: 'VolumeProfileCollectionNext' = None,
+ ) -> None:
"""
Initialize a VolumeProfileCollection object.
@@ -69058,15 +73783,18 @@ def __ne__(self, other: 'VolumeProfileCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeProfileCollectionFirst():
+
+class VolumeProfileCollectionFirst:
"""
A link to the first page of resources.
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeProfileCollectionFirst object.
@@ -69114,7 +73842,8 @@ def __ne__(self, other: 'VolumeProfileCollectionFirst') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeProfileCollectionNext():
+
+class VolumeProfileCollectionNext:
"""
A link to the next page of resources. This property is present for all pages except
the last page.
@@ -69122,8 +73851,10 @@ class VolumeProfileCollectionNext():
:attr str href: The URL for a page of resources.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeProfileCollectionNext object.
@@ -69171,22 +73902,27 @@ def __ne__(self, other: 'VolumeProfileCollectionNext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeProfileIdentity():
+
+class VolumeProfileIdentity:
"""
Identifies a volume profile by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VolumeProfileIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VolumeProfileIdentityByName', 'VolumeProfileIdentityByHref']))
+ ", ".join(['VolumeProfileIdentityByName', 'VolumeProfileIdentityByHref'])
+ )
raise Exception(msg)
-class VolumeProfileReference():
+
+class VolumeProfileReference:
"""
VolumeProfileReference.
@@ -69194,9 +73930,11 @@ class VolumeProfileReference():
:attr str name: The globally unique name for this volume profile.
"""
- def __init__(self,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a VolumeProfileReference object.
@@ -69252,7 +73990,8 @@ def __ne__(self, other: 'VolumeProfileReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumePrototype():
+
+class VolumePrototype:
"""
VolumePrototype.
@@ -69274,14 +74013,16 @@ class VolumePrototype():
:attr ZoneIdentity zone: The zone this volume will reside in.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- zone: 'ZoneIdentity',
- *,
- iops: int = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ zone: 'ZoneIdentity',
+ *,
+ iops: int = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a VolumePrototype object.
@@ -69305,10 +74046,12 @@ def __init__(self,
this volume.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VolumePrototypeVolumeByCapacity', 'VolumePrototypeVolumeBySourceSnapshot']))
+ ", ".join(['VolumePrototypeVolumeByCapacity', 'VolumePrototypeVolumeBySourceSnapshot'])
+ )
raise Exception(msg)
-class VolumePrototypeInstanceByImageContext():
+
+class VolumePrototypeInstanceByImageContext:
"""
VolumePrototypeInstanceByImageContext.
@@ -69333,14 +74076,16 @@ class VolumePrototypeInstanceByImageContext():
volume.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- *,
- capacity: int = None,
- encryption_key: 'EncryptionKeyIdentity' = None,
- iops: int = None,
- name: str = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ *,
+ capacity: int = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ iops: int = None,
+ name: str = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a VolumePrototypeInstanceByImageContext object.
@@ -69440,7 +74185,8 @@ def __ne__(self, other: 'VolumePrototypeInstanceByImageContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumePrototypeInstanceBySourceSnapshotContext():
+
+class VolumePrototypeInstanceBySourceSnapshotContext:
"""
VolumePrototypeInstanceBySourceSnapshotContext.
@@ -69467,15 +74213,17 @@ class VolumePrototypeInstanceBySourceSnapshotContext():
volume.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- source_snapshot: 'SnapshotIdentity',
- *,
- capacity: int = None,
- encryption_key: 'EncryptionKeyIdentity' = None,
- iops: int = None,
- name: str = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ source_snapshot: 'SnapshotIdentity',
+ *,
+ capacity: int = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ iops: int = None,
+ name: str = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a VolumePrototypeInstanceBySourceSnapshotContext object.
@@ -69587,7 +74335,8 @@ def __ne__(self, other: 'VolumePrototypeInstanceBySourceSnapshotContext') -> boo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeReference():
+
+class VolumeReference:
"""
VolumeReference.
@@ -69601,13 +74350,15 @@ class VolumeReference():
in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'VolumeReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'VolumeReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a VolumeReference object.
@@ -69691,7 +74442,8 @@ def __ne__(self, other: 'VolumeReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeReferenceDeleted():
+
+class VolumeReferenceDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -69699,8 +74451,10 @@ class VolumeReferenceDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VolumeReferenceDeleted object.
@@ -69748,7 +74502,8 @@ def __ne__(self, other: 'VolumeReferenceDeleted') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeReferenceVolumeAttachmentContext():
+
+class VolumeReferenceVolumeAttachmentContext:
"""
VolumeReferenceVolumeAttachmentContext.
@@ -69763,13 +74518,15 @@ class VolumeReferenceVolumeAttachmentContext():
in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'VolumeReferenceVolumeAttachmentContextDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'VolumeReferenceVolumeAttachmentContextDeleted' = None,
+ ) -> None:
"""
Initialize a VolumeReferenceVolumeAttachmentContext object.
@@ -69854,7 +74611,8 @@ def __ne__(self, other: 'VolumeReferenceVolumeAttachmentContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeReferenceVolumeAttachmentContextDeleted():
+
+class VolumeReferenceVolumeAttachmentContextDeleted:
"""
If present, this property indicates the referenced resource has been deleted, and
provides some supplementary information.
@@ -69862,8 +74620,10 @@ class VolumeReferenceVolumeAttachmentContextDeleted():
:attr str more_info: Link to documentation about deleted resources.
"""
- def __init__(self,
- more_info: str) -> None:
+ def __init__(
+ self,
+ more_info: str,
+ ) -> None:
"""
Initialize a VolumeReferenceVolumeAttachmentContextDeleted object.
@@ -69911,7 +74671,8 @@ def __ne__(self, other: 'VolumeReferenceVolumeAttachmentContextDeleted') -> bool
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class VolumeStatusReason():
+
+class VolumeStatusReason:
"""
VolumeStatusReason.
@@ -69920,11 +74681,13 @@ class VolumeStatusReason():
:attr str more_info: (optional) Link to documentation about this status reason.
"""
- def __init__(self,
- code: str,
- message: str,
- *,
- more_info: str = None) -> None:
+ def __init__(
+ self,
+ code: str,
+ message: str,
+ *,
+ more_info: str = None,
+ ) -> None:
"""
Initialize a VolumeStatusReason object.
@@ -69992,10 +74755,12 @@ class CodeEnum(str, Enum):
"""
A snake case string succinctly identifying the status reason.
"""
+
ENCRYPTION_KEY_DELETED = 'encryption_key_deleted'
-class Zone():
+
+class Zone:
"""
Zone.
@@ -70005,11 +74770,13 @@ class Zone():
:attr str status: The availability status of this zone.
"""
- def __init__(self,
- href: str,
- name: str,
- region: 'RegionReference',
- status: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ region: 'RegionReference',
+ status: str,
+ ) -> None:
"""
Initialize a Zone object.
@@ -70088,20 +74855,24 @@ class StatusEnum(str, Enum):
"""
The availability status of this zone.
"""
+
AVAILABLE = 'available'
IMPAIRED = 'impaired'
UNAVAILABLE = 'unavailable'
-class ZoneCollection():
+
+class ZoneCollection:
"""
ZoneCollection.
:attr List[Zone] zones: Collection of zones.
"""
- def __init__(self,
- zones: List['Zone']) -> None:
+ def __init__(
+ self,
+ zones: List['Zone'],
+ ) -> None:
"""
Initialize a ZoneCollection object.
@@ -70155,22 +74926,27 @@ def __ne__(self, other: 'ZoneCollection') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class ZoneIdentity():
+
+class ZoneIdentity:
"""
Identifies a zone by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a ZoneIdentity object.
"""
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ZoneIdentityByName', 'ZoneIdentityByHref']))
+ ", ".join(['ZoneIdentityByName', 'ZoneIdentityByHref'])
+ )
raise Exception(msg)
-class ZoneReference():
+
+class ZoneReference:
"""
ZoneReference.
@@ -70178,9 +74954,11 @@ class ZoneReference():
:attr str name: The globally unique name for this zone.
"""
- def __init__(self,
- href: str,
- name: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ name: str,
+ ) -> None:
"""
Initialize a ZoneReference object.
@@ -70236,6 +75014,7 @@ def __ne__(self, other: 'ZoneReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class BackupPolicyJobSourceVolumeReference(BackupPolicyJobSource):
"""
BackupPolicyJobSourceVolumeReference.
@@ -70250,13 +75029,15 @@ class BackupPolicyJobSourceVolumeReference(BackupPolicyJobSource):
in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'VolumeReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'VolumeReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a BackupPolicyJobSourceVolumeReference object.
@@ -70341,6 +75122,7 @@ def __ne__(self, other: 'BackupPolicyJobSourceVolumeReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class BareMetalServerBootTargetBareMetalServerDiskReference(BareMetalServerBootTarget):
"""
BareMetalServerBootTargetBareMetalServerDiskReference.
@@ -70355,13 +75137,15 @@ class BareMetalServerBootTargetBareMetalServerDiskReference(BareMetalServerBootT
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'BareMetalServerDiskReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'BareMetalServerDiskReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a BareMetalServerBootTargetBareMetalServerDiskReference object.
@@ -70451,9 +75235,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
BARE_METAL_SERVER_DISK = 'bare_metal_server_disk'
+
class BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount(BareMetalServerInitializationUserAccount):
"""
BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.
@@ -70466,11 +75252,13 @@ class BareMetalServerInitializationUserAccountBareMetalServerInitializationHostU
:attr str username: The username for the account created at initialization.
"""
- def __init__(self,
- encrypted_password: bytes,
- encryption_key: 'KeyReference',
- resource_type: str,
- username: str) -> None:
+ def __init__(
+ self,
+ encrypted_password: bytes,
+ encryption_key: 'KeyReference',
+ resource_type: str,
+ username: str,
+ ) -> None:
"""
Initialize a BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount object.
@@ -70553,9 +75341,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
HOST_USER_ACCOUNT = 'host_user_account'
+
class BareMetalServerNetworkInterfaceByHiperSocket(BareMetalServerNetworkInterface):
"""
BareMetalServerNetworkInterfaceByHiperSocket.
@@ -70593,23 +75383,25 @@ class BareMetalServerNetworkInterfaceByHiperSocket(BareMetalServerNetworkInterfa
within a `s390x` based system.
"""
- def __init__(self,
- allow_ip_spoofing: bool,
- created_at: datetime,
- enable_infrastructure_nat: bool,
- floating_ips: List['FloatingIPReference'],
- href: str,
- id: str,
- mac_address: str,
- name: str,
- port_speed: int,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- status: str,
- subnet: 'SubnetReference',
- type: str,
- interface_type: str) -> None:
+ def __init__(
+ self,
+ allow_ip_spoofing: bool,
+ created_at: datetime,
+ enable_infrastructure_nat: bool,
+ floating_ips: List['FloatingIPReference'],
+ href: str,
+ id: str,
+ mac_address: str,
+ name: str,
+ port_speed: int,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ status: str,
+ subnet: 'SubnetReference',
+ type: str,
+ interface_type: str,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfaceByHiperSocket object.
@@ -70815,6 +75607,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
@@ -70822,6 +75615,7 @@ class StatusEnum(str, Enum):
"""
The status of the network interface.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -70832,6 +75626,7 @@ class TypeEnum(str, Enum):
"""
The type of this bare metal server network interface.
"""
+
PRIMARY = 'primary'
SECONDARY = 'secondary'
@@ -70842,9 +75637,11 @@ class InterfaceTypeEnum(str, Enum):
connectivity
within a `s390x` based system.
"""
+
HIPERSOCKET = 'hipersocket'
+
class BareMetalServerNetworkInterfaceByPCI(BareMetalServerNetworkInterface):
"""
BareMetalServerNetworkInterfaceByPCI.
@@ -70888,24 +75685,26 @@ class BareMetalServerNetworkInterfaceByPCI(BareMetalServerNetworkInterface):
- Cannot directly use an IEEE 802.1q VLAN tag.
"""
- def __init__(self,
- allow_ip_spoofing: bool,
- created_at: datetime,
- enable_infrastructure_nat: bool,
- floating_ips: List['FloatingIPReference'],
- href: str,
- id: str,
- mac_address: str,
- name: str,
- port_speed: int,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- status: str,
- subnet: 'SubnetReference',
- type: str,
- allowed_vlans: List[int],
- interface_type: str) -> None:
+ def __init__(
+ self,
+ allow_ip_spoofing: bool,
+ created_at: datetime,
+ enable_infrastructure_nat: bool,
+ floating_ips: List['FloatingIPReference'],
+ href: str,
+ id: str,
+ mac_address: str,
+ name: str,
+ port_speed: int,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ status: str,
+ subnet: 'SubnetReference',
+ type: str,
+ allowed_vlans: List[int],
+ interface_type: str,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfaceByPCI object.
@@ -71124,6 +75923,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
@@ -71131,6 +75931,7 @@ class StatusEnum(str, Enum):
"""
The status of the network interface.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -71141,6 +75942,7 @@ class TypeEnum(str, Enum):
"""
The type of this bare metal server network interface.
"""
+
PRIMARY = 'primary'
SECONDARY = 'secondary'
@@ -71155,9 +75957,11 @@ class InterfaceTypeEnum(str, Enum):
to use the PCI interface
- Cannot directly use an IEEE 802.1q VLAN tag.
"""
+
PCI = 'pci'
+
class BareMetalServerNetworkInterfaceByVLAN(BareMetalServerNetworkInterface):
"""
BareMetalServerNetworkInterfaceByVLAN.
@@ -71206,25 +76010,27 @@ class BareMetalServerNetworkInterfaceByVLAN(BareMetalServerNetworkInterface):
traffic on this interface.
"""
- def __init__(self,
- allow_ip_spoofing: bool,
- created_at: datetime,
- enable_infrastructure_nat: bool,
- floating_ips: List['FloatingIPReference'],
- href: str,
- id: str,
- mac_address: str,
- name: str,
- port_speed: int,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- security_groups: List['SecurityGroupReference'],
- status: str,
- subnet: 'SubnetReference',
- type: str,
- allow_interface_to_float: bool,
- interface_type: str,
- vlan: int) -> None:
+ def __init__(
+ self,
+ allow_ip_spoofing: bool,
+ created_at: datetime,
+ enable_infrastructure_nat: bool,
+ floating_ips: List['FloatingIPReference'],
+ href: str,
+ id: str,
+ mac_address: str,
+ name: str,
+ port_speed: int,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ security_groups: List['SecurityGroupReference'],
+ status: str,
+ subnet: 'SubnetReference',
+ type: str,
+ allow_interface_to_float: bool,
+ interface_type: str,
+ vlan: int,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfaceByVLAN object.
@@ -71455,6 +76261,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
@@ -71462,6 +76269,7 @@ class StatusEnum(str, Enum):
"""
The status of the network interface.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -71472,6 +76280,7 @@ class TypeEnum(str, Enum):
"""
The type of this bare metal server network interface.
"""
+
PRIMARY = 'primary'
SECONDARY = 'secondary'
@@ -71486,9 +76295,11 @@ class InterfaceTypeEnum(str, Enum):
through
which traffic flows.
"""
+
VLAN = 'vlan'
+
class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(BareMetalServerNetworkInterfacePrototype):
"""
BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.
@@ -71523,15 +76334,17 @@ class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByH
- Not supported on bare metal servers with a `cpu.architecture` of `amd64`.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- interface_type: str,
- *,
- allow_ip_spoofing: bool = None,
- enable_infrastructure_nat: bool = None,
- name: str = None,
- primary_ip: 'NetworkInterfaceIPPrototype' = None,
- security_groups: List['SecurityGroupIdentity'] = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ interface_type: str,
+ *,
+ allow_ip_spoofing: bool = None,
+ enable_infrastructure_nat: bool = None,
+ name: str = None,
+ primary_ip: 'NetworkInterfaceIPPrototype' = None,
+ security_groups: List['SecurityGroupIdentity'] = None,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype object.
@@ -71661,9 +76474,11 @@ class InterfaceTypeEnum(str, Enum):
within a `s390x` based system.
- Not supported on bare metal servers with a `cpu.architecture` of `amd64`.
"""
+
HIPERSOCKET = 'hipersocket'
+
class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype(BareMetalServerNetworkInterfacePrototype):
"""
BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype.
@@ -71704,16 +76519,18 @@ class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByP
- Not supported on bare metal servers with a `cpu.architecture` of `s390x`.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- interface_type: str,
- *,
- allow_ip_spoofing: bool = None,
- enable_infrastructure_nat: bool = None,
- name: str = None,
- primary_ip: 'NetworkInterfaceIPPrototype' = None,
- security_groups: List['SecurityGroupIdentity'] = None,
- allowed_vlans: List[int] = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ interface_type: str,
+ *,
+ allow_ip_spoofing: bool = None,
+ enable_infrastructure_nat: bool = None,
+ name: str = None,
+ primary_ip: 'NetworkInterfaceIPPrototype' = None,
+ security_groups: List['SecurityGroupIdentity'] = None,
+ allowed_vlans: List[int] = None,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype object.
@@ -71858,9 +76675,11 @@ class InterfaceTypeEnum(str, Enum):
- Cannot directly use an IEEE 802.1q VLAN tag.
- Not supported on bare metal servers with a `cpu.architecture` of `s390x`.
"""
+
PCI = 'pci'
+
class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype(BareMetalServerNetworkInterfacePrototype):
"""
BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype.
@@ -71906,17 +76725,19 @@ class BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByV
traffic on this interface.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- interface_type: str,
- vlan: int,
- *,
- allow_ip_spoofing: bool = None,
- enable_infrastructure_nat: bool = None,
- name: str = None,
- primary_ip: 'NetworkInterfaceIPPrototype' = None,
- security_groups: List['SecurityGroupIdentity'] = None,
- allow_interface_to_float: bool = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ interface_type: str,
+ vlan: int,
+ *,
+ allow_ip_spoofing: bool = None,
+ enable_infrastructure_nat: bool = None,
+ name: str = None,
+ primary_ip: 'NetworkInterfaceIPPrototype' = None,
+ security_groups: List['SecurityGroupIdentity'] = None,
+ allow_interface_to_float: bool = None,
+ ) -> None:
"""
Initialize a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype object.
@@ -72073,9 +76894,11 @@ class InterfaceTypeEnum(str, Enum):
which traffic flows.
- Not supported on bare metal servers with a `cpu.architecture` of `s390x`.
"""
+
VLAN = 'vlan'
+
class BareMetalServerProfileBandwidthDependent(BareMetalServerProfileBandwidth):
"""
The total bandwidth shared across the network interfaces of a bare metal server with
@@ -72084,8 +76907,10 @@ class BareMetalServerProfileBandwidthDependent(BareMetalServerProfileBandwidth):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileBandwidthDependent object.
@@ -72138,9 +76963,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class BareMetalServerProfileBandwidthEnum(BareMetalServerProfileBandwidth):
"""
The permitted total bandwidth values (in megabits per second) shared across the
@@ -72151,10 +76978,12 @@ class BareMetalServerProfileBandwidthEnum(BareMetalServerProfileBandwidth):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a BareMetalServerProfileBandwidthEnum object.
@@ -72223,9 +77052,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class BareMetalServerProfileBandwidthFixed(BareMetalServerProfileBandwidth):
"""
The total bandwidth (in megabits per second) shared across the network interfaces of a
@@ -72235,9 +77066,11 @@ class BareMetalServerProfileBandwidthFixed(BareMetalServerProfileBandwidth):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a BareMetalServerProfileBandwidthFixed object.
@@ -72298,9 +77131,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class BareMetalServerProfileBandwidthRange(BareMetalServerProfileBandwidth):
"""
The permitted total bandwidth range (in megabits per second) shared across the network
@@ -72313,12 +77148,14 @@ class BareMetalServerProfileBandwidthRange(BareMetalServerProfileBandwidth):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileBandwidthRange object.
@@ -72403,9 +77240,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class BareMetalServerProfileCPUCoreCountDependent(BareMetalServerProfileCPUCoreCount):
"""
The CPU core count for a bare metal server with this profile depends on its
@@ -72414,8 +77253,10 @@ class BareMetalServerProfileCPUCoreCountDependent(BareMetalServerProfileCPUCoreC
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUCoreCountDependent object.
@@ -72468,9 +77309,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class BareMetalServerProfileCPUCoreCountEnum(BareMetalServerProfileCPUCoreCount):
"""
The permitted values for CPU cores for a bare metal server with this profile.
@@ -72480,10 +77323,12 @@ class BareMetalServerProfileCPUCoreCountEnum(BareMetalServerProfileCPUCoreCount)
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUCoreCountEnum object.
@@ -72552,9 +77397,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class BareMetalServerProfileCPUCoreCountFixed(BareMetalServerProfileCPUCoreCount):
"""
The CPU core count for a bare metal server with this profile.
@@ -72563,9 +77410,11 @@ class BareMetalServerProfileCPUCoreCountFixed(BareMetalServerProfileCPUCoreCount
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUCoreCountFixed object.
@@ -72626,9 +77475,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class BareMetalServerProfileCPUCoreCountRange(BareMetalServerProfileCPUCoreCount):
"""
The permitted range for the number of CPU cores for a bare metal server with this
@@ -72641,12 +77492,14 @@ class BareMetalServerProfileCPUCoreCountRange(BareMetalServerProfileCPUCoreCount
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUCoreCountRange object.
@@ -72731,9 +77584,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class BareMetalServerProfileCPUSocketCountDependent(BareMetalServerProfileCPUSocketCount):
"""
The CPU socket count for a bare metal server with this profile depends on its
@@ -72742,8 +77597,10 @@ class BareMetalServerProfileCPUSocketCountDependent(BareMetalServerProfileCPUSoc
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUSocketCountDependent object.
@@ -72796,9 +77653,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class BareMetalServerProfileCPUSocketCountEnum(BareMetalServerProfileCPUSocketCount):
"""
The permitted values for CPU sockets for a bare metal server with this profile.
@@ -72808,10 +77667,12 @@ class BareMetalServerProfileCPUSocketCountEnum(BareMetalServerProfileCPUSocketCo
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUSocketCountEnum object.
@@ -72880,9 +77741,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class BareMetalServerProfileCPUSocketCountFixed(BareMetalServerProfileCPUSocketCount):
"""
The number of CPU sockets for a bare metal server with this profile.
@@ -72891,9 +77754,11 @@ class BareMetalServerProfileCPUSocketCountFixed(BareMetalServerProfileCPUSocketC
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUSocketCountFixed object.
@@ -72954,9 +77819,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class BareMetalServerProfileCPUSocketCountRange(BareMetalServerProfileCPUSocketCount):
"""
The permitted range for the number of CPU sockets for a bare metal server with this
@@ -72969,12 +77836,14 @@ class BareMetalServerProfileCPUSocketCountRange(BareMetalServerProfileCPUSocketC
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileCPUSocketCountRange object.
@@ -73059,9 +77928,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class BareMetalServerProfileDiskQuantityDependent(BareMetalServerProfileDiskQuantity):
"""
The number of disks of this configuration for a bare metal server with this profile
@@ -73070,8 +77941,10 @@ class BareMetalServerProfileDiskQuantityDependent(BareMetalServerProfileDiskQuan
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskQuantityDependent object.
@@ -73124,9 +77997,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class BareMetalServerProfileDiskQuantityEnum(BareMetalServerProfileDiskQuantity):
"""
The permitted the number of disks of this configuration for a bare metal server with
@@ -73137,10 +78012,12 @@ class BareMetalServerProfileDiskQuantityEnum(BareMetalServerProfileDiskQuantity)
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskQuantityEnum object.
@@ -73209,9 +78086,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class BareMetalServerProfileDiskQuantityFixed(BareMetalServerProfileDiskQuantity):
"""
The number of disks of this configuration for a bare metal server with this profile.
@@ -73220,9 +78099,11 @@ class BareMetalServerProfileDiskQuantityFixed(BareMetalServerProfileDiskQuantity
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskQuantityFixed object.
@@ -73283,9 +78164,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class BareMetalServerProfileDiskQuantityRange(BareMetalServerProfileDiskQuantity):
"""
The permitted range for the number of disks of this configuration for a bare metal
@@ -73298,12 +78181,14 @@ class BareMetalServerProfileDiskQuantityRange(BareMetalServerProfileDiskQuantity
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskQuantityRange object.
@@ -73388,9 +78273,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class BareMetalServerProfileDiskSizeDependent(BareMetalServerProfileDiskSize):
"""
The disk size in GB (gigabytes) of this configuration for a bare metal server with
@@ -73399,8 +78286,10 @@ class BareMetalServerProfileDiskSizeDependent(BareMetalServerProfileDiskSize):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskSizeDependent object.
@@ -73453,9 +78342,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class BareMetalServerProfileDiskSizeEnum(BareMetalServerProfileDiskSize):
"""
The permitted disk size in GB (gigabytes) of this configuration for a bare metal
@@ -73466,10 +78357,12 @@ class BareMetalServerProfileDiskSizeEnum(BareMetalServerProfileDiskSize):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskSizeEnum object.
@@ -73538,9 +78431,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class BareMetalServerProfileDiskSizeFixed(BareMetalServerProfileDiskSize):
"""
The size of the disk in GB (gigabytes).
@@ -73549,9 +78444,11 @@ class BareMetalServerProfileDiskSizeFixed(BareMetalServerProfileDiskSize):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskSizeFixed object.
@@ -73612,9 +78509,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class BareMetalServerProfileDiskSizeRange(BareMetalServerProfileDiskSize):
"""
The permitted range for the disk size of this configuration in GB (gigabytes) for a
@@ -73627,12 +78526,14 @@ class BareMetalServerProfileDiskSizeRange(BareMetalServerProfileDiskSize):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileDiskSizeRange object.
@@ -73717,9 +78618,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class BareMetalServerProfileIdentityByHref(BareMetalServerProfileIdentity):
"""
BareMetalServerProfileIdentityByHref.
@@ -73727,8 +78630,10 @@ class BareMetalServerProfileIdentityByHref(BareMetalServerProfileIdentity):
:attr str href: The URL for this bare metal server profile.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileIdentityByHref object.
@@ -73777,6 +78682,7 @@ def __ne__(self, other: 'BareMetalServerProfileIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class BareMetalServerProfileIdentityByName(BareMetalServerProfileIdentity):
"""
BareMetalServerProfileIdentityByName.
@@ -73784,8 +78690,10 @@ class BareMetalServerProfileIdentityByName(BareMetalServerProfileIdentity):
:attr str name: The name for this bare metal server profile.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileIdentityByName object.
@@ -73834,6 +78742,7 @@ def __ne__(self, other: 'BareMetalServerProfileIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class BareMetalServerProfileMemoryDependent(BareMetalServerProfileMemory):
"""
The memory value for a bare metal server with this profile depends on its
@@ -73842,8 +78751,10 @@ class BareMetalServerProfileMemoryDependent(BareMetalServerProfileMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileMemoryDependent object.
@@ -73896,9 +78807,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class BareMetalServerProfileMemoryEnum(BareMetalServerProfileMemory):
"""
The permitted memory values (in gibibytes) for a bare metal server with this profile.
@@ -73908,10 +78821,12 @@ class BareMetalServerProfileMemoryEnum(BareMetalServerProfileMemory):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a BareMetalServerProfileMemoryEnum object.
@@ -73980,9 +78895,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class BareMetalServerProfileMemoryFixed(BareMetalServerProfileMemory):
"""
The memory (in gibibytes) for a bare metal server with this profile.
@@ -73991,9 +78908,11 @@ class BareMetalServerProfileMemoryFixed(BareMetalServerProfileMemory):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a BareMetalServerProfileMemoryFixed object.
@@ -74054,9 +78973,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class BareMetalServerProfileMemoryRange(BareMetalServerProfileMemory):
"""
The permitted memory range (in gibibytes) for a bare metal server with this profile.
@@ -74068,12 +78989,14 @@ class BareMetalServerProfileMemoryRange(BareMetalServerProfileMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a BareMetalServerProfileMemoryRange object.
@@ -74158,9 +79081,165 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
+class BareMetalServerProfileNetworkInterfaceCountDependent(BareMetalServerProfileNetworkInterfaceCount):
+ """
+ The number of network interfaces supported on a bare metal server with this profile is
+ dependent on its configuration.
+
+ :attr str type: The type for this profile field.
+ """
+
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
+ """
+ Initialize a BareMetalServerProfileNetworkInterfaceCountDependent object.
+
+ :param str type: The type for this profile field.
+ """
+ # pylint: disable=super-init-not-called
+ self.type = type
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountDependent':
+ """Initialize a BareMetalServerProfileNetworkInterfaceCountDependent object from a json dictionary."""
+ args = {}
+ if 'type' in _dict:
+ args['type'] = _dict.get('type')
+ else:
+ raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkInterfaceCountDependent JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a BareMetalServerProfileNetworkInterfaceCountDependent 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
+ 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 BareMetalServerProfileNetworkInterfaceCountDependent object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'BareMetalServerProfileNetworkInterfaceCountDependent') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'BareMetalServerProfileNetworkInterfaceCountDependent') -> bool:
+ """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.
+ """
+
+ DEPENDENT = 'dependent'
+
+
+
+class BareMetalServerProfileNetworkInterfaceCountRange(BareMetalServerProfileNetworkInterfaceCount):
+ """
+ The number of network interfaces supported on a bare metal server with this profile.
+
+ :attr int max: (optional) The maximum value for this profile field.
+ :attr int min: (optional) The minimum value for this profile field.
+ :attr str type: The type for this profile field.
+ """
+
+ def __init__(
+ self,
+ type: str,
+ *,
+ max: int = None,
+ min: int = None,
+ ) -> None:
+ """
+ Initialize a BareMetalServerProfileNetworkInterfaceCountRange object.
+
+ :param str type: The type for this profile field.
+ :param int max: (optional) The maximum value for this profile field.
+ :param int min: (optional) The minimum value for this profile field.
+ """
+ # pylint: disable=super-init-not-called
+ self.max = max
+ self.min = min
+ self.type = type
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'BareMetalServerProfileNetworkInterfaceCountRange':
+ """Initialize a BareMetalServerProfileNetworkInterfaceCountRange object from a json dictionary."""
+ args = {}
+ if 'max' in _dict:
+ args['max'] = _dict.get('max')
+ if 'min' in _dict:
+ args['min'] = _dict.get('min')
+ if 'type' in _dict:
+ args['type'] = _dict.get('type')
+ else:
+ raise ValueError('Required property \'type\' not present in BareMetalServerProfileNetworkInterfaceCountRange JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a BareMetalServerProfileNetworkInterfaceCountRange 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, 'max') and self.max is not None:
+ _dict['max'] = self.max
+ if hasattr(self, 'min') and self.min is not None:
+ _dict['min'] = self.min
+ if hasattr(self, 'type') and self.type is not None:
+ _dict['type'] = self.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 BareMetalServerProfileNetworkInterfaceCountRange object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'BareMetalServerProfileNetworkInterfaceCountRange') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'BareMetalServerProfileNetworkInterfaceCountRange') -> bool:
+ """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.
+ """
+
+ RANGE = 'range'
+
+
+
class CatalogOfferingIdentityCatalogOfferingByCRN(CatalogOfferingIdentity):
"""
CatalogOfferingIdentityCatalogOfferingByCRN.
@@ -74170,8 +79249,10 @@ class CatalogOfferingIdentityCatalogOfferingByCRN(CatalogOfferingIdentity):
offering.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a CatalogOfferingIdentityCatalogOfferingByCRN object.
@@ -74222,6 +79303,7 @@ def __ne__(self, other: 'CatalogOfferingIdentityCatalogOfferingByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(CatalogOfferingVersionIdentity):
"""
CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN.
@@ -74231,8 +79313,10 @@ class CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(CatalogOfferingV
offering.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN object.
@@ -74283,6 +79367,7 @@ def __ne__(self, other: 'CatalogOfferingVersionIdentityCatalogOfferingVersionByC
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class CertificateInstanceIdentityByCRN(CertificateInstanceIdentity):
"""
CertificateInstanceIdentityByCRN.
@@ -74290,8 +79375,10 @@ class CertificateInstanceIdentityByCRN(CertificateInstanceIdentity):
:attr str crn: The CRN for this certificate instance.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a CertificateInstanceIdentityByCRN object.
@@ -74340,6 +79427,128 @@ def __ne__(self, other: 'CertificateInstanceIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
+class CloudObjectStorageBucketIdentityByCRN(CloudObjectStorageBucketIdentity):
+ """
+ CloudObjectStorageBucketIdentityByCRN.
+
+ :attr str crn: The CRN of this Cloud Object Storage bucket.
+ """
+
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
+ """
+ Initialize a CloudObjectStorageBucketIdentityByCRN object.
+
+ :param str crn: The CRN of this Cloud Object Storage bucket.
+ """
+ # pylint: disable=super-init-not-called
+ self.crn = crn
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketIdentityByCRN':
+ """Initialize a CloudObjectStorageBucketIdentityByCRN object from a json dictionary."""
+ args = {}
+ if 'crn' in _dict:
+ args['crn'] = _dict.get('crn')
+ else:
+ raise ValueError('Required property \'crn\' not present in CloudObjectStorageBucketIdentityByCRN JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a CloudObjectStorageBucketIdentityByCRN 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 CloudObjectStorageBucketIdentityByCRN object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'CloudObjectStorageBucketIdentityByCRN') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'CloudObjectStorageBucketIdentityByCRN') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(CloudObjectStorageBucketIdentity):
+ """
+ CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.
+
+ :attr str name: The globally unique name of this Cloud Object Storage bucket.
+ """
+
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
+ """
+ Initialize a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object.
+
+ :param str name: The globally unique name of this Cloud Object Storage
+ bucket.
+ """
+ # pylint: disable=super-init-not-called
+ self.name = name
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName':
+ """Initialize a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object from a json dictionary."""
+ args = {}
+ if 'name' in _dict:
+ args['name'] = _dict.get('name')
+ else:
+ raise ValueError('Required property \'name\' not present in CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object from a json dictionary."""
+ return cls.from_dict(_dict)
+
+ def to_dict(self) -> Dict:
+ """Return a json dictionary representing this model."""
+ _dict = {}
+ if hasattr(self, 'name') and self.name is not None:
+ _dict['name'] = self.name
+ 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 CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
class DNSInstanceIdentityByCRN(DNSInstanceIdentity):
"""
DNSInstanceIdentityByCRN.
@@ -74347,8 +79556,10 @@ class DNSInstanceIdentityByCRN(DNSInstanceIdentity):
:attr str crn: The CRN for this DNS instance.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a DNSInstanceIdentityByCRN object.
@@ -74397,6 +79608,7 @@ def __ne__(self, other: 'DNSInstanceIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DNSZoneIdentityById(DNSZoneIdentity):
"""
DNSZoneIdentityById.
@@ -74404,8 +79616,10 @@ class DNSZoneIdentityById(DNSZoneIdentity):
:attr str id:
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a DNSZoneIdentityById object.
@@ -74454,6 +79668,7 @@ def __ne__(self, other: 'DNSZoneIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostGroupIdentityByCRN(DedicatedHostGroupIdentity):
"""
DedicatedHostGroupIdentityByCRN.
@@ -74461,8 +79676,10 @@ class DedicatedHostGroupIdentityByCRN(DedicatedHostGroupIdentity):
:attr str crn: The CRN for this dedicated host group.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a DedicatedHostGroupIdentityByCRN object.
@@ -74511,6 +79728,7 @@ def __ne__(self, other: 'DedicatedHostGroupIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostGroupIdentityByHref(DedicatedHostGroupIdentity):
"""
DedicatedHostGroupIdentityByHref.
@@ -74518,8 +79736,10 @@ class DedicatedHostGroupIdentityByHref(DedicatedHostGroupIdentity):
:attr str href: The URL for this dedicated host group.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostGroupIdentityByHref object.
@@ -74568,6 +79788,7 @@ def __ne__(self, other: 'DedicatedHostGroupIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostGroupIdentityById(DedicatedHostGroupIdentity):
"""
DedicatedHostGroupIdentityById.
@@ -74575,8 +79796,10 @@ class DedicatedHostGroupIdentityById(DedicatedHostGroupIdentity):
:attr str id: The unique identifier for this dedicated host group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a DedicatedHostGroupIdentityById object.
@@ -74625,6 +79848,7 @@ def __ne__(self, other: 'DedicatedHostGroupIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostProfileIdentityByHref(DedicatedHostProfileIdentity):
"""
DedicatedHostProfileIdentityByHref.
@@ -74632,8 +79856,10 @@ class DedicatedHostProfileIdentityByHref(DedicatedHostProfileIdentity):
:attr str href: The URL for this dedicated host profile.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileIdentityByHref object.
@@ -74682,6 +79908,7 @@ def __ne__(self, other: 'DedicatedHostProfileIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostProfileIdentityByName(DedicatedHostProfileIdentity):
"""
DedicatedHostProfileIdentityByName.
@@ -74689,8 +79916,10 @@ class DedicatedHostProfileIdentityByName(DedicatedHostProfileIdentity):
:attr str name: The globally unique name for this dedicated host profile.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileIdentityByName object.
@@ -74739,6 +79968,7 @@ def __ne__(self, other: 'DedicatedHostProfileIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostProfileMemoryDependent(DedicatedHostProfileMemory):
"""
The memory value for a dedicated host with this profile depends on its configuration.
@@ -74746,8 +79976,10 @@ class DedicatedHostProfileMemoryDependent(DedicatedHostProfileMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileMemoryDependent object.
@@ -74800,9 +80032,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class DedicatedHostProfileMemoryEnum(DedicatedHostProfileMemory):
"""
The permitted memory values (in gibibytes) for a dedicated host with this profile.
@@ -74812,10 +80046,12 @@ class DedicatedHostProfileMemoryEnum(DedicatedHostProfileMemory):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a DedicatedHostProfileMemoryEnum object.
@@ -74884,9 +80120,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class DedicatedHostProfileMemoryFixed(DedicatedHostProfileMemory):
"""
The memory (in gibibytes) for a dedicated host with this profile.
@@ -74895,9 +80133,11 @@ class DedicatedHostProfileMemoryFixed(DedicatedHostProfileMemory):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a DedicatedHostProfileMemoryFixed object.
@@ -74958,9 +80198,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class DedicatedHostProfileMemoryRange(DedicatedHostProfileMemory):
"""
The permitted memory range (in gibibytes) for a dedicated host with this profile.
@@ -74972,12 +80214,14 @@ class DedicatedHostProfileMemoryRange(DedicatedHostProfileMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileMemoryRange object.
@@ -75062,9 +80306,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class DedicatedHostProfileSocketDependent(DedicatedHostProfileSocket):
"""
The CPU socket count for a dedicated host with this profile depends on its
@@ -75073,8 +80319,10 @@ class DedicatedHostProfileSocketDependent(DedicatedHostProfileSocket):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileSocketDependent object.
@@ -75127,9 +80375,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class DedicatedHostProfileSocketEnum(DedicatedHostProfileSocket):
"""
The permitted values for CPU socket count for a dedicated host with this profile.
@@ -75139,10 +80389,12 @@ class DedicatedHostProfileSocketEnum(DedicatedHostProfileSocket):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a DedicatedHostProfileSocketEnum object.
@@ -75211,9 +80463,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class DedicatedHostProfileSocketFixed(DedicatedHostProfileSocket):
"""
The CPU socket count for a dedicated host with this profile.
@@ -75222,9 +80476,11 @@ class DedicatedHostProfileSocketFixed(DedicatedHostProfileSocket):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a DedicatedHostProfileSocketFixed object.
@@ -75285,9 +80541,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class DedicatedHostProfileSocketRange(DedicatedHostProfileSocket):
"""
The permitted range for CPU socket count for a dedicated host with this profile.
@@ -75299,12 +80557,14 @@ class DedicatedHostProfileSocketRange(DedicatedHostProfileSocket):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileSocketRange object.
@@ -75389,9 +80649,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class DedicatedHostProfileVCPUDependent(DedicatedHostProfileVCPU):
"""
The VCPU count for a dedicated host with this profile depends on its configuration.
@@ -75399,8 +80661,10 @@ class DedicatedHostProfileVCPUDependent(DedicatedHostProfileVCPU):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPUDependent object.
@@ -75453,9 +80717,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class DedicatedHostProfileVCPUEnum(DedicatedHostProfileVCPU):
"""
The permitted values for VCPU count for a dedicated host with this profile.
@@ -75465,10 +80731,12 @@ class DedicatedHostProfileVCPUEnum(DedicatedHostProfileVCPU):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPUEnum object.
@@ -75537,9 +80805,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class DedicatedHostProfileVCPUFixed(DedicatedHostProfileVCPU):
"""
The VCPU count for a dedicated host with this profile.
@@ -75548,9 +80818,11 @@ class DedicatedHostProfileVCPUFixed(DedicatedHostProfileVCPU):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPUFixed object.
@@ -75611,9 +80883,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class DedicatedHostProfileVCPURange(DedicatedHostProfileVCPU):
"""
The permitted range for VCPU count for a dedicated host with this profile.
@@ -75625,12 +80899,14 @@ class DedicatedHostProfileVCPURange(DedicatedHostProfileVCPU):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a DedicatedHostProfileVCPURange object.
@@ -75715,9 +80991,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class DedicatedHostPrototypeDedicatedHostByGroup(DedicatedHostPrototype):
"""
DedicatedHostPrototypeDedicatedHostByGroup.
@@ -75735,13 +81013,15 @@ class DedicatedHostPrototypeDedicatedHostByGroup(DedicatedHostPrototype):
dedicated host.
"""
- def __init__(self,
- profile: 'DedicatedHostProfileIdentity',
- group: 'DedicatedHostGroupIdentity',
- *,
- instance_placement_enabled: bool = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ profile: 'DedicatedHostProfileIdentity',
+ group: 'DedicatedHostGroupIdentity',
+ *,
+ instance_placement_enabled: bool = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a DedicatedHostPrototypeDedicatedHostByGroup object.
@@ -75831,6 +81111,7 @@ def __ne__(self, other: 'DedicatedHostPrototypeDedicatedHostByGroup') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class DedicatedHostPrototypeDedicatedHostByZone(DedicatedHostPrototype):
"""
DedicatedHostPrototypeDedicatedHostByZone.
@@ -75848,14 +81129,16 @@ class DedicatedHostPrototypeDedicatedHostByZone(DedicatedHostPrototype):
:attr ZoneIdentity zone: The zone this dedicated host will reside in.
"""
- def __init__(self,
- profile: 'DedicatedHostProfileIdentity',
- zone: 'ZoneIdentity',
- *,
- instance_placement_enabled: bool = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- group: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext' = None) -> None:
+ def __init__(
+ self,
+ profile: 'DedicatedHostProfileIdentity',
+ zone: 'ZoneIdentity',
+ *,
+ instance_placement_enabled: bool = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ group: 'DedicatedHostGroupPrototypeDedicatedHostByZoneContext' = None,
+ ) -> None:
"""
Initialize a DedicatedHostPrototypeDedicatedHostByZone object.
@@ -75954,6 +81237,7 @@ def __ne__(self, other: 'DedicatedHostPrototypeDedicatedHostByZone') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class EncryptionKeyIdentityByCRN(EncryptionKeyIdentity):
"""
EncryptionKeyIdentityByCRN.
@@ -75965,8 +81249,10 @@ class EncryptionKeyIdentityByCRN(EncryptionKeyIdentity):
resource.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a EncryptionKeyIdentityByCRN object.
@@ -76019,22 +81305,27 @@ def __ne__(self, other: 'EncryptionKeyIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class EndpointGatewayReservedIPReservedIPIdentity(EndpointGatewayReservedIP):
"""
Identifies a reserved IP by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a EndpointGatewayReservedIPReservedIPIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById', 'EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref']))
+ ", ".join(['EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById', 'EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref'])
+ )
raise Exception(msg)
+
class EndpointGatewayReservedIPReservedIPPrototypeTargetContext(EndpointGatewayReservedIP):
"""
EndpointGatewayReservedIPReservedIPPrototypeTargetContext.
@@ -76053,12 +81344,14 @@ class EndpointGatewayReservedIPReservedIPPrototypeTargetContext(EndpointGatewayR
:attr SubnetIdentity subnet: The subnet in which to create this reserved IP.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- *,
- address: str = None,
- auto_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ *,
+ address: str = None,
+ auto_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a EndpointGatewayReservedIPReservedIPPrototypeTargetContext object.
@@ -76137,6 +81430,7 @@ def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPPrototypeTargetConte
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class EndpointGatewayTargetPrototypeProviderCloudServiceIdentity(EndpointGatewayTargetPrototype):
"""
EndpointGatewayTargetPrototypeProviderCloudServiceIdentity.
@@ -76144,8 +81438,10 @@ class EndpointGatewayTargetPrototypeProviderCloudServiceIdentity(EndpointGateway
:attr str resource_type: The type of target for this endpoint gateway.
"""
- def __init__(self,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ resource_type: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetPrototypeProviderCloudServiceIdentity object.
@@ -76153,17 +81449,20 @@ def __init__(self,
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN']))
+ ", ".join(['EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN'])
+ )
raise Exception(msg)
class ResourceTypeEnum(str, Enum):
"""
The type of target for this endpoint gateway.
"""
+
PROVIDER_CLOUD_SERVICE = 'provider_cloud_service'
PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
+
class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity(EndpointGatewayTargetPrototype):
"""
EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity.
@@ -76171,8 +81470,10 @@ class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity(Endpoi
:attr str resource_type: The type of target for this endpoint gateway.
"""
- def __init__(self,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ resource_type: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity object.
@@ -76180,17 +81481,20 @@ def __init__(self,
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName']))
+ ", ".join(['EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName'])
+ )
raise Exception(msg)
class ResourceTypeEnum(str, Enum):
"""
The type of target for this endpoint gateway.
"""
+
PROVIDER_CLOUD_SERVICE = 'provider_cloud_service'
PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
+
class EndpointGatewayTargetProviderCloudServiceReference(EndpointGatewayTarget):
"""
EndpointGatewayTargetProviderCloudServiceReference.
@@ -76200,9 +81504,11 @@ class EndpointGatewayTargetProviderCloudServiceReference(EndpointGatewayTarget):
:attr str resource_type: The type of target.
"""
- def __init__(self,
- crn: str,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ resource_type: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetProviderCloudServiceReference object.
@@ -76264,9 +81570,11 @@ class ResourceTypeEnum(str, Enum):
"""
The type of target.
"""
+
PROVIDER_CLOUD_SERVICE = 'provider_cloud_service'
+
class EndpointGatewayTargetProviderInfrastructureServiceReference(EndpointGatewayTarget):
"""
The name of this provider infrastructure service.
@@ -76276,9 +81584,11 @@ class EndpointGatewayTargetProviderInfrastructureServiceReference(EndpointGatewa
:attr str resource_type: The type of target.
"""
- def __init__(self,
- name: str,
- resource_type: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ resource_type: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetProviderInfrastructureServiceReference object.
@@ -76340,122 +81650,10 @@ class ResourceTypeEnum(str, Enum):
"""
The type of target.
"""
- PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
-
-
-class FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FloatingIPByTargetNetworkInterfaceIdentity):
- """
- FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.
-
- :attr str href: The URL for this network interface.
- """
-
- def __init__(self,
- href: str) -> None:
- """
- Initialize a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.
-
- :param str href: The URL for this network interface.
- """
- # pylint: disable=super-init-not-called
- self.href = href
-
- @classmethod
- def from_dict(cls, _dict: Dict) -> 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref':
- """Initialize a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
- args = {}
- if 'href' in _dict:
- args['href'] = _dict.get('href')
- else:
- raise ValueError('Required property \'href\' not present in FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON')
- return cls(**args)
-
- @classmethod
- def _from_dict(cls, _dict):
- """Initialize a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref 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 FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object."""
- return json.dumps(self.to_dict(), indent=2)
-
- def __eq__(self, other: 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
- """Return `true` when self and other are equal, false otherwise."""
- if not isinstance(other, self.__class__):
- return False
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other: 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
- """Return `true` when self and other are not equal, false otherwise."""
- return not self == other
-
-class FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPByTargetNetworkInterfaceIdentity):
- """
- FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById.
-
- :attr str id: The unique identifier for this network interface.
- """
-
- def __init__(self,
- id: str) -> None:
- """
- Initialize a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById object.
-
- :param str id: The unique identifier for this network interface.
- """
- # pylint: disable=super-init-not-called
- self.id = id
- @classmethod
- def from_dict(cls, _dict: Dict) -> 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById':
- """Initialize a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
- args = {}
- if 'id' in _dict:
- args['id'] = _dict.get('id')
- else:
- raise ValueError('Required property \'id\' not present in FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON')
- return cls(**args)
-
- @classmethod
- def _from_dict(cls, _dict):
- """Initialize a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById 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()
+ PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
- def __str__(self) -> str:
- """Return a `str` version of this FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById object."""
- return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
- """Return `true` when self and other are equal, false otherwise."""
- if not isinstance(other, self.__class__):
- return False
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other: 'FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
- """Return `true` when self and other are not equal, false otherwise."""
- return not self == other
class FloatingIPPrototypeFloatingIPByTarget(FloatingIPPrototype):
"""
@@ -76465,20 +81663,34 @@ class FloatingIPPrototypeFloatingIPByTarget(FloatingIPPrototype):
used by another floating IP in the region. If unspecified, the name will be a
hyphenated list of randomly-selected words.
:attr ResourceGroupIdentity resource_group: (optional)
- :attr FloatingIPByTargetNetworkInterfaceIdentity target: The network interface
- this floating IP is to be bound to.
- """
-
- def __init__(self,
- target: 'FloatingIPByTargetNetworkInterfaceIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ :attr FloatingIPTargetPrototype target: The target resource to bind this
+ floating IP to.
+ The target resource must not already have a floating IP bound to it if the
+ target
+ resource is:
+ - an instance network interface
+ - a bare metal server network interface with `enable_infrastructure_nat` set to
+ `true`.
+ """
+
+ def __init__(
+ self,
+ target: 'FloatingIPTargetPrototype',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a FloatingIPPrototypeFloatingIPByTarget object.
- :param FloatingIPByTargetNetworkInterfaceIdentity target: The network
- interface this floating IP is to be bound to.
+ :param FloatingIPTargetPrototype target: The target resource to bind this
+ floating IP to.
+ The target resource must not already have a floating IP bound to it if the
+ target
+ resource is:
+ - an instance network interface
+ - a bare metal server network interface with `enable_infrastructure_nat`
+ set to `true`.
:param str name: (optional) The name for this floating IP. The name must
not be used by another floating IP in the region. If unspecified, the name
will be a hyphenated list of randomly-selected words.
@@ -76543,6 +81755,7 @@ def __ne__(self, other: 'FloatingIPPrototypeFloatingIPByTarget') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FloatingIPPrototypeFloatingIPByZone(FloatingIPPrototype):
"""
FloatingIPPrototypeFloatingIPByZone.
@@ -76554,11 +81767,13 @@ class FloatingIPPrototypeFloatingIPByZone(FloatingIPPrototype):
:attr ZoneIdentity zone: The zone this floating IP will reside in.
"""
- def __init__(self,
- zone: 'ZoneIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ zone: 'ZoneIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a FloatingIPPrototypeFloatingIPByZone object.
@@ -76627,119 +81842,46 @@ def __ne__(self, other: 'FloatingIPPrototypeFloatingIPByZone') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FloatingIPTargetPatchNetworkInterfaceIdentityByHref(FloatingIPTargetPatch):
+
+class FloatingIPTargetPatchNetworkInterfaceIdentity(FloatingIPTargetPatch):
"""
- FloatingIPTargetPatchNetworkInterfaceIdentityByHref.
+ Identifies a network interface by a unique property.
- :attr str href: The URL for this network interface.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
- Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityByHref object.
+ Initialize a FloatingIPTargetPatchNetworkInterfaceIdentity object.
- :param str href: The URL for this network interface.
"""
# pylint: disable=super-init-not-called
- self.href = href
-
- @classmethod
- def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityByHref':
- """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityByHref object from a json dictionary."""
- args = {}
- if 'href' in _dict:
- args['href'] = _dict.get('href')
- else:
- raise ValueError('Required property \'href\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityByHref JSON')
- return cls(**args)
-
- @classmethod
- def _from_dict(cls, _dict):
- """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityByHref 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 FloatingIPTargetPatchNetworkInterfaceIdentityByHref object."""
- return json.dumps(self.to_dict(), indent=2)
-
- def __eq__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityByHref') -> bool:
- """Return `true` when self and other are equal, false otherwise."""
- if not isinstance(other, self.__class__):
- return False
- return self.__dict__ == other.__dict__
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref'])
+ )
+ raise Exception(msg)
- def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityByHref') -> bool:
- """Return `true` when self and other are not equal, false otherwise."""
- return not self == other
-class FloatingIPTargetPatchNetworkInterfaceIdentityById(FloatingIPTargetPatch):
+class FloatingIPTargetPrototypeNetworkInterfaceIdentity(FloatingIPTargetPrototype):
"""
- FloatingIPTargetPatchNetworkInterfaceIdentityById.
+ Identifies a network interface by a unique property.
- :attr str id: The unique identifier for this network interface.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
- Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityById object.
+ Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentity object.
- :param str id: The unique identifier for this network interface.
"""
# pylint: disable=super-init-not-called
- self.id = id
-
- @classmethod
- def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityById':
- """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityById object from a json dictionary."""
- args = {}
- if 'id' in _dict:
- args['id'] = _dict.get('id')
- else:
- raise ValueError('Required property \'id\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityById JSON')
- return cls(**args)
-
- @classmethod
- def _from_dict(cls, _dict):
- """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityById 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 FloatingIPTargetPatchNetworkInterfaceIdentityById object."""
- return json.dumps(self.to_dict(), indent=2)
-
- def __eq__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityById') -> bool:
- """Return `true` when self and other are equal, false otherwise."""
- if not isinstance(other, self.__class__):
- return False
- return self.__dict__ == other.__dict__
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref'])
+ )
+ raise Exception(msg)
- def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityById') -> bool:
- """Return `true` when self and other are not equal, false otherwise."""
- return not self == other
class FloatingIPTargetNetworkInterfaceReference(FloatingIPTarget):
"""
@@ -76755,14 +81897,16 @@ class FloatingIPTargetNetworkInterfaceReference(FloatingIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- primary_ip: 'ReservedIPReference',
- resource_type: str,
- *,
- deleted: 'NetworkInterfaceReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ primary_ip: 'ReservedIPReference',
+ resource_type: str,
+ *,
+ deleted: 'NetworkInterfaceReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a FloatingIPTargetNetworkInterfaceReference object.
@@ -76862,9 +82006,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
+
class FloatingIPTargetPublicGatewayReference(FloatingIPTarget):
"""
FloatingIPTargetPublicGatewayReference.
@@ -76880,14 +82026,16 @@ class FloatingIPTargetPublicGatewayReference(FloatingIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'PublicGatewayReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'PublicGatewayReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a FloatingIPTargetPublicGatewayReference object.
@@ -76984,73 +82132,91 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
PUBLIC_GATEWAY = 'public_gateway'
+
class FlowLogCollectorTargetPrototypeInstanceIdentity(FlowLogCollectorTargetPrototype):
"""
Identifies a virtual server instance by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeInstanceIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById', 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN', 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref']))
+ ", ".join(['FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById', 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN', 'FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref'])
+ )
raise Exception(msg)
+
class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity(FlowLogCollectorTargetPrototype):
"""
Identifies a network interface by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref']))
+ ", ".join(['FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById', 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref'])
+ )
raise Exception(msg)
+
class FlowLogCollectorTargetPrototypeSubnetIdentity(FlowLogCollectorTargetPrototype):
"""
Identifies a subnet by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeSubnetIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById', 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN', 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref']))
+ ", ".join(['FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById', 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN', 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref'])
+ )
raise Exception(msg)
+
class FlowLogCollectorTargetPrototypeVPCIdentity(FlowLogCollectorTargetPrototype):
"""
Identifies a VPC by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeVPCIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById', 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN', 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref']))
+ ", ".join(['FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById', 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN', 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref'])
+ )
raise Exception(msg)
+
class FlowLogCollectorTargetInstanceReference(FlowLogCollectorTarget):
"""
FlowLogCollectorTargetInstanceReference.
@@ -77065,13 +82231,15 @@ class FlowLogCollectorTargetInstanceReference(FlowLogCollectorTarget):
across all virtual server instances in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetInstanceReference object.
@@ -77156,6 +82324,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetInstanceReference') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(FlowLogCollectorTarget):
"""
FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.
@@ -77170,13 +82339,15 @@ class FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(FlowLogCollec
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'NetworkInterfaceReferenceTargetContextDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'NetworkInterfaceReferenceTargetContextDeleted' = None,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext object.
@@ -77265,9 +82436,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
+
class FlowLogCollectorTargetSubnetReference(FlowLogCollectorTarget):
"""
FlowLogCollectorTargetSubnetReference.
@@ -77283,14 +82456,16 @@ class FlowLogCollectorTargetSubnetReference(FlowLogCollectorTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'SubnetReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'SubnetReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetSubnetReference object.
@@ -77387,9 +82562,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
SUBNET = 'subnet'
+
class FlowLogCollectorTargetVPCReference(FlowLogCollectorTarget):
"""
FlowLogCollectorTargetVPCReference.
@@ -77405,14 +82582,16 @@ class FlowLogCollectorTargetVPCReference(FlowLogCollectorTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPCReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPCReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetVPCReference object.
@@ -77509,9 +82688,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPC = 'vpc'
+
class ImageIdentityByCRN(ImageIdentity):
"""
ImageIdentityByCRN.
@@ -77519,8 +82700,10 @@ class ImageIdentityByCRN(ImageIdentity):
:attr str crn: The CRN for this image.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a ImageIdentityByCRN object.
@@ -77569,6 +82752,7 @@ def __ne__(self, other: 'ImageIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ImageIdentityByHref(ImageIdentity):
"""
ImageIdentityByHref.
@@ -77576,8 +82760,10 @@ class ImageIdentityByHref(ImageIdentity):
:attr str href: The URL for this image.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ImageIdentityByHref object.
@@ -77626,6 +82812,7 @@ def __ne__(self, other: 'ImageIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ImageIdentityById(ImageIdentity):
"""
ImageIdentityById.
@@ -77633,8 +82820,10 @@ class ImageIdentityById(ImageIdentity):
:attr str id: The unique identifier for this image.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a ImageIdentityById object.
@@ -77683,6 +82872,7 @@ def __ne__(self, other: 'ImageIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ImagePrototypeImageByFile(ImagePrototype):
"""
ImagePrototypeImageByFile.
@@ -77716,14 +82906,16 @@ class ImagePrototypeImageByFile(ImagePrototype):
image.
"""
- def __init__(self,
- file: 'ImageFilePrototype',
- operating_system: 'OperatingSystemIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- encrypted_data_key: str = None,
- encryption_key: 'EncryptionKeyIdentity' = None) -> None:
+ def __init__(
+ self,
+ file: 'ImageFilePrototype',
+ operating_system: 'OperatingSystemIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ encrypted_data_key: str = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ ) -> None:
"""
Initialize a ImagePrototypeImageByFile object.
@@ -77837,6 +83029,7 @@ def __ne__(self, other: 'ImagePrototypeImageByFile') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ImagePrototypeImageBySourceVolume(ImagePrototype):
"""
ImagePrototypeImageBySourceVolume.
@@ -77857,12 +83050,14 @@ class ImagePrototypeImageBySourceVolume(ImagePrototype):
During image creation, the specified volume may briefly become `busy`.
"""
- def __init__(self,
- source_volume: 'VolumeIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- encryption_key: 'EncryptionKeyIdentity' = None) -> None:
+ def __init__(
+ self,
+ source_volume: 'VolumeIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ ) -> None:
"""
Initialize a ImagePrototypeImageBySourceVolume object.
@@ -77948,6 +83143,7 @@ def __ne__(self, other: 'ImagePrototypeImageBySourceVolume') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceCatalogOfferingPrototypeCatalogOfferingByOffering(InstanceCatalogOfferingPrototype):
"""
InstanceCatalogOfferingPrototypeCatalogOfferingByOffering.
@@ -77957,8 +83153,10 @@ class InstanceCatalogOfferingPrototypeCatalogOfferingByOffering(InstanceCatalogO
offering by a unique property.
"""
- def __init__(self,
- offering: 'CatalogOfferingIdentity') -> None:
+ def __init__(
+ self,
+ offering: 'CatalogOfferingIdentity',
+ ) -> None:
"""
Initialize a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering object.
@@ -78012,6 +83210,7 @@ def __ne__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByOfferi
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceCatalogOfferingPrototypeCatalogOfferingByVersion(InstanceCatalogOfferingPrototype):
"""
InstanceCatalogOfferingPrototypeCatalogOfferingByVersion.
@@ -78022,8 +83221,10 @@ class InstanceCatalogOfferingPrototypeCatalogOfferingByVersion(InstanceCatalogOf
unique property.
"""
- def __init__(self,
- version: 'CatalogOfferingVersionIdentity') -> None:
+ def __init__(
+ self,
+ version: 'CatalogOfferingVersionIdentity',
+ ) -> None:
"""
Initialize a InstanceCatalogOfferingPrototypeCatalogOfferingByVersion object.
@@ -78078,6 +83279,7 @@ def __ne__(self, other: 'InstanceCatalogOfferingPrototypeCatalogOfferingByVersio
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerActionPrototypeScheduledActionPrototype(InstanceGroupManagerActionPrototype):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototype.
@@ -78087,9 +83289,11 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototype(InstanceGroupM
unspecified, the name will be a hyphenated list of randomly-selected words.
"""
- def __init__(self,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototype object.
@@ -78100,9 +83304,11 @@ def __init__(self,
"""
# 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)
+
class InstanceGroupManagerActionScheduledAction(InstanceGroupManagerAction):
"""
InstanceGroupManagerActionScheduledAction.
@@ -78139,21 +83345,23 @@ class InstanceGroupManagerActionScheduledAction(InstanceGroupManagerAction):
will next run. If absent, the system is currently calculating the next run time.
"""
- def __init__(self,
- auto_delete: bool,
- auto_delete_timeout: int,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- status: str,
- updated_at: datetime,
- action_type: str,
- *,
- cron_spec: str = None,
- last_applied_at: datetime = None,
- next_run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ auto_delete: bool,
+ auto_delete_timeout: int,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ status: str,
+ updated_at: datetime,
+ action_type: str,
+ *,
+ cron_spec: str = None,
+ last_applied_at: datetime = None,
+ next_run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionScheduledAction object.
@@ -78195,13 +83403,15 @@ def __init__(self,
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerActionScheduledActionGroupTarget', 'InstanceGroupManagerActionScheduledActionManagerTarget']))
+ ", ".join(['InstanceGroupManagerActionScheduledActionGroupTarget', 'InstanceGroupManagerActionScheduledActionManagerTarget'])
+ )
raise Exception(msg)
class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action'
@@ -78214,6 +83424,7 @@ class StatusEnum(str, Enum):
- `incompatible`: Action parameters are not compatible with the group or manager
- `omitted`: Action was not applied because this action's manager was disabled.
"""
+
ACTIVE = 'active'
COMPLETED = 'completed'
FAILED = 'failed'
@@ -78225,9 +83436,11 @@ class ActionTypeEnum(str, Enum):
"""
The type of action for the instance group.
"""
+
SCHEDULED = 'scheduled'
+
class InstanceGroupManagerAutoScale(InstanceGroupManager):
"""
InstanceGroupManagerAutoScale.
@@ -78255,19 +83468,21 @@ class InstanceGroupManagerAutoScale(InstanceGroupManager):
instance group manager.
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- management_enabled: bool,
- name: str,
- updated_at: datetime,
- aggregation_window: int,
- cooldown: int,
- manager_type: str,
- max_membership_count: int,
- min_membership_count: int,
- policies: List['InstanceGroupManagerPolicyReference']) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ management_enabled: bool,
+ name: str,
+ updated_at: datetime,
+ aggregation_window: int,
+ cooldown: int,
+ manager_type: str,
+ max_membership_count: int,
+ min_membership_count: int,
+ policies: List['InstanceGroupManagerPolicyReference'],
+ ) -> None:
"""
Initialize a InstanceGroupManagerAutoScale object.
@@ -78423,9 +83638,11 @@ class ManagerTypeEnum(str, Enum):
"""
The type of instance group manager.
"""
+
AUTOSCALE = 'autoscale'
+
class InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(InstanceGroupManagerPolicyPrototype):
"""
InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.
@@ -78438,12 +83655,14 @@ class InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototy
:attr str policy_type: The type of policy for the instance group.
"""
- def __init__(self,
- metric_type: str,
- metric_value: int,
- policy_type: str,
- *,
- name: str = None) -> None:
+ def __init__(
+ self,
+ metric_type: str,
+ metric_value: int,
+ policy_type: str,
+ *,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype object.
@@ -78521,6 +83740,7 @@ class MetricTypeEnum(str, Enum):
"""
The type of metric to be evaluated.
"""
+
CPU = 'cpu'
MEMORY = 'memory'
NETWORK_IN = 'network_in'
@@ -78531,9 +83751,11 @@ class PolicyTypeEnum(str, Enum):
"""
The type of policy for the instance group.
"""
+
TARGET = 'target'
+
class InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(InstanceGroupManagerPolicy):
"""
InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.
@@ -78551,15 +83773,17 @@ class InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(InstanceGroupMa
:attr str policy_type: The type of policy for the instance group.
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- updated_at: datetime,
- metric_type: str,
- metric_value: int,
- policy_type: str) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ updated_at: datetime,
+ metric_type: str,
+ metric_value: int,
+ policy_type: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy object.
@@ -78672,6 +83896,7 @@ class MetricTypeEnum(str, Enum):
"""
The type of metric to be evaluated.
"""
+
CPU = 'cpu'
MEMORY = 'memory'
NETWORK_IN = 'network_in'
@@ -78682,9 +83907,11 @@ class PolicyTypeEnum(str, Enum):
"""
The type of policy for the instance group.
"""
+
TARGET = 'target'
+
class InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(InstanceGroupManagerPrototype):
"""
InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.
@@ -78705,15 +83932,17 @@ class InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(Instan
managed instance group.
"""
- def __init__(self,
- manager_type: str,
- max_membership_count: int,
- *,
- management_enabled: bool = None,
- name: str = None,
- aggregation_window: int = None,
- cooldown: int = None,
- min_membership_count: int = None) -> None:
+ def __init__(
+ self,
+ manager_type: str,
+ max_membership_count: int,
+ *,
+ management_enabled: bool = None,
+ name: str = None,
+ aggregation_window: int = None,
+ cooldown: int = None,
+ min_membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype object.
@@ -78811,9 +84040,11 @@ class ManagerTypeEnum(str, Enum):
"""
The type of instance group manager.
"""
+
AUTOSCALE = 'autoscale'
+
class InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(InstanceGroupManagerPrototype):
"""
InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.
@@ -78826,11 +84057,13 @@ class InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(Instan
:attr str manager_type: The type of instance group manager.
"""
- def __init__(self,
- manager_type: str,
- *,
- management_enabled: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ manager_type: str,
+ *,
+ management_enabled: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype object.
@@ -78898,9 +84131,11 @@ class ManagerTypeEnum(str, Enum):
"""
The type of instance group manager.
"""
+
SCHEDULED = 'scheduled'
+
class InstanceGroupManagerScheduled(InstanceGroupManager):
"""
InstanceGroupManagerScheduled.
@@ -78920,15 +84155,17 @@ class InstanceGroupManagerScheduled(InstanceGroupManager):
:attr str manager_type: The type of instance group manager.
"""
- def __init__(self,
- created_at: datetime,
- href: str,
- id: str,
- management_enabled: bool,
- name: str,
- updated_at: datetime,
- actions: List['InstanceGroupManagerActionReference'],
- manager_type: str) -> None:
+ def __init__(
+ self,
+ created_at: datetime,
+ href: str,
+ id: str,
+ management_enabled: bool,
+ name: str,
+ updated_at: datetime,
+ actions: List['InstanceGroupManagerActionReference'],
+ manager_type: str,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduled object.
@@ -79048,9 +84285,11 @@ class ManagerTypeEnum(str, Enum):
"""
The type of instance group manager.
"""
+
SCHEDULED = 'scheduled'
+
class InstanceGroupManagerScheduledActionManagerAutoScale(InstanceGroupManagerScheduledActionManager):
"""
InstanceGroupManagerScheduledActionManagerAutoScale.
@@ -79068,14 +84307,16 @@ class InstanceGroupManagerScheduledActionManagerAutoScale(InstanceGroupManagerSc
instance group members at the scheduled time.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceGroupManagerReferenceDeleted' = None,
- max_membership_count: int = None,
- min_membership_count: int = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceGroupManagerReferenceDeleted' = None,
+ max_membership_count: int = None,
+ min_membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionManagerAutoScale object.
@@ -79167,6 +84408,7 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerAutoScale') -
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype(InstanceGroupManagerScheduledActionManagerPrototype):
"""
The auto scale manager to update, and one or more properties to be updated. Either
@@ -79180,10 +84422,12 @@ class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype(Inst
instance group members at the scheduled time.
"""
- def __init__(self,
- *,
- max_membership_count: int = None,
- min_membership_count: int = None) -> None:
+ def __init__(
+ self,
+ *,
+ max_membership_count: int = None,
+ min_membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype object.
@@ -79194,9 +84438,11 @@ def __init__(self,
"""
# 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 InstancePatchProfileInstanceProfileIdentityByHref(InstancePatchProfile):
"""
InstancePatchProfileInstanceProfileIdentityByHref.
@@ -79204,8 +84450,10 @@ class InstancePatchProfileInstanceProfileIdentityByHref(InstancePatchProfile):
:attr str href: The URL for this virtual server instance profile.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstancePatchProfileInstanceProfileIdentityByHref object.
@@ -79254,6 +84502,7 @@ def __ne__(self, other: 'InstancePatchProfileInstanceProfileIdentityByHref') ->
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePatchProfileInstanceProfileIdentityByName(InstancePatchProfile):
"""
InstancePatchProfileInstanceProfileIdentityByName.
@@ -79262,8 +84511,10 @@ class InstancePatchProfileInstanceProfileIdentityByName(InstancePatchProfile):
profile.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a InstancePatchProfileInstanceProfileIdentityByName object.
@@ -79313,86 +84564,107 @@ def __ne__(self, other: 'InstancePatchProfileInstanceProfileIdentityByName') ->
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostGroupIdentity(InstancePlacementTargetPatch):
"""
Identifies a dedicated host group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref']))
+ ", ".join(['InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', 'InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref'])
+ )
raise Exception(msg)
+
class InstancePlacementTargetPatchDedicatedHostIdentity(InstancePlacementTargetPatch):
"""
Identifies a dedicated host by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById', 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN', 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref']))
+ ", ".join(['InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById', 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN', 'InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref'])
+ )
raise Exception(msg)
+
class InstancePlacementTargetPrototypeDedicatedHostGroupIdentity(InstancePlacementTargetPrototype):
"""
Identifies a dedicated host group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref']))
+ ", ".join(['InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN', 'InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref'])
+ )
raise Exception(msg)
+
class InstancePlacementTargetPrototypeDedicatedHostIdentity(InstancePlacementTargetPrototype):
"""
Identifies a dedicated host by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById', 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN', 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref']))
+ ", ".join(['InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById', 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN', 'InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref'])
+ )
raise Exception(msg)
+
class InstancePlacementTargetPrototypePlacementGroupIdentity(InstancePlacementTargetPrototype):
"""
Identifies a placement group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypePlacementGroupIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById', 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN', 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref']))
+ ", ".join(['InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById', 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN', 'InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref'])
+ )
raise Exception(msg)
+
class InstancePlacementTargetDedicatedHostGroupReference(InstancePlacementTarget):
"""
InstancePlacementTargetDedicatedHostGroupReference.
@@ -79408,14 +84680,16 @@ class InstancePlacementTargetDedicatedHostGroupReference(InstancePlacementTarget
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'DedicatedHostGroupReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'DedicatedHostGroupReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstancePlacementTargetDedicatedHostGroupReference object.
@@ -79513,9 +84787,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST_GROUP = 'dedicated_host_group'
+
class InstancePlacementTargetDedicatedHostReference(InstancePlacementTarget):
"""
InstancePlacementTargetDedicatedHostReference.
@@ -79531,14 +84807,16 @@ class InstancePlacementTargetDedicatedHostReference(InstancePlacementTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'DedicatedHostReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'DedicatedHostReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstancePlacementTargetDedicatedHostReference object.
@@ -79635,9 +84913,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
DEDICATED_HOST = 'dedicated_host'
+
class InstancePlacementTargetPlacementGroupReference(InstancePlacementTarget):
"""
InstancePlacementTargetPlacementGroupReference.
@@ -79653,14 +84933,16 @@ class InstancePlacementTargetPlacementGroupReference(InstancePlacementTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'PlacementGroupReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'PlacementGroupReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPlacementGroupReference object.
@@ -79757,9 +85039,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
PLACEMENT_GROUP = 'placement_group'
+
class InstanceProfileBandwidthDependent(InstanceProfileBandwidth):
"""
The total bandwidth shared across the network interfaces and storage volumes of an
@@ -79768,8 +85052,10 @@ class InstanceProfileBandwidthDependent(InstanceProfileBandwidth):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileBandwidthDependent object.
@@ -79822,9 +85108,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileBandwidthEnum(InstanceProfileBandwidth):
"""
The permitted total bandwidth values (in megabits per second) shared across the
@@ -79835,10 +85123,12 @@ class InstanceProfileBandwidthEnum(InstanceProfileBandwidth):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileBandwidthEnum object.
@@ -79907,9 +85197,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileBandwidthFixed(InstanceProfileBandwidth):
"""
The total bandwidth (in megabits per second) shared across the network interfaces and
@@ -79919,9 +85211,11 @@ class InstanceProfileBandwidthFixed(InstanceProfileBandwidth):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileBandwidthFixed object.
@@ -79982,9 +85276,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileBandwidthRange(InstanceProfileBandwidth):
"""
The permitted total bandwidth range (in megabits per second) shared across the network
@@ -79997,12 +85293,14 @@ class InstanceProfileBandwidthRange(InstanceProfileBandwidth):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileBandwidthRange object.
@@ -80087,9 +85385,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileDiskQuantityDependent(InstanceProfileDiskQuantity):
"""
The number of disks of this configuration for an instance with this profile depends on
@@ -80098,8 +85398,10 @@ class InstanceProfileDiskQuantityDependent(InstanceProfileDiskQuantity):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileDiskQuantityDependent object.
@@ -80152,9 +85454,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileDiskQuantityEnum(InstanceProfileDiskQuantity):
"""
The permitted the number of disks of this configuration for an instance with this
@@ -80165,10 +85469,12 @@ class InstanceProfileDiskQuantityEnum(InstanceProfileDiskQuantity):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileDiskQuantityEnum object.
@@ -80237,9 +85543,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileDiskQuantityFixed(InstanceProfileDiskQuantity):
"""
The number of disks of this configuration for an instance with this profile.
@@ -80248,9 +85556,11 @@ class InstanceProfileDiskQuantityFixed(InstanceProfileDiskQuantity):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileDiskQuantityFixed object.
@@ -80311,9 +85621,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileDiskQuantityRange(InstanceProfileDiskQuantity):
"""
The permitted range for the number of disks of this configuration for an instance with
@@ -80326,12 +85638,14 @@ class InstanceProfileDiskQuantityRange(InstanceProfileDiskQuantity):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileDiskQuantityRange object.
@@ -80416,9 +85730,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileDiskSizeDependent(InstanceProfileDiskSize):
"""
The disk size in GB (gigabytes) of this configuration for an instance with this
@@ -80427,8 +85743,10 @@ class InstanceProfileDiskSizeDependent(InstanceProfileDiskSize):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileDiskSizeDependent object.
@@ -80481,9 +85799,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileDiskSizeEnum(InstanceProfileDiskSize):
"""
The permitted disk size in GB (gigabytes) of this configuration for an instance with
@@ -80494,10 +85814,12 @@ class InstanceProfileDiskSizeEnum(InstanceProfileDiskSize):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileDiskSizeEnum object.
@@ -80566,9 +85888,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileDiskSizeFixed(InstanceProfileDiskSize):
"""
The size of the disk in GB (gigabytes).
@@ -80577,9 +85901,11 @@ class InstanceProfileDiskSizeFixed(InstanceProfileDiskSize):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileDiskSizeFixed object.
@@ -80640,9 +85966,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileDiskSizeRange(InstanceProfileDiskSize):
"""
The permitted range for the disk size of this configuration in GB (gigabytes) for an
@@ -80655,12 +85983,14 @@ class InstanceProfileDiskSizeRange(InstanceProfileDiskSize):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileDiskSizeRange object.
@@ -80745,9 +86075,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileGPUDependent(InstanceProfileGPU):
"""
The GPU count for an instance with this profile depends on its configuration.
@@ -80755,8 +86087,10 @@ class InstanceProfileGPUDependent(InstanceProfileGPU):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileGPUDependent object.
@@ -80809,9 +86143,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileGPUEnum(InstanceProfileGPU):
"""
The permitted GPU count values for an instance with this profile.
@@ -80821,10 +86157,12 @@ class InstanceProfileGPUEnum(InstanceProfileGPU):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileGPUEnum object.
@@ -80893,9 +86231,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileGPUFixed(InstanceProfileGPU):
"""
The GPU count for an instance with this profile.
@@ -80904,9 +86244,11 @@ class InstanceProfileGPUFixed(InstanceProfileGPU):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileGPUFixed object.
@@ -80967,9 +86309,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileGPUMemoryDependent(InstanceProfileGPUMemory):
"""
The overall GPU memory value for an instance with this profile depends on its
@@ -80978,8 +86322,10 @@ class InstanceProfileGPUMemoryDependent(InstanceProfileGPUMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileGPUMemoryDependent object.
@@ -81032,9 +86378,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileGPUMemoryEnum(InstanceProfileGPUMemory):
"""
The permitted overall GPU memory values in GiB (gibibytes) for an instance with this
@@ -81045,10 +86393,12 @@ class InstanceProfileGPUMemoryEnum(InstanceProfileGPUMemory):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileGPUMemoryEnum object.
@@ -81117,9 +86467,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileGPUMemoryFixed(InstanceProfileGPUMemory):
"""
The overall GPU memory in GiB (gibibytes) for an instance with this profile.
@@ -81128,9 +86480,11 @@ class InstanceProfileGPUMemoryFixed(InstanceProfileGPUMemory):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileGPUMemoryFixed object.
@@ -81191,9 +86545,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileGPUMemoryRange(InstanceProfileGPUMemory):
"""
The permitted overall GPU memory range in GiB (gibibytes) for an instance with this
@@ -81206,12 +86562,14 @@ class InstanceProfileGPUMemoryRange(InstanceProfileGPUMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileGPUMemoryRange object.
@@ -81296,9 +86654,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileGPURange(InstanceProfileGPU):
"""
The permitted GPU count range for an instance with this profile.
@@ -81310,12 +86670,14 @@ class InstanceProfileGPURange(InstanceProfileGPU):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileGPURange object.
@@ -81400,9 +86762,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileIdentityByHref(InstanceProfileIdentity):
"""
InstanceProfileIdentityByHref.
@@ -81410,8 +86774,10 @@ class InstanceProfileIdentityByHref(InstanceProfileIdentity):
:attr str href: The URL for this virtual server instance profile.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceProfileIdentityByHref object.
@@ -81460,6 +86826,7 @@ def __ne__(self, other: 'InstanceProfileIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceProfileIdentityByName(InstanceProfileIdentity):
"""
InstanceProfileIdentityByName.
@@ -81468,8 +86835,10 @@ class InstanceProfileIdentityByName(InstanceProfileIdentity):
profile.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a InstanceProfileIdentityByName object.
@@ -81519,6 +86888,7 @@ def __ne__(self, other: 'InstanceProfileIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceProfileMemoryDependent(InstanceProfileMemory):
"""
The memory value for an instance with this profile depends on its configuration.
@@ -81526,8 +86896,10 @@ class InstanceProfileMemoryDependent(InstanceProfileMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileMemoryDependent object.
@@ -81580,9 +86952,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileMemoryEnum(InstanceProfileMemory):
"""
The permitted memory values (in gibibytes) for an instance with this profile.
@@ -81592,10 +86966,12 @@ class InstanceProfileMemoryEnum(InstanceProfileMemory):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileMemoryEnum object.
@@ -81664,9 +87040,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileMemoryFixed(InstanceProfileMemory):
"""
The memory (in gibibytes) for an instance with this profile.
@@ -81675,9 +87053,11 @@ class InstanceProfileMemoryFixed(InstanceProfileMemory):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileMemoryFixed object.
@@ -81738,9 +87118,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileMemoryRange(InstanceProfileMemory):
"""
The permitted memory range (in gibibytes) for an instance with this profile.
@@ -81752,12 +87134,14 @@ class InstanceProfileMemoryRange(InstanceProfileMemory):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileMemoryRange object.
@@ -81842,9 +87226,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileNetworkInterfaceCountDependent(InstanceProfileNetworkInterfaceCount):
"""
The number of network interfaces supported on an instance with this profile is
@@ -81853,8 +87239,10 @@ class InstanceProfileNetworkInterfaceCountDependent(InstanceProfileNetworkInterf
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileNetworkInterfaceCountDependent object.
@@ -81907,9 +87295,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileNetworkInterfaceCountRange(InstanceProfileNetworkInterfaceCount):
"""
The number of network interfaces supported on an instance with this profile.
@@ -81919,11 +87309,13 @@ class InstanceProfileNetworkInterfaceCountRange(InstanceProfileNetworkInterfaceC
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str,
- *,
- max: int = None,
- min: int = None) -> None:
+ def __init__(
+ self,
+ type: str,
+ *,
+ max: int = None,
+ min: int = None,
+ ) -> None:
"""
Initialize a InstanceProfileNetworkInterfaceCountRange object.
@@ -81988,9 +87380,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfilePortSpeedDependent(InstanceProfilePortSpeed):
"""
The port speed of each network interface of an instance with this profile depends on
@@ -81999,8 +87393,10 @@ class InstanceProfilePortSpeedDependent(InstanceProfilePortSpeed):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfilePortSpeedDependent object.
@@ -82053,9 +87449,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfilePortSpeedFixed(InstanceProfilePortSpeed):
"""
The maximum speed (in megabits per second) of each network interface of an instance
@@ -82065,9 +87463,11 @@ class InstanceProfilePortSpeedFixed(InstanceProfilePortSpeed):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfilePortSpeedFixed object.
@@ -82128,9 +87528,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileVCPUDependent(InstanceProfileVCPU):
"""
The VCPU count for an instance with this profile depends on its configuration.
@@ -82138,8 +87540,10 @@ class InstanceProfileVCPUDependent(InstanceProfileVCPU):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileVCPUDependent object.
@@ -82192,9 +87596,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileVCPUEnum(InstanceProfileVCPU):
"""
The permitted values for VCPU count for an instance with this profile.
@@ -82204,10 +87610,12 @@ class InstanceProfileVCPUEnum(InstanceProfileVCPU):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileVCPUEnum object.
@@ -82276,9 +87684,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileVCPUFixed(InstanceProfileVCPU):
"""
The VCPU count for an instance with this profile.
@@ -82287,9 +87697,11 @@ class InstanceProfileVCPUFixed(InstanceProfileVCPU):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileVCPUFixed object.
@@ -82350,9 +87762,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileVCPURange(InstanceProfileVCPU):
"""
The permitted range for VCPU count for an instance with this profile.
@@ -82364,12 +87778,14 @@ class InstanceProfileVCPURange(InstanceProfileVCPU):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileVCPURange object.
@@ -82454,9 +87870,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstanceProfileVolumeBandwidthDependent(InstanceProfileVolumeBandwidth):
"""
The storage bandwidth shared across the storage volumes of an instance with this
@@ -82465,8 +87883,10 @@ class InstanceProfileVolumeBandwidthDependent(InstanceProfileVolumeBandwidth):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileVolumeBandwidthDependent object.
@@ -82519,9 +87939,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class InstanceProfileVolumeBandwidthEnum(InstanceProfileVolumeBandwidth):
"""
The permitted storage bandwidth values (in megabits per second) shared across the
@@ -82532,10 +87954,12 @@ class InstanceProfileVolumeBandwidthEnum(InstanceProfileVolumeBandwidth):
:attr List[int] values: The permitted values for this profile field.
"""
- def __init__(self,
- default: int,
- type: str,
- values: List[int]) -> None:
+ def __init__(
+ self,
+ default: int,
+ type: str,
+ values: List[int],
+ ) -> None:
"""
Initialize a InstanceProfileVolumeBandwidthEnum object.
@@ -82604,9 +88028,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
ENUM = 'enum'
+
class InstanceProfileVolumeBandwidthFixed(InstanceProfileVolumeBandwidth):
"""
The storage bandwidth (in megabits per second) shared across the storage volumes of an
@@ -82616,9 +88042,11 @@ class InstanceProfileVolumeBandwidthFixed(InstanceProfileVolumeBandwidth):
:attr int value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: int) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: int,
+ ) -> None:
"""
Initialize a InstanceProfileVolumeBandwidthFixed object.
@@ -82679,9 +88107,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class InstanceProfileVolumeBandwidthRange(InstanceProfileVolumeBandwidth):
"""
The permitted storage bandwidth range (in megabits per second) shared across the
@@ -82694,12 +88124,14 @@ class InstanceProfileVolumeBandwidthRange(InstanceProfileVolumeBandwidth):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- default: int,
- max: int,
- min: int,
- step: int,
- type: str) -> None:
+ def __init__(
+ self,
+ default: int,
+ max: int,
+ min: int,
+ step: int,
+ type: str,
+ ) -> None:
"""
Initialize a InstanceProfileVolumeBandwidthRange object.
@@ -82784,9 +88216,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
RANGE = 'range'
+
class InstancePrototypeInstanceByCatalogOffering(InstancePrototype):
"""
InstancePrototypeInstanceByCatalogOffering.
@@ -82819,8 +88253,6 @@ class InstancePrototypeInstanceByCatalogOffering(InstancePrototype):
must not be used by another virtual server instance 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.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -82841,7 +88273,7 @@ class InstancePrototypeInstanceByCatalogOffering(InstancePrototype):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr InstanceCatalogOfferingPrototype catalog_offering: The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering
@@ -82852,30 +88284,34 @@ class InstancePrototypeInstanceByCatalogOffering(InstancePrototype):
[enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise),
subject
to IAM policies.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: The primary network
+ interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- catalog_offering: 'InstanceCatalogOfferingPrototype',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None) -> None:
+ def __init__(
+ self,
+ catalog_offering: 'InstanceCatalogOfferingPrototype',
+ primary_network_interface: 'NetworkInterfacePrototype',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ ) -> None:
"""
Initialize a InstancePrototypeInstanceByCatalogOffering object.
@@ -82890,8 +88326,8 @@ def __init__(self,
[enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise),
subject
to IAM policies.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :param NetworkInterfacePrototype primary_network_interface: The primary
+ network interface to create for the virtual server instance.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -82924,8 +88360,6 @@ def __init__(self,
name must not be used by another virtual server instance 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 List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -82946,8 +88380,10 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -82955,7 +88391,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -82965,6 +88400,7 @@ def __init__(self,
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
self.catalog_offering = catalog_offering
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@@ -82982,8 +88418,6 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByCatalogOffering':
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -83004,6 +88438,8 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByCatalogOffering':
args['catalog_offering'] = _dict.get('catalog_offering')
else:
raise ValueError('Required property \'catalog_offering\' not present in InstancePrototypeInstanceByCatalogOffering JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
else:
@@ -83047,14 +88483,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -83097,6 +88525,14 @@ def to_dict(self) -> Dict:
_dict['catalog_offering'] = self.catalog_offering
else:
_dict['catalog_offering'] = self.catalog_offering.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -83127,6 +88563,7 @@ def __ne__(self, other: 'InstancePrototypeInstanceByCatalogOffering') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePrototypeInstanceByImage(InstancePrototype):
"""
InstancePrototypeInstanceByImage.
@@ -83159,8 +88596,6 @@ class InstancePrototypeInstanceByImage(InstancePrototype):
must not be used by another virtual server instance 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.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -83181,40 +88616,44 @@ class InstancePrototypeInstanceByImage(InstancePrototype):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr ImageIdentity image: The image to use when provisioning the virtual server
instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: The primary network
+ interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- image: 'ImageIdentity',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None) -> None:
+ def __init__(
+ self,
+ image: 'ImageIdentity',
+ primary_network_interface: 'NetworkInterfacePrototype',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ ) -> None:
"""
Initialize a InstancePrototypeInstanceByImage object.
:param ImageIdentity image: The image to use when provisioning the virtual
server instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :param NetworkInterfacePrototype primary_network_interface: The primary
+ network interface to create for the virtual server instance.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -83247,8 +88686,6 @@ def __init__(self,
name must not be used by another virtual server instance 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 List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -83269,8 +88706,10 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -83278,7 +88717,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -83288,6 +88726,7 @@ def __init__(self,
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
self.image = image
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@@ -83305,8 +88744,6 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImage':
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -83327,6 +88764,8 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByImage':
args['image'] = _dict.get('image')
else:
raise ValueError('Required property \'image\' not present in InstancePrototypeInstanceByImage JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
else:
@@ -83370,14 +88809,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -83420,6 +88851,14 @@ def to_dict(self) -> Dict:
_dict['image'] = self.image
else:
_dict['image'] = self.image.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -83450,6 +88889,7 @@ def __ne__(self, other: 'InstancePrototypeInstanceByImage') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype):
"""
InstancePrototypeInstanceBySourceSnapshot.
@@ -83482,8 +88922,6 @@ class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype):
must not be used by another virtual server instance 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.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -83504,39 +88942,43 @@ class InstancePrototypeInstanceBySourceSnapshot(InstancePrototype):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
- boot_volume_attachment: The boot volume attachment for the virtual server
- instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ boot_volume_attachment: The boot volume attachment to create for the virtual
+ server instance.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: The primary network
+ interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
+ def __init__(
+ self,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext',
+ primary_network_interface: 'NetworkInterfacePrototype',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ ) -> None:
"""
Initialize a InstancePrototypeInstanceBySourceSnapshot object.
:param VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
- boot_volume_attachment: The boot volume attachment for the virtual server
- instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ boot_volume_attachment: The boot volume attachment to create for the
+ virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: The primary
+ network interface to create for the virtual server instance.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -83569,8 +89011,6 @@ def __init__(self,
name must not be used by another virtual server instance 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 List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -83590,6 +89030,8 @@ def __init__(self,
:param VPCIdentity vpc: (optional) The VPC this virtual server instance
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -83597,7 +89039,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -83606,6 +89047,7 @@ def __init__(self,
self.volume_attachments = volume_attachments
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@@ -83623,8 +89065,6 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceSnapshot':
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -83643,6 +89083,8 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceSnapshot':
args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(_dict.get('boot_volume_attachment'))
else:
raise ValueError('Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceBySourceSnapshot JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
else:
@@ -83686,14 +89128,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -83731,6 +89165,14 @@ def to_dict(self) -> Dict:
_dict['boot_volume_attachment'] = self.boot_volume_attachment
else:
_dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -83761,6 +89203,7 @@ def __ne__(self, other: 'InstancePrototypeInstanceBySourceSnapshot') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePrototypeInstanceBySourceTemplate(InstancePrototype):
"""
InstancePrototypeInstanceBySourceTemplate.
@@ -83793,8 +89236,6 @@ class InstancePrototypeInstanceBySourceTemplate(InstancePrototype):
must not be used by another virtual server instance 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.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -83815,7 +89256,7 @@ class InstancePrototypeInstanceBySourceTemplate(InstancePrototype):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr InstanceCatalogOfferingPrototype catalog_offering: (optional) The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering version to use when provisioning this virtual server instance.
@@ -83827,35 +89268,39 @@ class InstancePrototypeInstanceBySourceTemplate(InstancePrototype):
`image` specified.
:attr ImageIdentity image: (optional) The image to use when provisioning the
virtual server instance.
- :attr NetworkInterfacePrototype primary_network_interface: (optional) Primary
- network interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr InstanceTemplateIdentity source_template: The template to create this
virtual server instance from.
:attr ZoneIdentity zone: (optional) The zone this virtual server instance will
reside in.
"""
- def __init__(self,
- source_template: 'InstanceTemplateIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
- catalog_offering: 'InstanceCatalogOfferingPrototype' = None,
- image: 'ImageIdentity' = None,
- primary_network_interface: 'NetworkInterfacePrototype' = None,
- zone: 'ZoneIdentity' = None) -> None:
+ def __init__(
+ self,
+ source_template: 'InstanceTemplateIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ catalog_offering: 'InstanceCatalogOfferingPrototype' = None,
+ image: 'ImageIdentity' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ zone: 'ZoneIdentity' = None,
+ ) -> None:
"""
Initialize a InstancePrototypeInstanceBySourceTemplate object.
@@ -83891,8 +89336,6 @@ def __init__(self,
name must not be used by another virtual server instance 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 List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -83913,8 +89356,8 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
:param InstanceCatalogOfferingPrototype catalog_offering: (optional) The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering version to use when provisioning this virtual server instance.
@@ -83928,8 +89371,10 @@ def __init__(self,
`image` specified.
:param ImageIdentity image: (optional) The image to use when provisioning
the virtual server instance.
- :param NetworkInterfacePrototype primary_network_interface: (optional)
- Primary network interface.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:param ZoneIdentity zone: (optional) The zone this virtual server instance
will reside in.
"""
@@ -83939,7 +89384,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -83950,6 +89394,7 @@ def __init__(self,
self.boot_volume_attachment = boot_volume_attachment
self.catalog_offering = catalog_offering
self.image = image
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.source_template = source_template
self.zone = zone
@@ -83968,8 +89413,6 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate':
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -83990,6 +89433,8 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceBySourceTemplate':
args['catalog_offering'] = _dict.get('catalog_offering')
if 'image' in _dict:
args['image'] = _dict.get('image')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
if 'source_template' in _dict:
@@ -84033,14 +89478,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -84088,6 +89525,14 @@ def to_dict(self) -> Dict:
_dict['image'] = self.image
else:
_dict['image'] = self.image.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -84123,6 +89568,7 @@ def __ne__(self, other: 'InstancePrototypeInstanceBySourceTemplate') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePrototypeInstanceByVolume(InstancePrototype):
"""
InstancePrototypeInstanceByVolume.
@@ -84155,8 +89601,6 @@ class InstancePrototypeInstanceByVolume(InstancePrototype):
must not be used by another virtual server instance 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.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -84178,37 +89622,41 @@ class InstancePrototypeInstanceByVolume(InstancePrototype):
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByVolumeContext boot_volume_attachment:
The boot volume attachment for the virtual server instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: The primary network
+ interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByVolumeContext',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
+ def __init__(
+ self,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByVolumeContext',
+ primary_network_interface: 'NetworkInterfacePrototype',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ ) -> None:
"""
Initialize a InstancePrototypeInstanceByVolume object.
:param VolumeAttachmentPrototypeInstanceByVolumeContext
boot_volume_attachment: The boot volume attachment for the virtual server
instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :param NetworkInterfacePrototype primary_network_interface: The primary
+ network interface to create for the virtual server instance.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -84241,8 +89689,6 @@ def __init__(self,
name must not be used by another virtual server instance 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 List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -84262,6 +89708,8 @@ def __init__(self,
:param VPCIdentity vpc: (optional) The VPC this virtual server instance
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -84269,7 +89717,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -84278,6 +89725,7 @@ def __init__(self,
self.volume_attachments = volume_attachments
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@@ -84295,8 +89743,6 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolume':
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -84315,6 +89761,8 @@ def from_dict(cls, _dict: Dict) -> 'InstancePrototypeInstanceByVolume':
args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceByVolumeContext.from_dict(_dict.get('boot_volume_attachment'))
else:
raise ValueError('Required property \'boot_volume_attachment\' not present in InstancePrototypeInstanceByVolume JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
else:
@@ -84358,14 +89806,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -84403,6 +89843,14 @@ def to_dict(self) -> Dict:
_dict['boot_volume_attachment'] = self.boot_volume_attachment
else:
_dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -84433,6 +89881,7 @@ def __ne__(self, other: 'InstancePrototypeInstanceByVolume') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceTemplateIdentityByCRN(InstanceTemplateIdentity):
"""
InstanceTemplateIdentityByCRN.
@@ -84440,8 +89889,10 @@ class InstanceTemplateIdentityByCRN(InstanceTemplateIdentity):
:attr str crn: The CRN for this instance template.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a InstanceTemplateIdentityByCRN object.
@@ -84490,6 +89941,7 @@ def __ne__(self, other: 'InstanceTemplateIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceTemplateIdentityByHref(InstanceTemplateIdentity):
"""
InstanceTemplateIdentityByHref.
@@ -84497,8 +89949,10 @@ class InstanceTemplateIdentityByHref(InstanceTemplateIdentity):
:attr str href: The URL for this instance template.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstanceTemplateIdentityByHref object.
@@ -84547,6 +90001,7 @@ def __ne__(self, other: 'InstanceTemplateIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceTemplateIdentityById(InstanceTemplateIdentity):
"""
InstanceTemplateIdentityById.
@@ -84554,8 +90009,10 @@ class InstanceTemplateIdentityById(InstanceTemplateIdentity):
:attr str id: The unique identifier for this instance template.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a InstanceTemplateIdentityById object.
@@ -84604,9 +90061,10 @@ def __ne__(self, other: 'InstanceTemplateIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplatePrototypeInstanceByCatalogOffering(InstanceTemplatePrototype):
+
+class InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext(InstanceTemplatePrototype):
"""
- InstanceTemplatePrototypeInstanceByCatalogOffering.
+ InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext.
:attr InstanceAvailabilityPolicyPrototype availability_policy: (optional) The
availability policy to use for this virtual server instance.
@@ -84635,8 +90093,6 @@ class InstanceTemplatePrototypeInstanceByCatalogOffering(InstanceTemplatePrototy
:attr str name: (optional) The name for this instance template. The name must
not be used by another instance template in the region. If unspecified, the name
will be a hyphenated list of randomly-selected words.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -84657,7 +90113,7 @@ class InstanceTemplatePrototypeInstanceByCatalogOffering(InstanceTemplatePrototy
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr InstanceCatalogOfferingPrototype catalog_offering: The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering
@@ -84668,32 +90124,36 @@ class InstanceTemplatePrototypeInstanceByCatalogOffering(InstanceTemplatePrototy
[enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise),
subject
to IAM policies.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- catalog_offering: 'InstanceCatalogOfferingPrototype',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None) -> None:
- """
- Initialize a InstanceTemplatePrototypeInstanceByCatalogOffering object.
+ def __init__(
+ self,
+ catalog_offering: 'InstanceCatalogOfferingPrototype',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ ) -> None:
+ """
+ Initialize a InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext object.
:param InstanceCatalogOfferingPrototype catalog_offering: The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
@@ -84706,8 +90166,6 @@ def __init__(self,
[enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise),
subject
to IAM policies.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -84739,8 +90197,6 @@ def __init__(self,
:param str name: (optional) The name for this instance template. The name
must not be used by another instance template in the region. If
unspecified, the name will be a hyphenated list of randomly-selected words.
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -84761,8 +90217,12 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -84770,7 +90230,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -84780,12 +90239,13 @@ def __init__(self,
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
self.catalog_offering = catalog_offering
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@classmethod
- def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByCatalogOffering':
- """Initialize a InstanceTemplatePrototypeInstanceByCatalogOffering object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext':
+ """Initialize a InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext object from a json dictionary."""
args = {}
if 'availability_policy' in _dict:
args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(_dict.get('availability_policy'))
@@ -84797,8 +90257,6 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByCatalogOf
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -84818,20 +90276,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByCatalogOf
if 'catalog_offering' in _dict:
args['catalog_offering'] = _dict.get('catalog_offering')
else:
- raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplatePrototypeInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
- else:
- raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceByCatalogOffering JSON')
if 'zone' in _dict:
args['zone'] = _dict.get('zone')
else:
- raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a InstanceTemplatePrototypeInstanceByCatalogOffering object from a json dictionary."""
+ """Initialize a InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -84862,14 +90320,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -84912,6 +90362,14 @@ def to_dict(self) -> Dict:
_dict['catalog_offering'] = self.catalog_offering
else:
_dict['catalog_offering'] = self.catalog_offering.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -84929,22 +90387,23 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this InstanceTemplatePrototypeInstanceByCatalogOffering object."""
+ """Return a `str` version of this InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'InstanceTemplatePrototypeInstanceByCatalogOffering') -> bool:
+ def __eq__(self, other: 'InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
- def __ne__(self, other: 'InstanceTemplatePrototypeInstanceByCatalogOffering') -> bool:
+ def __ne__(self, other: 'InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplatePrototypeInstanceByImage(InstanceTemplatePrototype):
+
+class InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext(InstanceTemplatePrototype):
"""
- InstanceTemplatePrototypeInstanceByImage.
+ InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext.
:attr InstanceAvailabilityPolicyPrototype availability_policy: (optional) The
availability policy to use for this virtual server instance.
@@ -84973,8 +90432,6 @@ class InstanceTemplatePrototypeInstanceByImage(InstanceTemplatePrototype):
:attr str name: (optional) The name for this instance template. The name must
not be used by another instance template in the region. If unspecified, the name
will be a hyphenated list of randomly-selected words.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -84995,40 +90452,42 @@ class InstanceTemplatePrototypeInstanceByImage(InstanceTemplatePrototype):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr ImageIdentity image: The image to use when provisioning the virtual server
instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- image: 'ImageIdentity',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None) -> None:
- """
- Initialize a InstanceTemplatePrototypeInstanceByImage object.
+ def __init__(
+ self,
+ image: 'ImageIdentity',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ ) -> None:
+ """
+ Initialize a InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext object.
:param ImageIdentity image: The image to use when provisioning the virtual
server instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -85060,8 +90519,6 @@ def __init__(self,
:param str name: (optional) The name for this instance template. The name
must not be used by another instance template in the region. If
unspecified, the name will be a hyphenated list of randomly-selected words.
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -85082,8 +90539,12 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -85091,7 +90552,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -85101,12 +90561,13 @@ def __init__(self,
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
self.image = image
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@classmethod
- def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByImage':
- """Initialize a InstanceTemplatePrototypeInstanceByImage object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext':
+ """Initialize a InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext object from a json dictionary."""
args = {}
if 'availability_policy' in _dict:
args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(_dict.get('availability_policy'))
@@ -85118,8 +90579,6 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByImage':
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -85139,20 +90598,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceByImage':
if 'image' in _dict:
args['image'] = _dict.get('image')
else:
- raise ValueError('Required property \'image\' not present in InstanceTemplatePrototypeInstanceByImage JSON')
+ raise ValueError('Required property \'image\' not present in InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
- else:
- raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceByImage JSON')
if 'zone' in _dict:
args['zone'] = _dict.get('zone')
else:
- raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceByImage JSON')
+ raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a InstanceTemplatePrototypeInstanceByImage object from a json dictionary."""
+ """Initialize a InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -85183,14 +90642,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -85233,6 +90684,14 @@ def to_dict(self) -> Dict:
_dict['image'] = self.image
else:
_dict['image'] = self.image.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -85250,22 +90709,23 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this InstanceTemplatePrototypeInstanceByImage object."""
+ """Return a `str` version of this InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'InstanceTemplatePrototypeInstanceByImage') -> bool:
+ def __eq__(self, other: 'InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
- def __ne__(self, other: 'InstanceTemplatePrototypeInstanceByImage') -> bool:
+ def __ne__(self, other: 'InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplatePrototypeInstanceBySourceSnapshot(InstanceTemplatePrototype):
+
+class InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext(InstanceTemplatePrototype):
"""
- InstanceTemplatePrototypeInstanceBySourceSnapshot.
+ InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext.
:attr InstanceAvailabilityPolicyPrototype availability_policy: (optional) The
availability policy to use for this virtual server instance.
@@ -85294,8 +90754,6 @@ class InstanceTemplatePrototypeInstanceBySourceSnapshot(InstanceTemplatePrototyp
:attr str name: (optional) The name for this instance template. The name must
not be used by another instance template in the region. If unspecified, the name
will be a hyphenated list of randomly-selected words.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -85316,39 +90774,41 @@ class InstanceTemplatePrototypeInstanceBySourceSnapshot(InstanceTemplatePrototyp
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
- boot_volume_attachment: The boot volume attachment for the virtual server
- instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ boot_volume_attachment: The boot volume attachment to create for the virtual
+ server instance.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
- """
- Initialize a InstanceTemplatePrototypeInstanceBySourceSnapshot object.
+ def __init__(
+ self,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ ) -> None:
+ """
+ Initialize a InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext object.
:param VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
- boot_volume_attachment: The boot volume attachment for the virtual server
- instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ boot_volume_attachment: The boot volume attachment to create for the
+ virtual server instance.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -85380,8 +90840,6 @@ def __init__(self,
:param str name: (optional) The name for this instance template. The name
must not be used by another instance template in the region. If
unspecified, the name will be a hyphenated list of randomly-selected words.
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -85401,6 +90859,10 @@ def __init__(self,
:param VPCIdentity vpc: (optional) The VPC this virtual server instance
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -85408,7 +90870,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -85417,12 +90878,13 @@ def __init__(self,
self.volume_attachments = volume_attachments
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@classmethod
- def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceBySourceSnapshot':
- """Initialize a InstanceTemplatePrototypeInstanceBySourceSnapshot object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext':
+ """Initialize a InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext object from a json dictionary."""
args = {}
if 'availability_policy' in _dict:
args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(_dict.get('availability_policy'))
@@ -85434,8 +90896,6 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceBySourceSna
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -85453,20 +90913,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceBySourceSna
if 'boot_volume_attachment' in _dict:
args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(_dict.get('boot_volume_attachment'))
else:
- raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
- else:
- raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplatePrototypeInstanceBySourceSnapshot JSON')
if 'zone' in _dict:
args['zone'] = _dict.get('zone')
else:
- raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'zone\' not present in InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a InstanceTemplatePrototypeInstanceBySourceSnapshot object from a json dictionary."""
+ """Initialize a InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -85497,14 +90957,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -85542,6 +90994,14 @@ def to_dict(self) -> Dict:
_dict['boot_volume_attachment'] = self.boot_volume_attachment
else:
_dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -85559,19 +91019,20 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this InstanceTemplatePrototypeInstanceBySourceSnapshot object."""
+ """Return a `str` version of this InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'InstanceTemplatePrototypeInstanceBySourceSnapshot') -> bool:
+ def __eq__(self, other: 'InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
- def __ne__(self, other: 'InstanceTemplatePrototypeInstanceBySourceSnapshot') -> bool:
+ def __ne__(self, other: 'InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceTemplatePrototypeInstanceBySourceTemplate(InstanceTemplatePrototype):
"""
InstanceTemplatePrototypeInstanceBySourceTemplate.
@@ -85603,8 +91064,6 @@ class InstanceTemplatePrototypeInstanceBySourceTemplate(InstanceTemplatePrototyp
:attr str name: (optional) The name for this instance template. The name must
not be used by another instance template in the region. If unspecified, the name
will be a hyphenated list of randomly-selected words.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -85625,7 +91084,7 @@ class InstanceTemplatePrototypeInstanceBySourceTemplate(InstanceTemplatePrototyp
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr InstanceCatalogOfferingPrototype catalog_offering: (optional) The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering version to use when provisioning this virtual server instance.
@@ -85637,35 +91096,39 @@ class InstanceTemplatePrototypeInstanceBySourceTemplate(InstanceTemplatePrototyp
`image` specified.
:attr ImageIdentity image: (optional) The image to use when provisioning the
virtual server instance.
- :attr NetworkInterfacePrototype primary_network_interface: (optional) Primary
- network interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr InstanceTemplateIdentity source_template: The template to create this
virtual server instance from.
:attr ZoneIdentity zone: (optional) The zone this virtual server instance will
reside in.
"""
- def __init__(self,
- source_template: 'InstanceTemplateIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- name: str = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
- catalog_offering: 'InstanceCatalogOfferingPrototype' = None,
- image: 'ImageIdentity' = None,
- primary_network_interface: 'NetworkInterfacePrototype' = None,
- zone: 'ZoneIdentity' = None) -> None:
+ def __init__(
+ self,
+ source_template: 'InstanceTemplateIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ name: str = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ catalog_offering: 'InstanceCatalogOfferingPrototype' = None,
+ image: 'ImageIdentity' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ zone: 'ZoneIdentity' = None,
+ ) -> None:
"""
Initialize a InstanceTemplatePrototypeInstanceBySourceTemplate object.
@@ -85700,8 +91163,6 @@ def __init__(self,
:param str name: (optional) The name for this instance template. The name
must not be used by another instance template in the region. If
unspecified, the name will be a hyphenated list of randomly-selected words.
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -85722,8 +91183,8 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
:param InstanceCatalogOfferingPrototype catalog_offering: (optional) The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering version to use when provisioning this virtual server instance.
@@ -85737,8 +91198,10 @@ def __init__(self,
`image` specified.
:param ImageIdentity image: (optional) The image to use when provisioning
the virtual server instance.
- :param NetworkInterfacePrototype primary_network_interface: (optional)
- Primary network interface.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:param ZoneIdentity zone: (optional) The zone this virtual server instance
will reside in.
"""
@@ -85748,7 +91211,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -85759,6 +91221,7 @@ def __init__(self,
self.boot_volume_attachment = boot_volume_attachment
self.catalog_offering = catalog_offering
self.image = image
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.source_template = source_template
self.zone = zone
@@ -85777,8 +91240,6 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceBySourceTem
args['metadata_service'] = InstanceMetadataServicePrototype.from_dict(_dict.get('metadata_service'))
if 'name' in _dict:
args['name'] = _dict.get('name')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -85799,6 +91260,8 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplatePrototypeInstanceBySourceTem
args['catalog_offering'] = _dict.get('catalog_offering')
if 'image' in _dict:
args['image'] = _dict.get('image')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
if 'source_template' in _dict:
@@ -85842,14 +91305,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -85897,6 +91352,14 @@ def to_dict(self) -> Dict:
_dict['image'] = self.image
else:
_dict['image'] = self.image.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -85932,9 +91395,10 @@ def __ne__(self, other: 'InstanceTemplatePrototypeInstanceBySourceTemplate') ->
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateInstanceByCatalogOffering(InstanceTemplate):
+
+class InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(InstanceTemplate):
"""
- InstanceTemplateInstanceByCatalogOffering.
+ InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.
:attr InstanceAvailabilityPolicyPrototype availability_policy: (optional) The
availability policy to use for this virtual server instance.
@@ -85967,8 +91431,6 @@ class InstanceTemplateInstanceByCatalogOffering(InstanceTemplate):
:attr InstanceMetadataServicePrototype metadata_service: (optional)
:attr str name: The name for this instance template. The name is unique across
all instance templates in the region.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -85990,7 +91452,7 @@ class InstanceTemplateInstanceByCatalogOffering(InstanceTemplate):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr InstanceCatalogOfferingPrototype catalog_offering: The
[catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user)
offering
@@ -86001,36 +91463,40 @@ class InstanceTemplateInstanceByCatalogOffering(InstanceTemplate):
[enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise),
subject
to IAM policies.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- catalog_offering: 'InstanceCatalogOfferingPrototype',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None) -> None:
- """
- Initialize a InstanceTemplateInstanceByCatalogOffering object.
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ catalog_offering: 'InstanceCatalogOfferingPrototype',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ ) -> None:
+ """
+ Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext object.
:param datetime created_at: The date and time that the instance template
was created.
@@ -86052,8 +91518,6 @@ def __init__(self,
[enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise),
subject
to IAM policies.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -86082,8 +91546,6 @@ def __init__(self,
initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization)
property.
:param InstanceMetadataServicePrototype metadata_service: (optional)
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -86103,8 +91565,12 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -86116,7 +91582,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -86126,33 +91591,34 @@ def __init__(self,
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
self.catalog_offering = catalog_offering
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@classmethod
- def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOffering':
- """Initialize a InstanceTemplateInstanceByCatalogOffering object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext':
+ """Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext object from a json dictionary."""
args = {}
if 'availability_policy' in _dict:
args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(_dict.get('availability_policy'))
if 'created_at' in _dict:
args['created_at'] = string_to_datetime(_dict.get('created_at'))
else:
- raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
if 'crn' in _dict:
args['crn'] = _dict.get('crn')
else:
- raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
if 'default_trusted_profile' in _dict:
args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(_dict.get('default_trusted_profile'))
if 'href' in _dict:
args['href'] = _dict.get('href')
else:
- raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
if 'id' in _dict:
args['id'] = _dict.get('id')
else:
- raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
if 'keys' in _dict:
args['keys'] = _dict.get('keys')
if 'metadata_service' in _dict:
@@ -86160,9 +91626,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOffering':
if 'name' in _dict:
args['name'] = _dict.get('name')
else:
- raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
+ raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -86170,7 +91634,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOffering':
if 'resource_group' in _dict:
args['resource_group'] = ResourceGroupReference.from_dict(_dict.get('resource_group'))
else:
- raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
if 'total_volume_bandwidth' in _dict:
args['total_volume_bandwidth'] = _dict.get('total_volume_bandwidth')
if 'user_data' in _dict:
@@ -86184,20 +91648,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByCatalogOffering':
if 'catalog_offering' in _dict:
args['catalog_offering'] = _dict.get('catalog_offering')
else:
- raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'catalog_offering\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
- else:
- raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
if 'zone' in _dict:
args['zone'] = _dict.get('zone')
else:
- raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByCatalogOffering JSON')
+ raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a InstanceTemplateInstanceByCatalogOffering object from a json dictionary."""
+ """Initialize a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -86236,14 +91700,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -86286,6 +91742,14 @@ def to_dict(self) -> Dict:
_dict['catalog_offering'] = self.catalog_offering
else:
_dict['catalog_offering'] = self.catalog_offering.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -86303,22 +91767,23 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this InstanceTemplateInstanceByCatalogOffering object."""
+ """Return a `str` version of this InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'InstanceTemplateInstanceByCatalogOffering') -> bool:
+ def __eq__(self, other: 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
- def __ne__(self, other: 'InstanceTemplateInstanceByCatalogOffering') -> bool:
+ def __ne__(self, other: 'InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateInstanceByImage(InstanceTemplate):
+
+class InstanceTemplateInstanceByImageInstanceTemplateContext(InstanceTemplate):
"""
- InstanceTemplateInstanceByImage.
+ InstanceTemplateInstanceByImageInstanceTemplateContext.
:attr InstanceAvailabilityPolicyPrototype availability_policy: (optional) The
availability policy to use for this virtual server instance.
@@ -86351,8 +91816,6 @@ class InstanceTemplateInstanceByImage(InstanceTemplate):
:attr InstanceMetadataServicePrototype metadata_service: (optional)
:attr str name: The name for this instance template. The name is unique across
all instance templates in the region.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -86374,39 +91837,43 @@ class InstanceTemplateInstanceByImage(InstanceTemplate):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceByImageContext boot_volume_attachment:
- (optional) The boot volume attachment for the virtual server instance.
+ (optional) The boot volume attachment to create for the virtual server instance.
:attr ImageIdentity image: The image to use when provisioning the virtual server
instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- image: 'ImageIdentity',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None,
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None) -> None:
- """
- Initialize a InstanceTemplateInstanceByImage object.
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ image: 'ImageIdentity',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceByImageContext' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ ) -> None:
+ """
+ Initialize a InstanceTemplateInstanceByImageInstanceTemplateContext object.
:param datetime created_at: The date and time that the instance template
was created.
@@ -86419,8 +91886,6 @@ def __init__(self,
instance template.
:param ImageIdentity image: The image to use when provisioning the virtual
server instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -86449,8 +91914,6 @@ def __init__(self,
initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization)
property.
:param InstanceMetadataServicePrototype metadata_service: (optional)
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -86470,8 +91933,12 @@ def __init__(self,
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:param VolumeAttachmentPrototypeInstanceByImageContext
- boot_volume_attachment: (optional) The boot volume attachment for the
- virtual server instance.
+ boot_volume_attachment: (optional) The boot volume attachment to create for
+ the virtual server instance.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -86483,7 +91950,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -86493,33 +91959,34 @@ def __init__(self,
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
self.image = image
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@classmethod
- def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImage':
- """Initialize a InstanceTemplateInstanceByImage object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImageInstanceTemplateContext':
+ """Initialize a InstanceTemplateInstanceByImageInstanceTemplateContext object from a json dictionary."""
args = {}
if 'availability_policy' in _dict:
args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(_dict.get('availability_policy'))
if 'created_at' in _dict:
args['created_at'] = string_to_datetime(_dict.get('created_at'))
else:
- raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
if 'crn' in _dict:
args['crn'] = _dict.get('crn')
else:
- raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
if 'default_trusted_profile' in _dict:
args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(_dict.get('default_trusted_profile'))
if 'href' in _dict:
args['href'] = _dict.get('href')
else:
- raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
if 'id' in _dict:
args['id'] = _dict.get('id')
else:
- raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
if 'keys' in _dict:
args['keys'] = _dict.get('keys')
if 'metadata_service' in _dict:
@@ -86527,9 +91994,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImage':
if 'name' in _dict:
args['name'] = _dict.get('name')
else:
- raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByImage JSON')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
+ raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -86537,7 +92002,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImage':
if 'resource_group' in _dict:
args['resource_group'] = ResourceGroupReference.from_dict(_dict.get('resource_group'))
else:
- raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
if 'total_volume_bandwidth' in _dict:
args['total_volume_bandwidth'] = _dict.get('total_volume_bandwidth')
if 'user_data' in _dict:
@@ -86551,20 +92016,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceByImage':
if 'image' in _dict:
args['image'] = _dict.get('image')
else:
- raise ValueError('Required property \'image\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'image\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
- else:
- raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceByImage JSON')
if 'zone' in _dict:
args['zone'] = _dict.get('zone')
else:
- raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByImage JSON')
+ raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceByImageInstanceTemplateContext JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a InstanceTemplateInstanceByImage object from a json dictionary."""
+ """Initialize a InstanceTemplateInstanceByImageInstanceTemplateContext object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -86603,14 +92068,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -86653,6 +92110,14 @@ def to_dict(self) -> Dict:
_dict['image'] = self.image
else:
_dict['image'] = self.image.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -86670,22 +92135,23 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this InstanceTemplateInstanceByImage object."""
+ """Return a `str` version of this InstanceTemplateInstanceByImageInstanceTemplateContext object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'InstanceTemplateInstanceByImage') -> bool:
+ def __eq__(self, other: 'InstanceTemplateInstanceByImageInstanceTemplateContext') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
- def __ne__(self, other: 'InstanceTemplateInstanceByImage') -> bool:
+ def __ne__(self, other: 'InstanceTemplateInstanceByImageInstanceTemplateContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class InstanceTemplateInstanceBySourceSnapshot(InstanceTemplate):
+
+class InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(InstanceTemplate):
"""
- InstanceTemplateInstanceBySourceSnapshot.
+ InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.
:attr InstanceAvailabilityPolicyPrototype availability_policy: (optional) The
availability policy to use for this virtual server instance.
@@ -86718,8 +92184,6 @@ class InstanceTemplateInstanceBySourceSnapshot(InstanceTemplate):
:attr InstanceMetadataServicePrototype metadata_service: (optional)
:attr str name: The name for this instance template. The name is unique across
all instance templates in the region.
- :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:attr InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:attr InstanceProfileIdentity profile: (optional) The
@@ -86741,37 +92205,41 @@ class InstanceTemplateInstanceBySourceSnapshot(InstanceTemplate):
reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
:attr VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
- boot_volume_attachment: The boot volume attachment for the virtual server
- instance.
- :attr NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ boot_volume_attachment: The boot volume attachment to create for the virtual
+ server instance.
+ :attr List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :attr NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
:attr ZoneIdentity zone: The zone this virtual server instance will reside in.
"""
- def __init__(self,
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_group: 'ResourceGroupReference',
- boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext',
- primary_network_interface: 'NetworkInterfacePrototype',
- zone: 'ZoneIdentity',
- *,
- availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
- default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
- keys: List['KeyIdentity'] = None,
- metadata_service: 'InstanceMetadataServicePrototype' = None,
- network_interfaces: List['NetworkInterfacePrototype'] = None,
- placement_target: 'InstancePlacementTargetPrototype' = None,
- profile: 'InstanceProfileIdentity' = None,
- total_volume_bandwidth: int = None,
- user_data: str = None,
- volume_attachments: List['VolumeAttachmentPrototype'] = None,
- vpc: 'VPCIdentity' = None) -> None:
- """
- Initialize a InstanceTemplateInstanceBySourceSnapshot object.
+ def __init__(
+ self,
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ boot_volume_attachment: 'VolumeAttachmentPrototypeInstanceBySourceSnapshotContext',
+ zone: 'ZoneIdentity',
+ *,
+ availability_policy: 'InstanceAvailabilityPolicyPrototype' = None,
+ default_trusted_profile: 'InstanceDefaultTrustedProfilePrototype' = None,
+ keys: List['KeyIdentity'] = None,
+ metadata_service: 'InstanceMetadataServicePrototype' = None,
+ placement_target: 'InstancePlacementTargetPrototype' = None,
+ profile: 'InstanceProfileIdentity' = None,
+ total_volume_bandwidth: int = None,
+ user_data: str = None,
+ volume_attachments: List['VolumeAttachmentPrototype'] = None,
+ vpc: 'VPCIdentity' = None,
+ network_interfaces: List['NetworkInterfacePrototype'] = None,
+ primary_network_interface: 'NetworkInterfacePrototype' = None,
+ ) -> None:
+ """
+ Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext object.
:param datetime created_at: The date and time that the instance template
was created.
@@ -86783,10 +92251,8 @@ def __init__(self,
:param ResourceGroupReference resource_group: The resource group for this
instance template.
:param VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
- boot_volume_attachment: The boot volume attachment for the virtual server
- instance.
- :param NetworkInterfacePrototype primary_network_interface: Primary network
- interface.
+ boot_volume_attachment: The boot volume attachment to create for the
+ virtual server instance.
:param ZoneIdentity zone: The zone this virtual server instance will reside
in.
:param InstanceAvailabilityPolicyPrototype availability_policy: (optional)
@@ -86815,8 +92281,6 @@ def __init__(self,
initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization)
property.
:param InstanceMetadataServicePrototype metadata_service: (optional)
- :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
- additional network interfaces to create for the virtual server instance.
:param InstancePlacementTargetPrototype placement_target: (optional) The
placement restrictions to use for the virtual server instance.
:param InstanceProfileIdentity profile: (optional) The
@@ -86835,6 +92299,10 @@ def __init__(self,
:param VPCIdentity vpc: (optional) The VPC this virtual server instance
will reside in. If specified, it must match the VPC for the subnets of the
instance's network interfaces.
+ :param List[NetworkInterfacePrototype] network_interfaces: (optional) The
+ additional network interfaces to create for the virtual server instance.
+ :param NetworkInterfacePrototype primary_network_interface: (optional) The
+ primary network interface to create for the virtual server instance.
"""
# pylint: disable=super-init-not-called
self.availability_policy = availability_policy
@@ -86846,7 +92314,6 @@ def __init__(self,
self.keys = keys
self.metadata_service = metadata_service
self.name = name
- self.network_interfaces = network_interfaces
self.placement_target = placement_target
self.profile = profile
self.resource_group = resource_group
@@ -86855,33 +92322,34 @@ def __init__(self,
self.volume_attachments = volume_attachments
self.vpc = vpc
self.boot_volume_attachment = boot_volume_attachment
+ self.network_interfaces = network_interfaces
self.primary_network_interface = primary_network_interface
self.zone = zone
@classmethod
- def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshot':
- """Initialize a InstanceTemplateInstanceBySourceSnapshot object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext':
+ """Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext object from a json dictionary."""
args = {}
if 'availability_policy' in _dict:
args['availability_policy'] = InstanceAvailabilityPolicyPrototype.from_dict(_dict.get('availability_policy'))
if 'created_at' in _dict:
args['created_at'] = string_to_datetime(_dict.get('created_at'))
else:
- raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'created_at\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
if 'crn' in _dict:
args['crn'] = _dict.get('crn')
else:
- raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'crn\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
if 'default_trusted_profile' in _dict:
args['default_trusted_profile'] = InstanceDefaultTrustedProfilePrototype.from_dict(_dict.get('default_trusted_profile'))
if 'href' in _dict:
args['href'] = _dict.get('href')
else:
- raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'href\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
if 'id' in _dict:
args['id'] = _dict.get('id')
else:
- raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'id\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
if 'keys' in _dict:
args['keys'] = _dict.get('keys')
if 'metadata_service' in _dict:
@@ -86889,9 +92357,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshot':
if 'name' in _dict:
args['name'] = _dict.get('name')
else:
- raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
- if 'network_interfaces' in _dict:
- args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
+ raise ValueError('Required property \'name\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
if 'placement_target' in _dict:
args['placement_target'] = _dict.get('placement_target')
if 'profile' in _dict:
@@ -86899,7 +92365,7 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshot':
if 'resource_group' in _dict:
args['resource_group'] = ResourceGroupReference.from_dict(_dict.get('resource_group'))
else:
- raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'resource_group\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
if 'total_volume_bandwidth' in _dict:
args['total_volume_bandwidth'] = _dict.get('total_volume_bandwidth')
if 'user_data' in _dict:
@@ -86911,20 +92377,20 @@ def from_dict(cls, _dict: Dict) -> 'InstanceTemplateInstanceBySourceSnapshot':
if 'boot_volume_attachment' in _dict:
args['boot_volume_attachment'] = VolumeAttachmentPrototypeInstanceBySourceSnapshotContext.from_dict(_dict.get('boot_volume_attachment'))
else:
- raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'boot_volume_attachment\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
+ if 'network_interfaces' in _dict:
+ args['network_interfaces'] = [NetworkInterfacePrototype.from_dict(v) for v in _dict.get('network_interfaces')]
if 'primary_network_interface' in _dict:
args['primary_network_interface'] = NetworkInterfacePrototype.from_dict(_dict.get('primary_network_interface'))
- else:
- raise ValueError('Required property \'primary_network_interface\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
if 'zone' in _dict:
args['zone'] = _dict.get('zone')
else:
- raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceBySourceSnapshot JSON')
+ raise ValueError('Required property \'zone\' not present in InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a InstanceTemplateInstanceBySourceSnapshot object from a json dictionary."""
+ """Initialize a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -86963,14 +92429,6 @@ def to_dict(self) -> Dict:
_dict['metadata_service'] = self.metadata_service.to_dict()
if hasattr(self, 'name') and self.name is not None:
_dict['name'] = self.name
- if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
- network_interfaces_list = []
- for v in self.network_interfaces:
- if isinstance(v, dict):
- network_interfaces_list.append(v)
- else:
- network_interfaces_list.append(v.to_dict())
- _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'placement_target') and self.placement_target is not None:
if isinstance(self.placement_target, dict):
_dict['placement_target'] = self.placement_target
@@ -87008,6 +92466,14 @@ def to_dict(self) -> Dict:
_dict['boot_volume_attachment'] = self.boot_volume_attachment
else:
_dict['boot_volume_attachment'] = self.boot_volume_attachment.to_dict()
+ if hasattr(self, 'network_interfaces') and self.network_interfaces is not None:
+ network_interfaces_list = []
+ for v in self.network_interfaces:
+ if isinstance(v, dict):
+ network_interfaces_list.append(v)
+ else:
+ network_interfaces_list.append(v.to_dict())
+ _dict['network_interfaces'] = network_interfaces_list
if hasattr(self, 'primary_network_interface') and self.primary_network_interface is not None:
if isinstance(self.primary_network_interface, dict):
_dict['primary_network_interface'] = self.primary_network_interface
@@ -87025,19 +92491,20 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this InstanceTemplateInstanceBySourceSnapshot object."""
+ """Return a `str` version of this InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'InstanceTemplateInstanceBySourceSnapshot') -> bool:
+ def __eq__(self, other: 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext') -> bool:
"""Return `true` when self and other are equal, false otherwise."""
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__
- def __ne__(self, other: 'InstanceTemplateInstanceBySourceSnapshot') -> bool:
+ def __ne__(self, other: 'InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class KeyIdentityByCRN(KeyIdentity):
"""
KeyIdentityByCRN.
@@ -87045,8 +92512,10 @@ class KeyIdentityByCRN(KeyIdentity):
:attr str crn: The CRN for this key.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a KeyIdentityByCRN object.
@@ -87095,6 +92564,7 @@ def __ne__(self, other: 'KeyIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class KeyIdentityByFingerprint(KeyIdentity):
"""
KeyIdentityByFingerprint.
@@ -87103,8 +92573,10 @@ class KeyIdentityByFingerprint(KeyIdentity):
base64-encoded and prefixed with the hash algorithm (always `SHA256`).
"""
- def __init__(self,
- fingerprint: str) -> None:
+ def __init__(
+ self,
+ fingerprint: str,
+ ) -> None:
"""
Initialize a KeyIdentityByFingerprint object.
@@ -87155,6 +92627,7 @@ def __ne__(self, other: 'KeyIdentityByFingerprint') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class KeyIdentityByHref(KeyIdentity):
"""
KeyIdentityByHref.
@@ -87162,8 +92635,10 @@ class KeyIdentityByHref(KeyIdentity):
:attr str href: The URL for this key.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a KeyIdentityByHref object.
@@ -87212,6 +92687,7 @@ def __ne__(self, other: 'KeyIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class KeyIdentityById(KeyIdentity):
"""
KeyIdentityById.
@@ -87219,8 +92695,10 @@ class KeyIdentityById(KeyIdentity):
:attr str id: The unique identifier for this key.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a KeyIdentityById object.
@@ -87269,6 +92747,7 @@ def __ne__(self, other: 'KeyIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(LegacyCloudObjectStorageBucketIdentity):
"""
LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName.
@@ -87276,8 +92755,10 @@ class LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByNa
:attr str name: The globally unique name of this Cloud Object Storage bucket.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName object.
@@ -87327,6 +92808,7 @@ def __ne__(self, other: 'LegacyCloudObjectStorageBucketIdentityCloudObjectStorag
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerIdentityByCRN(LoadBalancerIdentity):
"""
LoadBalancerIdentityByCRN.
@@ -87334,8 +92816,10 @@ class LoadBalancerIdentityByCRN(LoadBalancerIdentity):
:attr str crn: The load balancer's CRN.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a LoadBalancerIdentityByCRN object.
@@ -87384,6 +92868,7 @@ def __ne__(self, other: 'LoadBalancerIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerIdentityByHref(LoadBalancerIdentity):
"""
LoadBalancerIdentityByHref.
@@ -87391,8 +92876,10 @@ class LoadBalancerIdentityByHref(LoadBalancerIdentity):
:attr str href: The load balancer's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerIdentityByHref object.
@@ -87441,6 +92928,7 @@ def __ne__(self, other: 'LoadBalancerIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerIdentityById(LoadBalancerIdentity):
"""
LoadBalancerIdentityById.
@@ -87448,8 +92936,10 @@ class LoadBalancerIdentityById(LoadBalancerIdentity):
:attr str id: The unique identifier for this load balancer.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a LoadBalancerIdentityById object.
@@ -87498,6 +92988,7 @@ def __ne__(self, other: 'LoadBalancerIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerIdentityByHref(LoadBalancerListenerIdentity):
"""
LoadBalancerListenerIdentityByHref.
@@ -87505,8 +92996,10 @@ class LoadBalancerListenerIdentityByHref(LoadBalancerListenerIdentity):
:attr str href: The listener's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerIdentityByHref object.
@@ -87555,6 +93048,7 @@ def __ne__(self, other: 'LoadBalancerListenerIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerIdentityById(LoadBalancerListenerIdentity):
"""
LoadBalancerListenerIdentityById.
@@ -87562,8 +93056,10 @@ class LoadBalancerListenerIdentityById(LoadBalancerListenerIdentity):
:attr str id: The unique identifier for this load balancer listener.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerIdentityById object.
@@ -87612,6 +93108,7 @@ def __ne__(self, other: 'LoadBalancerListenerIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch(LoadBalancerListenerPolicyTargetPatch):
"""
LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch.
@@ -87622,11 +93119,13 @@ class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatc
:attr str uri: (optional) The redirect relative target URI.
"""
- def __init__(self,
- *,
- http_status_code: int = None,
- listener: 'LoadBalancerListenerIdentity' = None,
- uri: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ http_status_code: int = None,
+ listener: 'LoadBalancerListenerIdentity' = None,
+ uri: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch object.
@@ -87690,6 +93189,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListen
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch(LoadBalancerListenerPolicyTargetPatch):
"""
LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch.
@@ -87698,10 +93198,12 @@ class LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURL
:attr str url: (optional) The redirect target URL.
"""
- def __init__(self,
- *,
- http_status_code: int = None,
- url: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ http_status_code: int = None,
+ url: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch object.
@@ -87755,22 +93257,27 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerListen
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(LoadBalancerListenerPolicyTargetPatch):
"""
Identifies a load balancer pool by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref']))
+ ", ".join(['LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref'])
+ )
raise Exception(msg)
+
class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype(LoadBalancerListenerPolicyTargetPrototype):
"""
LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype.
@@ -87781,11 +93288,13 @@ class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirect
:attr str uri: (optional) The redirect relative target URI.
"""
- def __init__(self,
- http_status_code: int,
- listener: 'LoadBalancerListenerIdentity',
- *,
- uri: str = None) -> None:
+ def __init__(
+ self,
+ http_status_code: int,
+ listener: 'LoadBalancerListenerIdentity',
+ *,
+ uri: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype object.
@@ -87852,6 +93361,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerLi
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(LoadBalancerListenerPolicyTargetPrototype):
"""
LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype.
@@ -87860,9 +93370,11 @@ class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirec
:attr str url: The redirect target URL.
"""
- def __init__(self,
- http_status_code: int,
- url: str) -> None:
+ def __init__(
+ self,
+ http_status_code: int,
+ url: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype object.
@@ -87919,22 +93431,27 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerLi
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity(LoadBalancerListenerPolicyTargetPrototype):
"""
Identifies a load balancer pool by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref']))
+ ", ".join(['LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById', 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref'])
+ )
raise Exception(msg)
+
class LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect(LoadBalancerListenerPolicyTarget):
"""
LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect.
@@ -87944,11 +93461,13 @@ class LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect(LoadBala
:attr str uri: (optional) The redirect relative target URI.
"""
- def __init__(self,
- http_status_code: int,
- listener: 'LoadBalancerListenerReference',
- *,
- uri: str = None) -> None:
+ def __init__(
+ self,
+ http_status_code: int,
+ listener: 'LoadBalancerListenerReference',
+ *,
+ uri: str = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect object.
@@ -88014,6 +93533,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerListenerHTT
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(LoadBalancerListenerPolicyTarget):
"""
LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL.
@@ -88022,9 +93542,11 @@ class LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(Load
:attr str url: The redirect target URL.
"""
- def __init__(self,
- http_status_code: int,
- url: str) -> None:
+ def __init__(
+ self,
+ http_status_code: int,
+ url: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL object.
@@ -88081,6 +93603,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerListenerPol
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetLoadBalancerPoolReference(LoadBalancerListenerPolicyTarget):
"""
LoadBalancerListenerPolicyTargetLoadBalancerPoolReference.
@@ -88094,12 +93617,14 @@ class LoadBalancerListenerPolicyTargetLoadBalancerPoolReference(LoadBalancerList
all pools for the load balancer.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'LoadBalancerPoolReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'LoadBalancerPoolReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetLoadBalancerPoolReference object.
@@ -88177,6 +93702,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetLoadBalancerPoolReferen
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolIdentityByHref(LoadBalancerPoolIdentity):
"""
LoadBalancerPoolIdentityByHref.
@@ -88184,8 +93710,10 @@ class LoadBalancerPoolIdentityByHref(LoadBalancerPoolIdentity):
:attr str href: The pool's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolIdentityByHref object.
@@ -88234,6 +93762,7 @@ def __ne__(self, other: 'LoadBalancerPoolIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolIdentityById(LoadBalancerPoolIdentity):
"""
LoadBalancerPoolIdentityById.
@@ -88241,8 +93770,10 @@ class LoadBalancerPoolIdentityById(LoadBalancerPoolIdentity):
:attr str id: The unique identifier for this load balancer pool.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolIdentityById object.
@@ -88291,6 +93822,7 @@ def __ne__(self, other: 'LoadBalancerPoolIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolMemberTargetPrototypeIP(LoadBalancerPoolMemberTargetPrototype):
"""
LoadBalancerPoolMemberTargetPrototypeIP.
@@ -88302,8 +93834,10 @@ class LoadBalancerPoolMemberTargetPrototypeIP(LoadBalancerPoolMemberTargetProtot
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetPrototypeIP object.
@@ -88357,22 +93891,27 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolMemberTargetPrototypeInstanceIdentity(LoadBalancerPoolMemberTargetPrototype):
"""
Identifies a virtual server instance by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById', 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN', 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref']))
+ ", ".join(['LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById', 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN', 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref'])
+ )
raise Exception(msg)
+
class LoadBalancerPoolMemberTargetIP(LoadBalancerPoolMemberTarget):
"""
LoadBalancerPoolMemberTargetIP.
@@ -88384,8 +93923,10 @@ class LoadBalancerPoolMemberTargetIP(LoadBalancerPoolMemberTarget):
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetIP object.
@@ -88439,6 +93980,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolMemberTargetInstanceReference(LoadBalancerPoolMemberTarget):
"""
LoadBalancerPoolMemberTargetInstanceReference.
@@ -88453,13 +93995,15 @@ class LoadBalancerPoolMemberTargetInstanceReference(LoadBalancerPoolMemberTarget
across all virtual server instances in the region.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'InstanceReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'InstanceReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetInstanceReference object.
@@ -88544,6 +94088,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetInstanceReference') -> bool
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerProfileIdentityByHref(LoadBalancerProfileIdentity):
"""
LoadBalancerProfileIdentityByHref.
@@ -88551,8 +94096,10 @@ class LoadBalancerProfileIdentityByHref(LoadBalancerProfileIdentity):
:attr str href: The URL for this load balancer profile.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileIdentityByHref object.
@@ -88601,6 +94148,7 @@ def __ne__(self, other: 'LoadBalancerProfileIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerProfileIdentityByName(LoadBalancerProfileIdentity):
"""
LoadBalancerProfileIdentityByName.
@@ -88608,8 +94156,10 @@ class LoadBalancerProfileIdentityByName(LoadBalancerProfileIdentity):
:attr str name: The globally unique name for this load balancer profile.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileIdentityByName object.
@@ -88658,6 +94208,7 @@ def __ne__(self, other: 'LoadBalancerProfileIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerProfileRouteModeSupportedDependent(LoadBalancerProfileRouteModeSupported):
"""
The route mode support for a load balancer with this profile depends on its
@@ -88666,8 +94217,10 @@ class LoadBalancerProfileRouteModeSupportedDependent(LoadBalancerProfileRouteMod
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileRouteModeSupportedDependent object.
@@ -88720,9 +94273,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class LoadBalancerProfileRouteModeSupportedFixed(LoadBalancerProfileRouteModeSupported):
"""
The route mode support for a load balancer with this profile.
@@ -88731,9 +94286,11 @@ class LoadBalancerProfileRouteModeSupportedFixed(LoadBalancerProfileRouteModeSup
:attr bool value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: bool) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: bool,
+ ) -> None:
"""
Initialize a LoadBalancerProfileRouteModeSupportedFixed object.
@@ -88794,9 +94351,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class LoadBalancerProfileSecurityGroupsSupportedDependent(LoadBalancerProfileSecurityGroupsSupported):
"""
The security group support for a load balancer with this profile depends on its
@@ -88805,8 +94364,10 @@ class LoadBalancerProfileSecurityGroupsSupportedDependent(LoadBalancerProfileSec
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileSecurityGroupsSupportedDependent object.
@@ -88859,9 +94420,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class LoadBalancerProfileSecurityGroupsSupportedFixed(LoadBalancerProfileSecurityGroupsSupported):
"""
The security group support for a load balancer with this profile.
@@ -88870,9 +94433,11 @@ class LoadBalancerProfileSecurityGroupsSupportedFixed(LoadBalancerProfileSecurit
:attr bool value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: bool) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: bool,
+ ) -> None:
"""
Initialize a LoadBalancerProfileSecurityGroupsSupportedFixed object.
@@ -88933,9 +94498,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class LoadBalancerProfileUDPSupportedDependent(LoadBalancerProfileUDPSupported):
"""
The UDP support for a load balancer with this profile depends on its configuration.
@@ -88943,8 +94510,10 @@ class LoadBalancerProfileUDPSupportedDependent(LoadBalancerProfileUDPSupported):
:attr str type: The type for this profile field.
"""
- def __init__(self,
- type: str) -> None:
+ def __init__(
+ self,
+ type: str,
+ ) -> None:
"""
Initialize a LoadBalancerProfileUDPSupportedDependent object.
@@ -88997,9 +94566,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
DEPENDENT = 'dependent'
+
class LoadBalancerProfileUDPSupportedFixed(LoadBalancerProfileUDPSupported):
"""
The UDP support for a load balancer with this profile.
@@ -89008,9 +94579,11 @@ class LoadBalancerProfileUDPSupportedFixed(LoadBalancerProfileUDPSupported):
:attr bool value: The value for this profile field.
"""
- def __init__(self,
- type: str,
- value: bool) -> None:
+ def __init__(
+ self,
+ type: str,
+ value: bool,
+ ) -> None:
"""
Initialize a LoadBalancerProfileUDPSupportedFixed object.
@@ -89071,9 +94644,11 @@ class TypeEnum(str, Enum):
"""
The type for this profile field.
"""
+
FIXED = 'fixed'
+
class NetworkACLIdentityByCRN(NetworkACLIdentity):
"""
NetworkACLIdentityByCRN.
@@ -89081,8 +94656,10 @@ class NetworkACLIdentityByCRN(NetworkACLIdentity):
:attr str crn: The CRN for this network ACL.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a NetworkACLIdentityByCRN object.
@@ -89131,6 +94708,7 @@ def __ne__(self, other: 'NetworkACLIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLIdentityByHref(NetworkACLIdentity):
"""
NetworkACLIdentityByHref.
@@ -89138,8 +94716,10 @@ class NetworkACLIdentityByHref(NetworkACLIdentity):
:attr str href: The URL for this network ACL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLIdentityByHref object.
@@ -89188,6 +94768,7 @@ def __ne__(self, other: 'NetworkACLIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLIdentityById(NetworkACLIdentity):
"""
NetworkACLIdentityById.
@@ -89195,8 +94776,10 @@ class NetworkACLIdentityById(NetworkACLIdentity):
:attr str id: The unique identifier for this network ACL.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a NetworkACLIdentityById object.
@@ -89245,6 +94828,7 @@ def __ne__(self, other: 'NetworkACLIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLPrototypeNetworkACLByRules(NetworkACLPrototype):
"""
NetworkACLPrototypeNetworkACLByRules.
@@ -89259,12 +94843,14 @@ class NetworkACLPrototypeNetworkACLByRules(NetworkACLPrototype):
unspecified, no rules will be created, resulting in all traffic being denied.
"""
- def __init__(self,
- vpc: 'VPCIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- rules: List['NetworkACLRulePrototypeNetworkACLContext'] = None) -> None:
+ def __init__(
+ self,
+ vpc: 'VPCIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ rules: List['NetworkACLRulePrototypeNetworkACLContext'] = None,
+ ) -> None:
"""
Initialize a NetworkACLPrototypeNetworkACLByRules object.
@@ -89348,6 +94934,7 @@ def __ne__(self, other: 'NetworkACLPrototypeNetworkACLByRules') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLPrototypeNetworkACLBySourceNetworkACL(NetworkACLPrototype):
"""
NetworkACLPrototypeNetworkACLBySourceNetworkACL.
@@ -89360,12 +94947,14 @@ class NetworkACLPrototypeNetworkACLBySourceNetworkACL(NetworkACLPrototype):
:attr NetworkACLIdentity source_network_acl: Network ACL to copy rules from.
"""
- def __init__(self,
- vpc: 'VPCIdentity',
- source_network_acl: 'NetworkACLIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ vpc: 'VPCIdentity',
+ source_network_acl: 'NetworkACLIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a NetworkACLPrototypeNetworkACLBySourceNetworkACL object.
@@ -89446,6 +95035,7 @@ def __ne__(self, other: 'NetworkACLPrototypeNetworkACLBySourceNetworkACL') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(NetworkACLRuleBeforePatch):
"""
NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref.
@@ -89453,8 +95043,10 @@ class NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(NetworkACLRuleBefore
:attr str href: The URL for this network ACL rule.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref object.
@@ -89503,6 +95095,7 @@ def __ne__(self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref')
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLRuleBeforePatchNetworkACLRuleIdentityById(NetworkACLRuleBeforePatch):
"""
NetworkACLRuleBeforePatchNetworkACLRuleIdentityById.
@@ -89510,8 +95103,10 @@ class NetworkACLRuleBeforePatchNetworkACLRuleIdentityById(NetworkACLRuleBeforePa
:attr str id: The unique identifier for this network ACL rule.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById object.
@@ -89560,6 +95155,7 @@ def __ne__(self, other: 'NetworkACLRuleBeforePatchNetworkACLRuleIdentityById') -
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(NetworkACLRuleBeforePrototype):
"""
NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref.
@@ -89567,8 +95163,10 @@ class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(NetworkACLRuleBe
:attr str href: The URL for this network ACL rule.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref object.
@@ -89617,6 +95215,7 @@ def __ne__(self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHr
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById(NetworkACLRuleBeforePrototype):
"""
NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById.
@@ -89624,8 +95223,10 @@ class NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById(NetworkACLRuleBefo
:attr str id: The unique identifier for this network ACL rule.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById object.
@@ -89674,6 +95275,7 @@ def __ne__(self, other: 'NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkACLRuleItemNetworkACLRuleProtocolAll(NetworkACLRuleItem):
"""
NetworkACLRuleItemNetworkACLRuleProtocolAll.
@@ -89696,19 +95298,21 @@ class NetworkACLRuleItemNetworkACLRuleProtocolAll(NetworkACLRuleItem):
:attr str protocol: The protocol to enforce.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleReference' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleItemNetworkACLRuleProtocolAll object.
@@ -89847,6 +95451,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -89855,6 +95460,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -89863,6 +95469,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -89870,9 +95477,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
+
class NetworkACLRuleItemNetworkACLRuleProtocolICMP(NetworkACLRuleItem):
"""
NetworkACLRuleItemNetworkACLRuleProtocolICMP.
@@ -89899,21 +95508,23 @@ class NetworkACLRuleItemNetworkACLRuleProtocolICMP(NetworkACLRuleItem):
If absent, all types are matched.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleReference' = None,
- code: int = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ code: int = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleItemNetworkACLRuleProtocolICMP object.
@@ -90066,6 +95677,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -90074,6 +95686,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -90082,6 +95695,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -90089,9 +95703,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ICMP = 'icmp'
+
class NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP(NetworkACLRuleItem):
"""
NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP.
@@ -90122,23 +95738,25 @@ class NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP(NetworkACLRuleItem):
range.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- source: str,
- destination_port_max: int,
- destination_port_min: int,
- protocol: str,
- source_port_max: int,
- source_port_min: int,
- *,
- before: 'NetworkACLRuleReference' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ source: str,
+ destination_port_max: int,
+ destination_port_min: int,
+ protocol: str,
+ source_port_max: int,
+ source_port_min: int,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP object.
@@ -90313,6 +95931,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -90321,6 +95940,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -90329,6 +95949,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -90336,10 +95957,12 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
TCP = 'tcp'
UDP = 'udp'
+
class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(NetworkACLRulePrototypeNetworkACLContext):
"""
NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.
@@ -90357,15 +95980,17 @@ class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype
:attr str protocol: The protocol to enforce.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- source: str,
- protocol: str,
- *,
- ip_version: str = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ source: str,
+ protocol: str,
+ *,
+ ip_version: str = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype object.
@@ -90466,6 +96091,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -90474,6 +96100,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -90482,6 +96109,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -90489,9 +96117,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
+
class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype(NetworkACLRulePrototypeNetworkACLContext):
"""
NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype.
@@ -90514,17 +96144,19 @@ class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototyp
If unspecified, all types are matched.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- source: str,
- protocol: str,
- *,
- ip_version: str = None,
- name: str = None,
- code: int = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ source: str,
+ protocol: str,
+ *,
+ ip_version: str = None,
+ name: str = None,
+ code: int = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype object.
@@ -90640,6 +96272,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -90648,6 +96281,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -90656,6 +96290,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -90663,9 +96298,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ICMP = 'icmp'
+
class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRulePrototypeNetworkACLContext):
"""
NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype.
@@ -90691,19 +96328,21 @@ class NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPProtot
source port range.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- source: str,
- protocol: str,
- *,
- ip_version: str = None,
- name: str = None,
- destination_port_max: int = None,
- destination_port_min: int = None,
- source_port_max: int = None,
- source_port_min: int = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ source: str,
+ protocol: str,
+ *,
+ ip_version: str = None,
+ name: str = None,
+ destination_port_max: int = None,
+ destination_port_min: int = None,
+ source_port_max: int = None,
+ source_port_min: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype object.
@@ -90832,6 +96471,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -90840,6 +96480,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -90848,6 +96489,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -90855,10 +96497,12 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
TCP = 'tcp'
UDP = 'udp'
+
class NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(NetworkACLRulePrototype):
"""
NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.
@@ -90877,16 +96521,18 @@ class NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(NetworkACLRulePr
:attr str protocol: The protocol to enforce.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleBeforePrototype' = None,
- ip_version: str = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleBeforePrototype' = None,
+ ip_version: str = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype object.
@@ -90996,6 +96642,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -91004,6 +96651,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -91012,6 +96660,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -91019,9 +96668,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
+
class NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype(NetworkACLRulePrototype):
"""
NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype.
@@ -91045,18 +96696,20 @@ class NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype(NetworkACLRuleP
If unspecified, all types are matched.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleBeforePrototype' = None,
- ip_version: str = None,
- name: str = None,
- code: int = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleBeforePrototype' = None,
+ ip_version: str = None,
+ name: str = None,
+ code: int = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype object.
@@ -91181,6 +96834,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -91189,6 +96843,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -91197,6 +96852,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -91204,9 +96860,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ICMP = 'icmp'
+
class NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRulePrototype):
"""
NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype.
@@ -91233,20 +96891,22 @@ class NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype(NetworkACLRul
source port range.
"""
- def __init__(self,
- action: str,
- destination: str,
- direction: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleBeforePrototype' = None,
- ip_version: str = None,
- name: str = None,
- destination_port_max: int = None,
- destination_port_min: int = None,
- source_port_max: int = None,
- source_port_min: int = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ destination: str,
+ direction: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleBeforePrototype' = None,
+ ip_version: str = None,
+ name: str = None,
+ destination_port_max: int = None,
+ destination_port_min: int = None,
+ source_port_max: int = None,
+ source_port_min: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype object.
@@ -91384,6 +97044,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -91392,6 +97053,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -91400,6 +97062,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -91407,10 +97070,12 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
TCP = 'tcp'
UDP = 'udp'
+
class NetworkACLRuleNetworkACLRuleProtocolAll(NetworkACLRule):
"""
NetworkACLRuleNetworkACLRuleProtocolAll.
@@ -91432,19 +97097,21 @@ class NetworkACLRuleNetworkACLRuleProtocolAll(NetworkACLRule):
:attr str protocol: The protocol to enforce.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleReference' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleNetworkACLRuleProtocolAll object.
@@ -91582,6 +97249,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -91590,6 +97258,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -91598,6 +97267,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -91605,9 +97275,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
+
class NetworkACLRuleNetworkACLRuleProtocolICMP(NetworkACLRule):
"""
NetworkACLRuleNetworkACLRuleProtocolICMP.
@@ -91633,21 +97305,23 @@ class NetworkACLRuleNetworkACLRuleProtocolICMP(NetworkACLRule):
If absent, all types are matched.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- source: str,
- protocol: str,
- *,
- before: 'NetworkACLRuleReference' = None,
- code: int = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ source: str,
+ protocol: str,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ code: int = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleNetworkACLRuleProtocolICMP object.
@@ -91799,6 +97473,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -91807,6 +97482,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -91815,6 +97491,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -91822,9 +97499,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ICMP = 'icmp'
+
class NetworkACLRuleNetworkACLRuleProtocolTCPUDP(NetworkACLRule):
"""
NetworkACLRuleNetworkACLRuleProtocolTCPUDP.
@@ -91854,23 +97533,25 @@ class NetworkACLRuleNetworkACLRuleProtocolTCPUDP(NetworkACLRule):
range.
"""
- def __init__(self,
- action: str,
- created_at: datetime,
- destination: str,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- name: str,
- source: str,
- destination_port_max: int,
- destination_port_min: int,
- protocol: str,
- source_port_max: int,
- source_port_min: int,
- *,
- before: 'NetworkACLRuleReference' = None) -> None:
+ def __init__(
+ self,
+ action: str,
+ created_at: datetime,
+ destination: str,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ name: str,
+ source: str,
+ destination_port_max: int,
+ destination_port_min: int,
+ protocol: str,
+ source_port_max: int,
+ source_port_min: int,
+ *,
+ before: 'NetworkACLRuleReference' = None,
+ ) -> None:
"""
Initialize a NetworkACLRuleNetworkACLRuleProtocolTCPUDP object.
@@ -92044,6 +97725,7 @@ class ActionEnum(str, Enum):
"""
The action to perform for a packet matching the rule.
"""
+
ALLOW = 'allow'
DENY = 'deny'
@@ -92052,6 +97734,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to match.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -92060,6 +97743,7 @@ class IpVersionEnum(str, Enum):
"""
The IP version for this rule.
"""
+
IPV4 = 'ipv4'
@@ -92067,26 +97751,32 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
TCP = 'tcp'
UDP = 'udp'
+
class NetworkInterfaceIPPrototypeReservedIPIdentity(NetworkInterfaceIPPrototype):
"""
Identifies a reserved IP by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a NetworkInterfaceIPPrototypeReservedIPIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById', 'NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref']))
+ ", ".join(['NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById', 'NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref'])
+ )
raise Exception(msg)
+
class NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(NetworkInterfaceIPPrototype):
"""
NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext.
@@ -92104,11 +97794,13 @@ class NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(Netw
name will be a hyphenated list of randomly-selected words.
"""
- def __init__(self,
- *,
- address: str = None,
- auto_delete: bool = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ address: str = None,
+ auto_delete: bool = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext object.
@@ -92175,6 +97867,7 @@ def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkIn
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class OperatingSystemIdentityByHref(OperatingSystemIdentity):
"""
OperatingSystemIdentityByHref.
@@ -92182,8 +97875,10 @@ class OperatingSystemIdentityByHref(OperatingSystemIdentity):
:attr str href: The URL for this operating system.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a OperatingSystemIdentityByHref object.
@@ -92232,6 +97927,7 @@ def __ne__(self, other: 'OperatingSystemIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class OperatingSystemIdentityByName(OperatingSystemIdentity):
"""
OperatingSystemIdentityByName.
@@ -92239,8 +97935,10 @@ class OperatingSystemIdentityByName(OperatingSystemIdentity):
:attr str name: The globally unique name for this operating system.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a OperatingSystemIdentityByName object.
@@ -92289,22 +97987,27 @@ def __ne__(self, other: 'OperatingSystemIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayFloatingIPPrototypeFloatingIPIdentity(PublicGatewayFloatingIPPrototype):
"""
Identifies a floating IP by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress']))
+ ", ".join(['PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref', 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress'])
+ )
raise Exception(msg)
+
class PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(PublicGatewayFloatingIPPrototype):
"""
PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext.
@@ -92317,10 +98020,12 @@ class PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(PublicGat
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
"""
- def __init__(self,
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext object.
@@ -92381,6 +98086,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTarg
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayIdentityPublicGatewayIdentityByCRN(PublicGatewayIdentity):
"""
PublicGatewayIdentityPublicGatewayIdentityByCRN.
@@ -92388,8 +98094,10 @@ class PublicGatewayIdentityPublicGatewayIdentityByCRN(PublicGatewayIdentity):
:attr str crn: The CRN for this public gateway.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a PublicGatewayIdentityPublicGatewayIdentityByCRN object.
@@ -92438,6 +98146,7 @@ def __ne__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityByCRN') -> bo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayIdentityPublicGatewayIdentityByHref(PublicGatewayIdentity):
"""
PublicGatewayIdentityPublicGatewayIdentityByHref.
@@ -92445,8 +98154,10 @@ class PublicGatewayIdentityPublicGatewayIdentityByHref(PublicGatewayIdentity):
:attr str href: The URL for this public gateway.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a PublicGatewayIdentityPublicGatewayIdentityByHref object.
@@ -92495,6 +98206,7 @@ def __ne__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityByHref') -> b
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayIdentityPublicGatewayIdentityById(PublicGatewayIdentity):
"""
PublicGatewayIdentityPublicGatewayIdentityById.
@@ -92502,8 +98214,10 @@ class PublicGatewayIdentityPublicGatewayIdentityById(PublicGatewayIdentity):
:attr str id: The unique identifier for this public gateway.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a PublicGatewayIdentityPublicGatewayIdentityById object.
@@ -92552,22 +98266,27 @@ def __ne__(self, other: 'PublicGatewayIdentityPublicGatewayIdentityById') -> boo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ReservedIPTargetPrototypeEndpointGatewayIdentity(ReservedIPTargetPrototype):
"""
ReservedIPTargetPrototypeEndpointGatewayIdentity.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById', 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN', 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref']))
+ ", ".join(['ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById', 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN', 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref'])
+ )
raise Exception(msg)
+
class ReservedIPTargetEndpointGatewayReference(ReservedIPTarget):
"""
ReservedIPTargetEndpointGatewayReference.
@@ -92583,14 +98302,16 @@ class ReservedIPTargetEndpointGatewayReference(ReservedIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'EndpointGatewayReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'EndpointGatewayReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPTargetEndpointGatewayReference object.
@@ -92687,9 +98408,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
ENDPOINT_GATEWAY = 'endpoint_gateway'
+
class ReservedIPTargetGenericResourceReference(ReservedIPTarget):
"""
Identifying information for a resource that is not native to the VPC API.
@@ -92701,11 +98424,13 @@ class ReservedIPTargetGenericResourceReference(ReservedIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- resource_type: str,
- *,
- deleted: 'GenericResourceReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ resource_type: str,
+ *,
+ deleted: 'GenericResourceReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPTargetGenericResourceReference object.
@@ -92777,9 +98502,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
CLOUD_RESOURCE = 'cloud_resource'
+
class ReservedIPTargetLoadBalancerReference(ReservedIPTarget):
"""
ReservedIPTargetLoadBalancerReference.
@@ -92795,14 +98522,16 @@ class ReservedIPTargetLoadBalancerReference(ReservedIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'LoadBalancerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'LoadBalancerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPTargetLoadBalancerReference object.
@@ -92899,9 +98628,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
LOAD_BALANCER = 'load_balancer'
+
class ReservedIPTargetNetworkInterfaceReferenceTargetContext(ReservedIPTarget):
"""
ReservedIPTargetNetworkInterfaceReferenceTargetContext.
@@ -92916,13 +98647,15 @@ class ReservedIPTargetNetworkInterfaceReferenceTargetContext(ReservedIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'NetworkInterfaceReferenceTargetContextDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'NetworkInterfaceReferenceTargetContextDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPTargetNetworkInterfaceReferenceTargetContext object.
@@ -93011,9 +98744,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
+
class ReservedIPTargetVPNGatewayReference(ReservedIPTarget):
"""
ReservedIPTargetVPNGatewayReference.
@@ -93029,14 +98764,16 @@ class ReservedIPTargetVPNGatewayReference(ReservedIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNGatewayReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNGatewayReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPTargetVPNGatewayReference object.
@@ -93133,9 +98870,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY = 'vpn_gateway'
+
class ReservedIPTargetVPNServerReference(ReservedIPTarget):
"""
ReservedIPTargetVPNServerReference.
@@ -93151,14 +98890,16 @@ class ReservedIPTargetVPNServerReference(ReservedIPTarget):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNServerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNServerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a ReservedIPTargetVPNServerReference object.
@@ -93255,9 +98996,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_SERVER = 'vpn_server'
+
class ResourceGroupIdentityById(ResourceGroupIdentity):
"""
ResourceGroupIdentityById.
@@ -93265,8 +99008,10 @@ class ResourceGroupIdentityById(ResourceGroupIdentity):
:attr str id: The unique identifier for this resource group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a ResourceGroupIdentityById object.
@@ -93315,6 +99060,7 @@ def __ne__(self, other: 'ResourceGroupIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class RouteCreatorVPNGatewayReference(RouteCreator):
"""
RouteCreatorVPNGatewayReference.
@@ -93330,14 +99076,16 @@ class RouteCreatorVPNGatewayReference(RouteCreator):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNGatewayReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNGatewayReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a RouteCreatorVPNGatewayReference object.
@@ -93434,9 +99182,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY = 'vpn_gateway'
+
class RouteCreatorVPNServerReference(RouteCreator):
"""
RouteCreatorVPNServerReference.
@@ -93452,14 +99202,16 @@ class RouteCreatorVPNServerReference(RouteCreator):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNServerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNServerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a RouteCreatorVPNServerReference object.
@@ -93556,9 +99308,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_SERVER = 'vpn_server'
+
class RouteNextHopIP(RouteNextHop):
"""
RouteNextHopIP.
@@ -93570,8 +99324,10 @@ class RouteNextHopIP(RouteNextHop):
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a RouteNextHopIP object.
@@ -93625,71 +99381,26 @@ def __ne__(self, other: 'RouteNextHopIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class RouteNextHopPatchRouteNextHopIP(RouteNextHopPatch):
"""
- The IP address of the next hop to which to route packets.
+ RouteNextHopPatchRouteNextHopIP.
- :attr str address: The IP address.
- This property may add support for IPv6 addresses in the future. When processing
- a value in this property, verify that the address is in an expected format. If
- it is not, log an error. Optionally halt processing and surface the error, or
- bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RouteNextHopPatchRouteNextHopIP object.
- :param str address: The IP address.
- This property may add support for IPv6 addresses in the future. When
- processing a value in this property, verify that the address is in an
- expected format. If it is not, log an error. Optionally halt processing and
- surface the error, or bypass the resource on which the unexpected IP
- address format was encountered.
"""
# pylint: disable=super-init-not-called
- self.address = address
-
- @classmethod
- def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIP':
- """Initialize a RouteNextHopPatchRouteNextHopIP object from a json dictionary."""
- args = {}
- if 'address' in _dict:
- args['address'] = _dict.get('address')
- else:
- raise ValueError('Required property \'address\' not present in RouteNextHopPatchRouteNextHopIP JSON')
- return cls(**args)
-
- @classmethod
- def _from_dict(cls, _dict):
- """Initialize a RouteNextHopPatchRouteNextHopIP 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, 'address') and self.address is not None:
- _dict['address'] = self.address
- 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 RouteNextHopPatchRouteNextHopIP object."""
- return json.dumps(self.to_dict(), indent=2)
-
- def __eq__(self, other: 'RouteNextHopPatchRouteNextHopIP') -> bool:
- """Return `true` when self and other are equal, false otherwise."""
- if not isinstance(other, self.__class__):
- return False
- return self.__dict__ == other.__dict__
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP', 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP'])
+ )
+ raise Exception(msg)
- def __ne__(self, other: 'RouteNextHopPatchRouteNextHopIP') -> bool:
- """Return `true` when self and other are not equal, false otherwise."""
- return not self == other
class RouteNextHopPatchVPNGatewayConnectionIdentity(RouteNextHopPatch):
"""
@@ -93697,16 +99408,20 @@ class RouteNextHopPatchVPNGatewayConnectionIdentity(RouteNextHopPatch):
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RouteNextHopPatchVPNGatewayConnectionIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref']))
+ ", ".join(['RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref'])
+ )
raise Exception(msg)
+
class RouteNextHopVPNGatewayConnectionReference(RouteNextHop):
"""
RouteNextHopVPNGatewayConnectionReference.
@@ -93721,13 +99436,15 @@ class RouteNextHopVPNGatewayConnectionReference(RouteNextHop):
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNGatewayConnectionReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNGatewayConnectionReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a RouteNextHopVPNGatewayConnectionReference object.
@@ -93817,74 +99534,30 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection'
+
class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP(RoutePrototypeNextHop):
"""
- The IP address of the next hop to which to route packets.
+ RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP.
- :attr str address: The IP address.
- This property may add support for IPv6 addresses in the future. When processing
- a value in this property, verify that the address is in an expected format. If
- it is not, log an error. Optionally halt processing and surface the error, or
- bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP object.
- :param str address: The IP address.
- This property may add support for IPv6 addresses in the future. When
- processing a value in this property, verify that the address is in an
- expected format. If it is not, log an error. Optionally halt processing and
- surface the error, or bypass the resource on which the unexpected IP
- address format was encountered.
"""
# pylint: disable=super-init-not-called
- self.address = address
-
- @classmethod
- def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP':
- """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP object from a json dictionary."""
- args = {}
- if 'address' in _dict:
- args['address'] = _dict.get('address')
- else:
- raise ValueError('Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP JSON')
- return cls(**args)
-
- @classmethod
- def _from_dict(cls, _dict):
- """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP 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, 'address') and self.address is not None:
- _dict['address'] = self.address
- 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 RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP object."""
- return json.dumps(self.to_dict(), indent=2)
-
- def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP') -> bool:
- """Return `true` when self and other are equal, false otherwise."""
- if not isinstance(other, self.__class__):
- return False
- return self.__dict__ == other.__dict__
+ msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
+ ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP', 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP'])
+ )
+ raise Exception(msg)
- def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP') -> bool:
- """Return `true` when self and other are not equal, false otherwise."""
- return not self == other
class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity(RoutePrototypeNextHop):
"""
@@ -93892,16 +99565,20 @@ class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity(Rou
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref']))
+ ", ".join(['RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById', 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref'])
+ )
raise Exception(msg)
+
class RoutingTableIdentityByHref(RoutingTableIdentity):
"""
RoutingTableIdentityByHref.
@@ -93909,8 +99586,10 @@ class RoutingTableIdentityByHref(RoutingTableIdentity):
:attr str href: The URL for this routing table.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RoutingTableIdentityByHref object.
@@ -93959,6 +99638,7 @@ def __ne__(self, other: 'RoutingTableIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class RoutingTableIdentityById(RoutingTableIdentity):
"""
RoutingTableIdentityById.
@@ -93966,8 +99646,10 @@ class RoutingTableIdentityById(RoutingTableIdentity):
:attr str id: The unique identifier for this routing table.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a RoutingTableIdentityById object.
@@ -94016,6 +99698,7 @@ def __ne__(self, other: 'RoutingTableIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupIdentityByCRN(SecurityGroupIdentity):
"""
SecurityGroupIdentityByCRN.
@@ -94023,8 +99706,10 @@ class SecurityGroupIdentityByCRN(SecurityGroupIdentity):
:attr str crn: The security group's CRN.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a SecurityGroupIdentityByCRN object.
@@ -94073,6 +99758,7 @@ def __ne__(self, other: 'SecurityGroupIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupIdentityByHref(SecurityGroupIdentity):
"""
SecurityGroupIdentityByHref.
@@ -94080,8 +99766,10 @@ class SecurityGroupIdentityByHref(SecurityGroupIdentity):
:attr str href: The security group's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupIdentityByHref object.
@@ -94130,6 +99818,7 @@ def __ne__(self, other: 'SecurityGroupIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupIdentityById(SecurityGroupIdentity):
"""
SecurityGroupIdentityById.
@@ -94137,8 +99826,10 @@ class SecurityGroupIdentityById(SecurityGroupIdentity):
:attr str id: The unique identifier for this security group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a SecurityGroupIdentityById object.
@@ -94187,6 +99878,7 @@ def __ne__(self, other: 'SecurityGroupIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(SecurityGroupRulePrototype):
"""
A rule allowing traffic for all supported protocols.
@@ -94208,12 +99900,14 @@ class SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(SecurityGroupRulePr
(or to any destination, for outbound rules).
"""
- def __init__(self,
- direction: str,
- protocol: str,
- *,
- ip_version: str = None,
- remote: 'SecurityGroupRuleRemotePrototype' = None) -> None:
+ def __init__(
+ self,
+ direction: str,
+ protocol: str,
+ *,
+ ip_version: str = None,
+ remote: 'SecurityGroupRuleRemotePrototype' = None,
+ ) -> None:
"""
Initialize a SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll object.
@@ -94300,6 +99994,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -94311,6 +100006,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -94318,9 +100014,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
+
class SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP(SecurityGroupRulePrototype):
"""
A rule specifying the ICMP traffic to allow.
@@ -94347,14 +100045,16 @@ class SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP(SecurityGroupRuleP
If unspecified, all types are allowed.
"""
- def __init__(self,
- direction: str,
- protocol: str,
- *,
- code: int = None,
- ip_version: str = None,
- remote: 'SecurityGroupRuleRemotePrototype' = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ direction: str,
+ protocol: str,
+ *,
+ code: int = None,
+ ip_version: str = None,
+ remote: 'SecurityGroupRuleRemotePrototype' = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP object.
@@ -94456,6 +100156,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -94467,6 +100168,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -94474,9 +100176,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ICMP = 'icmp'
+
class SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP(SecurityGroupRulePrototype):
"""
A rule specifying the TCP or UDP traffic to allow.
@@ -94507,14 +100211,16 @@ class SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP(SecurityGroupRul
(or to any destination, for outbound rules).
"""
- def __init__(self,
- direction: str,
- protocol: str,
- *,
- ip_version: str = None,
- port_max: int = None,
- port_min: int = None,
- remote: 'SecurityGroupRuleRemotePrototype' = None) -> None:
+ def __init__(
+ self,
+ direction: str,
+ protocol: str,
+ *,
+ ip_version: str = None,
+ port_max: int = None,
+ port_min: int = None,
+ remote: 'SecurityGroupRuleRemotePrototype' = None,
+ ) -> None:
"""
Initialize a SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP object.
@@ -94621,6 +100327,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -94632,6 +100339,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -94639,10 +100347,12 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
TCP = 'tcp'
UDP = 'udp'
+
class SecurityGroupRuleRemotePatchCIDR(SecurityGroupRuleRemotePatch):
"""
SecurityGroupRuleRemotePatchCIDR.
@@ -94654,8 +100364,10 @@ class SecurityGroupRuleRemotePatchCIDR(SecurityGroupRuleRemotePatch):
unexpected CIDR block format was encountered.
"""
- def __init__(self,
- cidr_block: str) -> None:
+ def __init__(
+ self,
+ cidr_block: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatchCIDR object.
@@ -94708,6 +100420,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchCIDR') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePatchIP(SecurityGroupRuleRemotePatch):
"""
SecurityGroupRuleRemotePatchIP.
@@ -94719,8 +100432,10 @@ class SecurityGroupRuleRemotePatchIP(SecurityGroupRuleRemotePatch):
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatchIP object.
@@ -94774,22 +100489,27 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePatchSecurityGroupIdentity(SecurityGroupRuleRemotePatch):
"""
Identifies a security group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById', 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN', 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref']))
+ ", ".join(['SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById', 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN', 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref'])
+ )
raise Exception(msg)
+
class SecurityGroupRuleRemotePrototypeCIDR(SecurityGroupRuleRemotePrototype):
"""
SecurityGroupRuleRemotePrototypeCIDR.
@@ -94801,8 +100521,10 @@ class SecurityGroupRuleRemotePrototypeCIDR(SecurityGroupRuleRemotePrototype):
unexpected CIDR block format was encountered.
"""
- def __init__(self,
- cidr_block: str) -> None:
+ def __init__(
+ self,
+ cidr_block: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototypeCIDR object.
@@ -94855,6 +100577,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeCIDR') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePrototypeIP(SecurityGroupRuleRemotePrototype):
"""
SecurityGroupRuleRemotePrototypeIP.
@@ -94866,8 +100589,10 @@ class SecurityGroupRuleRemotePrototypeIP(SecurityGroupRuleRemotePrototype):
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototypeIP object.
@@ -94921,22 +100646,27 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePrototypeSecurityGroupIdentity(SecurityGroupRuleRemotePrototype):
"""
Identifies a security group by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref']))
+ ", ".join(['SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN', 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref'])
+ )
raise Exception(msg)
+
class SecurityGroupRuleRemoteCIDR(SecurityGroupRuleRemote):
"""
SecurityGroupRuleRemoteCIDR.
@@ -94948,8 +100678,10 @@ class SecurityGroupRuleRemoteCIDR(SecurityGroupRuleRemote):
unexpected CIDR block format was encountered.
"""
- def __init__(self,
- cidr_block: str) -> None:
+ def __init__(
+ self,
+ cidr_block: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemoteCIDR object.
@@ -95002,6 +100734,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemoteCIDR') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemoteIP(SecurityGroupRuleRemote):
"""
SecurityGroupRuleRemoteIP.
@@ -95013,8 +100746,10 @@ class SecurityGroupRuleRemoteIP(SecurityGroupRuleRemote):
bypass the resource on which the unexpected IP address format was encountered.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemoteIP object.
@@ -95068,6 +100803,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemoteIP') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemoteSecurityGroupReference(SecurityGroupRuleRemote):
"""
SecurityGroupRuleRemoteSecurityGroupReference.
@@ -95082,13 +100818,15 @@ class SecurityGroupRuleRemoteSecurityGroupReference(SecurityGroupRuleRemote):
security groups for the VPC.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- *,
- deleted: 'SecurityGroupReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ *,
+ deleted: 'SecurityGroupReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemoteSecurityGroupReference object.
@@ -95173,6 +100911,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemoteSecurityGroupReference') -> bool
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleSecurityGroupRuleProtocolAll(SecurityGroupRule):
"""
A rule allowing traffic for all supported protocols.
@@ -95189,13 +100928,15 @@ class SecurityGroupRuleSecurityGroupRuleProtocolAll(SecurityGroupRule):
:attr str protocol: The protocol to enforce.
"""
- def __init__(self,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- remote: 'SecurityGroupRuleRemote',
- protocol: str) -> None:
+ def __init__(
+ self,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ remote: 'SecurityGroupRuleRemote',
+ protocol: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleSecurityGroupRuleProtocolAll object.
@@ -95295,6 +101036,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -95306,6 +101048,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -95313,9 +101056,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ALL = 'all'
+
class SecurityGroupRuleSecurityGroupRuleProtocolICMP(SecurityGroupRule):
"""
A rule specifying the ICMP traffic to allow.
@@ -95336,16 +101081,18 @@ class SecurityGroupRuleSecurityGroupRuleProtocolICMP(SecurityGroupRule):
are allowed.
"""
- def __init__(self,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- remote: 'SecurityGroupRuleRemote',
- protocol: str,
- *,
- code: int = None,
- type: int = None) -> None:
+ def __init__(
+ self,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ remote: 'SecurityGroupRuleRemote',
+ protocol: str,
+ *,
+ code: int = None,
+ type: int = None,
+ ) -> None:
"""
Initialize a SecurityGroupRuleSecurityGroupRuleProtocolICMP object.
@@ -95459,6 +101206,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -95470,6 +101218,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -95477,9 +101226,11 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
ICMP = 'icmp'
+
class SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP(SecurityGroupRule):
"""
A rule specifying the TCP or UDP traffic to allow.
@@ -95501,16 +101252,18 @@ class SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP(SecurityGroupRule):
:attr str protocol: The protocol to enforce.
"""
- def __init__(self,
- direction: str,
- href: str,
- id: str,
- ip_version: str,
- remote: 'SecurityGroupRuleRemote',
- protocol: str,
- *,
- port_max: int = None,
- port_min: int = None) -> None:
+ def __init__(
+ self,
+ direction: str,
+ href: str,
+ id: str,
+ ip_version: str,
+ remote: 'SecurityGroupRuleRemote',
+ protocol: str,
+ *,
+ port_max: int = None,
+ port_min: int = None,
+ ) -> None:
"""
Initialize a SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP object.
@@ -95624,6 +101377,7 @@ class DirectionEnum(str, Enum):
"""
The direction of traffic to enforce.
"""
+
INBOUND = 'inbound'
OUTBOUND = 'outbound'
@@ -95635,6 +101389,7 @@ class IpVersionEnum(str, Enum):
a security group, then this rule only applies to IP addresses (network interfaces)
in that group matching this IP version.
"""
+
IPV4 = 'ipv4'
@@ -95642,10 +101397,12 @@ class ProtocolEnum(str, Enum):
"""
The protocol to enforce.
"""
+
TCP = 'tcp'
UDP = 'udp'
+
class SecurityGroupTargetReferenceEndpointGatewayReference(SecurityGroupTargetReference):
"""
SecurityGroupTargetReferenceEndpointGatewayReference.
@@ -95661,14 +101418,16 @@ class SecurityGroupTargetReferenceEndpointGatewayReference(SecurityGroupTargetRe
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'EndpointGatewayReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'EndpointGatewayReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SecurityGroupTargetReferenceEndpointGatewayReference object.
@@ -95765,9 +101524,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
ENDPOINT_GATEWAY = 'endpoint_gateway'
+
class SecurityGroupTargetReferenceLoadBalancerReference(SecurityGroupTargetReference):
"""
SecurityGroupTargetReferenceLoadBalancerReference.
@@ -95783,14 +101544,16 @@ class SecurityGroupTargetReferenceLoadBalancerReference(SecurityGroupTargetRefer
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'LoadBalancerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'LoadBalancerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SecurityGroupTargetReferenceLoadBalancerReference object.
@@ -95887,9 +101650,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
LOAD_BALANCER = 'load_balancer'
+
class SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(SecurityGroupTargetReference):
"""
SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.
@@ -95904,13 +101669,15 @@ class SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(Securit
:attr str resource_type: The resource type.
"""
- def __init__(self,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'NetworkInterfaceReferenceTargetContextDeleted' = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'NetworkInterfaceReferenceTargetContextDeleted' = None,
+ ) -> None:
"""
Initialize a SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext object.
@@ -95999,9 +101766,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
NETWORK_INTERFACE = 'network_interface'
+
class SecurityGroupTargetReferenceVPNServerReference(SecurityGroupTargetReference):
"""
SecurityGroupTargetReferenceVPNServerReference.
@@ -96017,14 +101786,16 @@ class SecurityGroupTargetReferenceVPNServerReference(SecurityGroupTargetReferenc
:attr str resource_type: The resource type.
"""
- def __init__(self,
- crn: str,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- *,
- deleted: 'VPNServerReferenceDeleted' = None) -> None:
+ def __init__(
+ self,
+ crn: str,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ *,
+ deleted: 'VPNServerReferenceDeleted' = None,
+ ) -> None:
"""
Initialize a SecurityGroupTargetReferenceVPNServerReference object.
@@ -96121,9 +101892,11 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_SERVER = 'vpn_server'
+
class SnapshotIdentityByCRN(SnapshotIdentity):
"""
SnapshotIdentityByCRN.
@@ -96131,8 +101904,10 @@ class SnapshotIdentityByCRN(SnapshotIdentity):
:attr str crn: The CRN of this snapshot.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a SnapshotIdentityByCRN object.
@@ -96181,6 +101956,7 @@ def __ne__(self, other: 'SnapshotIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SnapshotIdentityByHref(SnapshotIdentity):
"""
SnapshotIdentityByHref.
@@ -96188,8 +101964,10 @@ class SnapshotIdentityByHref(SnapshotIdentity):
:attr str href: The URL for this snapshot.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SnapshotIdentityByHref object.
@@ -96238,6 +102016,7 @@ def __ne__(self, other: 'SnapshotIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SnapshotIdentityById(SnapshotIdentity):
"""
SnapshotIdentityById.
@@ -96245,8 +102024,10 @@ class SnapshotIdentityById(SnapshotIdentity):
:attr str id: The unique identifier for this snapshot.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a SnapshotIdentityById object.
@@ -96295,6 +102076,7 @@ def __ne__(self, other: 'SnapshotIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SnapshotPrototypeSnapshotBySourceVolume(SnapshotPrototype):
"""
SnapshotPrototypeSnapshotBySourceVolume.
@@ -96311,13 +102093,15 @@ class SnapshotPrototypeSnapshotBySourceVolume(SnapshotPrototype):
:attr VolumeIdentity source_volume: The volume to create this snapshot from.
"""
- def __init__(self,
- source_volume: 'VolumeIdentity',
- *,
- clones: List['SnapshotClonePrototype'] = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ source_volume: 'VolumeIdentity',
+ *,
+ clones: List['SnapshotClonePrototype'] = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a SnapshotPrototypeSnapshotBySourceVolume object.
@@ -96408,6 +102192,7 @@ def __ne__(self, other: 'SnapshotPrototypeSnapshotBySourceVolume') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SubnetIdentityByCRN(SubnetIdentity):
"""
SubnetIdentityByCRN.
@@ -96415,8 +102200,10 @@ class SubnetIdentityByCRN(SubnetIdentity):
:attr str crn: The CRN for this subnet.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a SubnetIdentityByCRN object.
@@ -96465,6 +102252,7 @@ def __ne__(self, other: 'SubnetIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SubnetIdentityByHref(SubnetIdentity):
"""
SubnetIdentityByHref.
@@ -96472,8 +102260,10 @@ class SubnetIdentityByHref(SubnetIdentity):
:attr str href: The URL for this subnet.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SubnetIdentityByHref object.
@@ -96522,6 +102312,7 @@ def __ne__(self, other: 'SubnetIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SubnetIdentityById(SubnetIdentity):
"""
SubnetIdentityById.
@@ -96529,8 +102320,10 @@ class SubnetIdentityById(SubnetIdentity):
:attr str id: The unique identifier for this subnet.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a SubnetIdentityById object.
@@ -96579,6 +102372,7 @@ def __ne__(self, other: 'SubnetIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SubnetPrototypeSubnetByCIDR(SubnetPrototype):
"""
SubnetPrototypeSubnetByCIDR.
@@ -96609,17 +102403,19 @@ class SubnetPrototypeSubnetByCIDR(SubnetPrototype):
:attr ZoneIdentity zone: (optional) The zone this subnet will reside in.
"""
- def __init__(self,
- vpc: 'VPCIdentity',
- ipv4_cidr_block: str,
- *,
- ip_version: str = None,
- name: str = None,
- network_acl: 'NetworkACLIdentity' = None,
- public_gateway: 'PublicGatewayIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- routing_table: 'RoutingTableIdentity' = None,
- zone: 'ZoneIdentity' = None) -> None:
+ def __init__(
+ self,
+ vpc: 'VPCIdentity',
+ ipv4_cidr_block: str,
+ *,
+ ip_version: str = None,
+ name: str = None,
+ network_acl: 'NetworkACLIdentity' = None,
+ public_gateway: 'PublicGatewayIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ routing_table: 'RoutingTableIdentity' = None,
+ zone: 'ZoneIdentity' = None,
+ ) -> None:
"""
Initialize a SubnetPrototypeSubnetByCIDR object.
@@ -96758,9 +102554,11 @@ class IpVersionEnum(str, Enum):
"""
The IP version(s) to support for this subnet.
"""
+
IPV4 = 'ipv4'
+
class SubnetPrototypeSubnetByTotalCount(SubnetPrototype):
"""
SubnetPrototypeSubnetByTotalCount.
@@ -96788,17 +102586,19 @@ class SubnetPrototypeSubnetByTotalCount(SubnetPrototype):
:attr ZoneIdentity zone: The zone this subnet will reside in.
"""
- def __init__(self,
- vpc: 'VPCIdentity',
- total_ipv4_address_count: int,
- zone: 'ZoneIdentity',
- *,
- ip_version: str = None,
- name: str = None,
- network_acl: 'NetworkACLIdentity' = None,
- public_gateway: 'PublicGatewayIdentity' = None,
- resource_group: 'ResourceGroupIdentity' = None,
- routing_table: 'RoutingTableIdentity' = None) -> None:
+ def __init__(
+ self,
+ vpc: 'VPCIdentity',
+ total_ipv4_address_count: int,
+ zone: 'ZoneIdentity',
+ *,
+ ip_version: str = None,
+ name: str = None,
+ network_acl: 'NetworkACLIdentity' = None,
+ public_gateway: 'PublicGatewayIdentity' = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ routing_table: 'RoutingTableIdentity' = None,
+ ) -> None:
"""
Initialize a SubnetPrototypeSubnetByTotalCount object.
@@ -96935,9 +102735,11 @@ class IpVersionEnum(str, Enum):
"""
The IP version(s) to support for this subnet.
"""
+
IPV4 = 'ipv4'
+
class SubnetPublicGatewayPatchPublicGatewayIdentityByCRN(SubnetPublicGatewayPatch):
"""
SubnetPublicGatewayPatchPublicGatewayIdentityByCRN.
@@ -96945,8 +102747,10 @@ class SubnetPublicGatewayPatchPublicGatewayIdentityByCRN(SubnetPublicGatewayPatc
:attr str crn: The CRN for this public gateway.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a SubnetPublicGatewayPatchPublicGatewayIdentityByCRN object.
@@ -96995,6 +102799,7 @@ def __ne__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByCRN') ->
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SubnetPublicGatewayPatchPublicGatewayIdentityByHref(SubnetPublicGatewayPatch):
"""
SubnetPublicGatewayPatchPublicGatewayIdentityByHref.
@@ -97002,8 +102807,10 @@ class SubnetPublicGatewayPatchPublicGatewayIdentityByHref(SubnetPublicGatewayPat
:attr str href: The URL for this public gateway.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SubnetPublicGatewayPatchPublicGatewayIdentityByHref object.
@@ -97052,6 +102859,7 @@ def __ne__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityByHref') -
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SubnetPublicGatewayPatchPublicGatewayIdentityById(SubnetPublicGatewayPatch):
"""
SubnetPublicGatewayPatchPublicGatewayIdentityById.
@@ -97059,8 +102867,10 @@ class SubnetPublicGatewayPatchPublicGatewayIdentityById(SubnetPublicGatewayPatch
:attr str id: The unique identifier for this public gateway.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a SubnetPublicGatewayPatchPublicGatewayIdentityById object.
@@ -97109,6 +102919,7 @@ def __ne__(self, other: 'SubnetPublicGatewayPatchPublicGatewayIdentityById') ->
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class TrustedProfileIdentityTrustedProfileByCRN(TrustedProfileIdentity):
"""
TrustedProfileIdentityTrustedProfileByCRN.
@@ -97116,8 +102927,10 @@ class TrustedProfileIdentityTrustedProfileByCRN(TrustedProfileIdentity):
:attr str crn: The CRN for this trusted profile.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a TrustedProfileIdentityTrustedProfileByCRN object.
@@ -97166,6 +102979,7 @@ def __ne__(self, other: 'TrustedProfileIdentityTrustedProfileByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class TrustedProfileIdentityTrustedProfileById(TrustedProfileIdentity):
"""
TrustedProfileIdentityTrustedProfileById.
@@ -97173,8 +102987,10 @@ class TrustedProfileIdentityTrustedProfileById(TrustedProfileIdentity):
:attr str id: The unique identifier for this trusted profile.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a TrustedProfileIdentityTrustedProfileById object.
@@ -97223,6 +103039,7 @@ def __ne__(self, other: 'TrustedProfileIdentityTrustedProfileById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPCIdentityByCRN(VPCIdentity):
"""
VPCIdentityByCRN.
@@ -97230,8 +103047,10 @@ class VPCIdentityByCRN(VPCIdentity):
:attr str crn: The CRN for this VPC.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a VPCIdentityByCRN object.
@@ -97280,6 +103099,7 @@ def __ne__(self, other: 'VPCIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPCIdentityByHref(VPCIdentity):
"""
VPCIdentityByHref.
@@ -97287,8 +103107,10 @@ class VPCIdentityByHref(VPCIdentity):
:attr str href: The URL for this VPC.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPCIdentityByHref object.
@@ -97337,6 +103159,7 @@ def __ne__(self, other: 'VPCIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPCIdentityById(VPCIdentity):
"""
VPCIdentityById.
@@ -97344,8 +103167,10 @@ class VPCIdentityById(VPCIdentity):
:attr str id: The unique identifier for this VPC.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VPCIdentityById object.
@@ -97394,6 +103219,7 @@ def __ne__(self, other: 'VPCIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref(VPNGatewayConnectionIKEPolicyPatch):
"""
VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref.
@@ -97401,8 +103227,10 @@ class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref(VPNGatewayConnec
:attr str href: The IKE policy's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref object.
@@ -97451,6 +103279,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHr
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById(VPNGatewayConnectionIKEPolicyPatch):
"""
VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById.
@@ -97458,8 +103287,10 @@ class VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById(VPNGatewayConnecti
:attr str id: The unique identifier for this IKE policy.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById object.
@@ -97508,6 +103339,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref(VPNGatewayConnectionIKEPolicyPrototype):
"""
VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref.
@@ -97515,8 +103347,10 @@ class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref(VPNGatewayCo
:attr str href: The IKE policy's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref object.
@@ -97565,6 +103399,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentity
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById(VPNGatewayConnectionIKEPolicyPrototype):
"""
VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById.
@@ -97572,8 +103407,10 @@ class VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById(VPNGatewayConn
:attr str id: The unique identifier for this IKE policy.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById object.
@@ -97622,6 +103459,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentity
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(VPNGatewayConnectionIPsecPolicyPatch):
"""
VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref.
@@ -97629,8 +103467,10 @@ class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(VPNGatewayCo
:attr str href: The IPsec policy's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref object.
@@ -97679,6 +103519,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentity
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById(VPNGatewayConnectionIPsecPolicyPatch):
"""
VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById.
@@ -97686,8 +103527,10 @@ class VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById(VPNGatewayConn
:attr str id: The unique identifier for this IPsec policy.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById object.
@@ -97736,6 +103579,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentity
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(VPNGatewayConnectionIPsecPolicyPrototype):
"""
VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref.
@@ -97743,8 +103587,10 @@ class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(VPNGatew
:attr str href: The IPsec policy's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref object.
@@ -97793,6 +103639,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById(VPNGatewayConnectionIPsecPolicyPrototype):
"""
VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById.
@@ -97800,8 +103647,10 @@ class VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById(VPNGateway
:attr str id: The unique identifier for this IPsec policy.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById object.
@@ -97850,6 +103699,7 @@ def __ne__(self, other: 'VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch(VPNGatewayConnectionPatch):
"""
VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch.
@@ -97867,16 +103717,18 @@ class VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch(VPNGatew
VPN gateway connection.
"""
- def __init__(self,
- *,
- admin_state_up: bool = None,
- dead_peer_detection: 'VPNGatewayConnectionDPDPatch' = None,
- ike_policy: 'VPNGatewayConnectionIKEPolicyPatch' = None,
- ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPatch' = None,
- name: str = None,
- peer_address: str = None,
- psk: str = None,
- routing_protocol: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ admin_state_up: bool = None,
+ dead_peer_detection: 'VPNGatewayConnectionDPDPatch' = None,
+ ike_policy: 'VPNGatewayConnectionIKEPolicyPatch' = None,
+ ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPatch' = None,
+ name: str = None,
+ peer_address: str = None,
+ psk: str = None,
+ routing_protocol: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch object.
@@ -97981,9 +103833,11 @@ class RoutingProtocolEnum(str, Enum):
"""
Routing protocols are disabled for this VPN gateway connection.
"""
+
NONE = 'none'
+
class VPNGatewayConnectionPolicyMode(VPNGatewayConnection):
"""
VPNGatewayConnectionPolicyMode.
@@ -98014,24 +103868,26 @@ class VPNGatewayConnectionPolicyMode(VPNGatewayConnection):
:attr List[str] peer_cidrs: The peer CIDRs for this resource.
"""
- def __init__(self,
- admin_state_up: bool,
- authentication_mode: str,
- created_at: datetime,
- dead_peer_detection: 'VPNGatewayConnectionDPD',
- href: str,
- id: str,
- mode: str,
- name: str,
- peer_address: str,
- psk: str,
- resource_type: str,
- status: str,
- local_cidrs: List[str],
- peer_cidrs: List[str],
- *,
- ike_policy: 'IKEPolicyReference' = None,
- ipsec_policy: 'IPsecPolicyReference' = None) -> None:
+ def __init__(
+ self,
+ admin_state_up: bool,
+ authentication_mode: str,
+ created_at: datetime,
+ dead_peer_detection: 'VPNGatewayConnectionDPD',
+ href: str,
+ id: str,
+ mode: str,
+ name: str,
+ peer_address: str,
+ psk: str,
+ resource_type: str,
+ status: str,
+ local_cidrs: List[str],
+ peer_cidrs: List[str],
+ *,
+ ike_policy: 'IKEPolicyReference' = None,
+ ipsec_policy: 'IPsecPolicyReference' = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPolicyMode object.
@@ -98217,6 +104073,7 @@ class AuthenticationModeEnum(str, Enum):
"""
The authentication mode. Only `psk` is currently supported.
"""
+
PSK = 'psk'
@@ -98224,6 +104081,7 @@ class ModeEnum(str, Enum):
"""
The mode of the VPN gateway.
"""
+
POLICY = 'policy'
ROUTE = 'route'
@@ -98232,6 +104090,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection'
@@ -98239,10 +104098,12 @@ class StatusEnum(str, Enum):
"""
The status of a VPN gateway connection.
"""
+
DOWN = 'down'
UP = 'up'
+
class VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(VPNGatewayConnectionPrototype):
"""
VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype.
@@ -98261,17 +104122,19 @@ class VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(VPNGa
:attr List[str] peer_cidrs: The peer CIDRs for this resource.
"""
- def __init__(self,
- peer_address: str,
- psk: str,
- local_cidrs: List[str],
- peer_cidrs: List[str],
- *,
- admin_state_up: bool = None,
- dead_peer_detection: 'VPNGatewayConnectionDPDPrototype' = None,
- ike_policy: 'VPNGatewayConnectionIKEPolicyPrototype' = None,
- ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPrototype' = None,
- name: str = None) -> None:
+ def __init__(
+ self,
+ peer_address: str,
+ psk: str,
+ local_cidrs: List[str],
+ peer_cidrs: List[str],
+ *,
+ admin_state_up: bool = None,
+ dead_peer_detection: 'VPNGatewayConnectionDPDPrototype' = None,
+ ike_policy: 'VPNGatewayConnectionIKEPolicyPrototype' = None,
+ ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPrototype' = None,
+ name: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype object.
@@ -98386,6 +104249,7 @@ def __ne__(self, other: 'VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicy
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(VPNGatewayConnectionPrototype):
"""
VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.
@@ -98404,16 +104268,18 @@ class VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(
VPN gateway connection.
"""
- def __init__(self,
- peer_address: str,
- psk: str,
- *,
- admin_state_up: bool = None,
- dead_peer_detection: 'VPNGatewayConnectionDPDPrototype' = None,
- ike_policy: 'VPNGatewayConnectionIKEPolicyPrototype' = None,
- ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPrototype' = None,
- name: str = None,
- routing_protocol: str = None) -> None:
+ def __init__(
+ self,
+ peer_address: str,
+ psk: str,
+ *,
+ admin_state_up: bool = None,
+ dead_peer_detection: 'VPNGatewayConnectionDPDPrototype' = None,
+ ike_policy: 'VPNGatewayConnectionIKEPolicyPrototype' = None,
+ ipsec_policy: 'VPNGatewayConnectionIPsecPolicyPrototype' = None,
+ name: str = None,
+ routing_protocol: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype object.
@@ -98523,9 +104389,11 @@ class RoutingProtocolEnum(str, Enum):
"""
Routing protocols are disabled for this VPN gateway connection.
"""
+
NONE = 'none'
+
class VPNGatewayConnectionStaticRouteMode(VPNGatewayConnection):
"""
VPNGatewayConnectionStaticRouteMode.
@@ -98558,24 +104426,26 @@ class VPNGatewayConnectionStaticRouteMode(VPNGatewayConnection):
configuration for this VPN gateway connection (in static route mode).
"""
- def __init__(self,
- admin_state_up: bool,
- authentication_mode: str,
- created_at: datetime,
- dead_peer_detection: 'VPNGatewayConnectionDPD',
- href: str,
- id: str,
- mode: str,
- name: str,
- peer_address: str,
- psk: str,
- resource_type: str,
- status: str,
- routing_protocol: str,
- tunnels: List['VPNGatewayConnectionStaticRouteModeTunnel'],
- *,
- ike_policy: 'IKEPolicyReference' = None,
- ipsec_policy: 'IPsecPolicyReference' = None) -> None:
+ def __init__(
+ self,
+ admin_state_up: bool,
+ authentication_mode: str,
+ created_at: datetime,
+ dead_peer_detection: 'VPNGatewayConnectionDPD',
+ href: str,
+ id: str,
+ mode: str,
+ name: str,
+ peer_address: str,
+ psk: str,
+ resource_type: str,
+ status: str,
+ routing_protocol: str,
+ tunnels: List['VPNGatewayConnectionStaticRouteModeTunnel'],
+ *,
+ ike_policy: 'IKEPolicyReference' = None,
+ ipsec_policy: 'IPsecPolicyReference' = None,
+ ) -> None:
"""
Initialize a VPNGatewayConnectionStaticRouteMode object.
@@ -98770,6 +104640,7 @@ class AuthenticationModeEnum(str, Enum):
"""
The authentication mode. Only `psk` is currently supported.
"""
+
PSK = 'psk'
@@ -98777,6 +104648,7 @@ class ModeEnum(str, Enum):
"""
The mode of the VPN gateway.
"""
+
POLICY = 'policy'
ROUTE = 'route'
@@ -98785,6 +104657,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY_CONNECTION = 'vpn_gateway_connection'
@@ -98792,6 +104665,7 @@ class StatusEnum(str, Enum):
"""
The status of a VPN gateway connection.
"""
+
DOWN = 'down'
UP = 'up'
@@ -98800,9 +104674,11 @@ class RoutingProtocolEnum(str, Enum):
"""
Routing protocols are disabled for this VPN gateway connection.
"""
+
NONE = 'none'
+
class VPNGatewayPolicyMode(VPNGateway):
"""
VPNGatewayPolicyMode.
@@ -98825,20 +104701,22 @@ class VPNGatewayPolicyMode(VPNGateway):
:attr str mode: Policy mode VPN gateway.
"""
- def __init__(self,
- connections: List['VPNGatewayConnectionReference'],
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- members: List['VPNGatewayMember'],
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- status: str,
- subnet: 'SubnetReference',
- vpc: 'VPCReference',
- mode: str) -> None:
+ def __init__(
+ self,
+ connections: List['VPNGatewayConnectionReference'],
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ members: List['VPNGatewayMember'],
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ status: str,
+ subnet: 'SubnetReference',
+ vpc: 'VPCReference',
+ mode: str,
+ ) -> None:
"""
Initialize a VPNGatewayPolicyMode object.
@@ -99012,6 +104890,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY = 'vpn_gateway'
@@ -99019,6 +104898,7 @@ class StatusEnum(str, Enum):
"""
The status of the VPN gateway.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -99029,9 +104909,11 @@ class ModeEnum(str, Enum):
"""
Policy mode VPN gateway.
"""
+
POLICY = 'policy'
+
class VPNGatewayPrototypeVPNGatewayPolicyModePrototype(VPNGatewayPrototype):
"""
VPNGatewayPrototypeVPNGatewayPolicyModePrototype.
@@ -99044,12 +104926,14 @@ class VPNGatewayPrototypeVPNGatewayPolicyModePrototype(VPNGatewayPrototype):
:attr str mode: (optional) Policy mode VPN gateway.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- mode: str = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ mode: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayPrototypeVPNGatewayPolicyModePrototype object.
@@ -99128,9 +105012,11 @@ class ModeEnum(str, Enum):
"""
Policy mode VPN gateway.
"""
+
POLICY = 'policy'
+
class VPNGatewayPrototypeVPNGatewayRouteModePrototype(VPNGatewayPrototype):
"""
VPNGatewayPrototypeVPNGatewayRouteModePrototype.
@@ -99143,12 +105029,14 @@ class VPNGatewayPrototypeVPNGatewayRouteModePrototype(VPNGatewayPrototype):
:attr str mode: (optional) Route mode VPN gateway.
"""
- def __init__(self,
- subnet: 'SubnetIdentity',
- *,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- mode: str = None) -> None:
+ def __init__(
+ self,
+ subnet: 'SubnetIdentity',
+ *,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ mode: str = None,
+ ) -> None:
"""
Initialize a VPNGatewayPrototypeVPNGatewayRouteModePrototype object.
@@ -99227,9 +105115,11 @@ class ModeEnum(str, Enum):
"""
Route mode VPN gateway.
"""
+
ROUTE = 'route'
+
class VPNGatewayRouteMode(VPNGateway):
"""
VPNGatewayRouteMode.
@@ -99252,20 +105142,22 @@ class VPNGatewayRouteMode(VPNGateway):
:attr str mode: Route mode VPN gateway.
"""
- def __init__(self,
- connections: List['VPNGatewayConnectionReference'],
- created_at: datetime,
- crn: str,
- href: str,
- id: str,
- members: List['VPNGatewayMember'],
- name: str,
- resource_group: 'ResourceGroupReference',
- resource_type: str,
- status: str,
- subnet: 'SubnetReference',
- vpc: 'VPCReference',
- mode: str) -> None:
+ def __init__(
+ self,
+ connections: List['VPNGatewayConnectionReference'],
+ created_at: datetime,
+ crn: str,
+ href: str,
+ id: str,
+ members: List['VPNGatewayMember'],
+ name: str,
+ resource_group: 'ResourceGroupReference',
+ resource_type: str,
+ status: str,
+ subnet: 'SubnetReference',
+ vpc: 'VPCReference',
+ mode: str,
+ ) -> None:
"""
Initialize a VPNGatewayRouteMode object.
@@ -99439,6 +105331,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
VPN_GATEWAY = 'vpn_gateway'
@@ -99446,6 +105339,7 @@ class StatusEnum(str, Enum):
"""
The status of the VPN gateway.
"""
+
AVAILABLE = 'available'
DELETING = 'deleting'
FAILED = 'failed'
@@ -99456,9 +105350,11 @@ class ModeEnum(str, Enum):
"""
Route mode VPN gateway.
"""
+
ROUTE = 'route'
+
class VPNServerAuthenticationByCertificate(VPNServerAuthentication):
"""
VPNServerAuthenticationByCertificate.
@@ -99470,11 +105366,13 @@ class VPNServerAuthenticationByCertificate(VPNServerAuthentication):
PEM format.
"""
- def __init__(self,
- method: str,
- client_ca: 'CertificateInstanceReference',
- *,
- crl: str = None) -> None:
+ def __init__(
+ self,
+ method: str,
+ client_ca: 'CertificateInstanceReference',
+ *,
+ crl: str = None,
+ ) -> None:
"""
Initialize a VPNServerAuthenticationByCertificate object.
@@ -99546,10 +105444,12 @@ class MethodEnum(str, Enum):
"""
The type of authentication.
"""
+
CERTIFICATE = 'certificate'
USERNAME = 'username'
+
class VPNServerAuthenticationByUsername(VPNServerAuthentication):
"""
VPNServerAuthenticationByUsername.
@@ -99559,9 +105459,11 @@ class VPNServerAuthenticationByUsername(VPNServerAuthentication):
identity provider to be used by VPN client.
"""
- def __init__(self,
- method: str,
- identity_provider: 'VPNServerAuthenticationByUsernameIdProvider') -> None:
+ def __init__(
+ self,
+ method: str,
+ identity_provider: 'VPNServerAuthenticationByUsernameIdProvider',
+ ) -> None:
"""
Initialize a VPNServerAuthenticationByUsername object.
@@ -99626,10 +105528,12 @@ class MethodEnum(str, Enum):
"""
The type of authentication.
"""
+
CERTIFICATE = 'certificate'
USERNAME = 'username'
+
class VPNServerAuthenticationByUsernameIdProviderByIAM(VPNServerAuthenticationByUsernameIdProvider):
"""
VPNServerAuthenticationByUsernameIdProviderByIAM.
@@ -99643,8 +105547,10 @@ class VPNServerAuthenticationByUsernameIdProviderByIAM(VPNServerAuthenticationBy
property value was encountered.
"""
- def __init__(self,
- provider_type: str) -> None:
+ def __init__(
+ self,
+ provider_type: str,
+ ) -> None:
"""
Initialize a VPNServerAuthenticationByUsernameIdProviderByIAM object.
@@ -99708,9 +105614,11 @@ class ProviderTypeEnum(str, Enum):
processing and surface the error, or bypass the route on which the unexpected
property value was encountered.
"""
+
IAM = 'iam'
+
class VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(VPNServerAuthenticationPrototype):
"""
VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.
@@ -99722,11 +105630,13 @@ class VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificateProtot
PEM format.
"""
- def __init__(self,
- method: str,
- client_ca: 'CertificateInstanceIdentity',
- *,
- crl: str = None) -> None:
+ def __init__(
+ self,
+ method: str,
+ client_ca: 'CertificateInstanceIdentity',
+ *,
+ crl: str = None,
+ ) -> None:
"""
Initialize a VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype object.
@@ -99798,10 +105708,12 @@ class MethodEnum(str, Enum):
"""
The type of authentication.
"""
+
CERTIFICATE = 'certificate'
USERNAME = 'username'
+
class VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(VPNServerAuthenticationPrototype):
"""
VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.
@@ -99811,9 +105723,11 @@ class VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype
identity provider to be used by VPN client.
"""
- def __init__(self,
- method: str,
- identity_provider: 'VPNServerAuthenticationByUsernameIdProvider') -> None:
+ def __init__(
+ self,
+ method: str,
+ identity_provider: 'VPNServerAuthenticationByUsernameIdProvider',
+ ) -> None:
"""
Initialize a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype object.
@@ -99878,26 +105792,32 @@ class MethodEnum(str, Enum):
"""
The type of authentication.
"""
+
CERTIFICATE = 'certificate'
USERNAME = 'username'
+
class VolumeAttachmentPrototypeVolumeVolumeIdentity(VolumeAttachmentPrototypeVolume):
"""
Identifies a volume by a unique property.
"""
- def __init__(self) -> None:
+ def __init__(
+ self,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentity object.
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById', 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN', 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref']))
+ ", ".join(['VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById', 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN', 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref'])
+ )
raise Exception(msg)
+
class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(VolumeAttachmentPrototypeVolume):
"""
VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext.
@@ -99916,12 +105836,14 @@ class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(VolumeAttach
volume.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- *,
- iops: int = None,
- name: str = None,
- user_tags: List[str] = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ *,
+ iops: int = None,
+ name: str = None,
+ user_tags: List[str] = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext object.
@@ -99941,9 +105863,11 @@ def __init__(self,
"""
# 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)
+
class VolumeIdentityByCRN(VolumeIdentity):
"""
VolumeIdentityByCRN.
@@ -99951,8 +105875,10 @@ class VolumeIdentityByCRN(VolumeIdentity):
:attr str crn: The CRN for this volume.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a VolumeIdentityByCRN object.
@@ -100001,6 +105927,7 @@ def __ne__(self, other: 'VolumeIdentityByCRN') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeIdentityByHref(VolumeIdentity):
"""
VolumeIdentityByHref.
@@ -100008,8 +105935,10 @@ class VolumeIdentityByHref(VolumeIdentity):
:attr str href: The URL for this volume.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeIdentityByHref object.
@@ -100058,6 +105987,7 @@ def __ne__(self, other: 'VolumeIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeIdentityById(VolumeIdentity):
"""
VolumeIdentityById.
@@ -100065,8 +105995,10 @@ class VolumeIdentityById(VolumeIdentity):
:attr str id: The unique identifier for this volume.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VolumeIdentityById object.
@@ -100115,6 +106047,7 @@ def __ne__(self, other: 'VolumeIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeProfileIdentityByHref(VolumeProfileIdentity):
"""
VolumeProfileIdentityByHref.
@@ -100122,8 +106055,10 @@ class VolumeProfileIdentityByHref(VolumeProfileIdentity):
:attr str href: The URL for this volume profile.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeProfileIdentityByHref object.
@@ -100172,6 +106107,7 @@ def __ne__(self, other: 'VolumeProfileIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeProfileIdentityByName(VolumeProfileIdentity):
"""
VolumeProfileIdentityByName.
@@ -100179,8 +106115,10 @@ class VolumeProfileIdentityByName(VolumeProfileIdentity):
:attr str name: The globally unique name for this volume profile.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a VolumeProfileIdentityByName object.
@@ -100229,6 +106167,7 @@ def __ne__(self, other: 'VolumeProfileIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumePrototypeVolumeByCapacity(VolumePrototype):
"""
VolumePrototypeVolumeByCapacity.
@@ -100255,16 +106194,18 @@ class VolumePrototypeVolumeByCapacity(VolumePrototype):
If unspecified, the `encryption` type for the volume will be `provider_managed`.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- zone: 'ZoneIdentity',
- capacity: int,
- *,
- iops: int = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- user_tags: List[str] = None,
- encryption_key: 'EncryptionKeyIdentity' = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ zone: 'ZoneIdentity',
+ capacity: int,
+ *,
+ iops: int = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ user_tags: List[str] = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ ) -> None:
"""
Initialize a VolumePrototypeVolumeByCapacity object.
@@ -100384,6 +106325,7 @@ def __ne__(self, other: 'VolumePrototypeVolumeByCapacity') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumePrototypeVolumeBySourceSnapshot(VolumePrototype):
"""
VolumePrototypeVolumeBySourceSnapshot.
@@ -100413,17 +106355,19 @@ class VolumePrototypeVolumeBySourceSnapshot(VolumePrototype):
volume.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- zone: 'ZoneIdentity',
- source_snapshot: 'SnapshotIdentity',
- *,
- iops: int = None,
- name: str = None,
- resource_group: 'ResourceGroupIdentity' = None,
- user_tags: List[str] = None,
- capacity: int = None,
- encryption_key: 'EncryptionKeyIdentity' = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ zone: 'ZoneIdentity',
+ source_snapshot: 'SnapshotIdentity',
+ *,
+ iops: int = None,
+ name: str = None,
+ resource_group: 'ResourceGroupIdentity' = None,
+ user_tags: List[str] = None,
+ capacity: int = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ ) -> None:
"""
Initialize a VolumePrototypeVolumeBySourceSnapshot object.
@@ -100555,6 +106499,7 @@ def __ne__(self, other: 'VolumePrototypeVolumeBySourceSnapshot') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ZoneIdentityByHref(ZoneIdentity):
"""
ZoneIdentityByHref.
@@ -100562,8 +106507,10 @@ class ZoneIdentityByHref(ZoneIdentity):
:attr str href: The URL for this zone.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ZoneIdentityByHref object.
@@ -100612,6 +106559,7 @@ def __ne__(self, other: 'ZoneIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ZoneIdentityByName(ZoneIdentity):
"""
ZoneIdentityByName.
@@ -100619,8 +106567,10 @@ class ZoneIdentityByName(ZoneIdentity):
:attr str name: The globally unique name for this zone.
"""
- def __init__(self,
- name: str) -> None:
+ def __init__(
+ self,
+ name: str,
+ ) -> None:
"""
Initialize a ZoneIdentityByName object.
@@ -100669,6 +106619,7 @@ def __ne__(self, other: 'ZoneIdentityByName') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref(EndpointGatewayReservedIPReservedIPIdentity):
"""
EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref.
@@ -100676,8 +106627,10 @@ class EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref(Endpoi
:attr str href: The URL for this reserved IP.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref object.
@@ -100726,6 +106679,7 @@ def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityReservedIPId
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById(EndpointGatewayReservedIPReservedIPIdentity):
"""
EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById.
@@ -100733,8 +106687,10 @@ class EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById(Endpoint
:attr str id: The unique identifier for this reserved IP.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById object.
@@ -100783,6 +106739,7 @@ def __ne__(self, other: 'EndpointGatewayReservedIPReservedIPIdentityReservedIPId
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(EndpointGatewayTargetPrototypeProviderCloudServiceIdentity):
"""
EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.
@@ -100792,9 +106749,11 @@ class EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudSer
user's instance of a provider cloud service.
"""
- def __init__(self,
- resource_type: str,
- crn: str) -> None:
+ def __init__(
+ self,
+ resource_type: str,
+ crn: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN object.
@@ -100856,10 +106815,12 @@ class ResourceTypeEnum(str, Enum):
"""
The type of target for this endpoint gateway.
"""
+
PROVIDER_CLOUD_SERVICE = 'provider_cloud_service'
PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
+
class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity):
"""
The name of this provider infrastructure service.
@@ -100869,9 +106830,11 @@ class EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProvide
- `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM.
"""
- def __init__(self,
- resource_type: str,
- name: str) -> None:
+ def __init__(
+ self,
+ resource_type: str,
+ name: str,
+ ) -> None:
"""
Initialize a EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName object.
@@ -100933,10 +106896,252 @@ class ResourceTypeEnum(str, Enum):
"""
The type of target for this endpoint gateway.
"""
+
PROVIDER_CLOUD_SERVICE = 'provider_cloud_service'
PROVIDER_INFRASTRUCTURE_SERVICE = 'provider_infrastructure_service'
+
+class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FloatingIPTargetPatchNetworkInterfaceIdentity):
+ """
+ FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.
+
+ :attr str href: The URL for this network interface.
+ """
+
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
+ """
+ Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.
+
+ :param str href: The URL for this network interface.
+ """
+ # pylint: disable=super-init-not-called
+ self.href = href
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref':
+ """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
+ args = {}
+ if 'href' in _dict:
+ args['href'] = _dict.get('href')
+ else:
+ raise ValueError('Required property \'href\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref 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 FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPTargetPatchNetworkInterfaceIdentity):
+ """
+ FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.
+
+ :attr str id: The unique identifier for this network interface.
+ """
+
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
+ """
+ Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById object.
+
+ :param str id: The unique identifier for this network interface.
+ """
+ # pylint: disable=super-init-not-called
+ self.id = id
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById':
+ """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
+ args = {}
+ if 'id' in _dict:
+ args['id'] = _dict.get('id')
+ else:
+ raise ValueError('Required property \'id\' not present in FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById 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 FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FloatingIPTargetPrototypeNetworkInterfaceIdentity):
+ """
+ FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.
+
+ :attr str href: The URL for this network interface.
+ """
+
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
+ """
+ Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.
+
+ :param str href: The URL for this network interface.
+ """
+ # pylint: disable=super-init-not-called
+ self.href = href
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref':
+ """Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
+ args = {}
+ if 'href' in _dict:
+ args['href'] = _dict.get('href')
+ else:
+ raise ValueError('Required property \'href\' not present in FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref 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 FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(FloatingIPTargetPrototypeNetworkInterfaceIdentity):
+ """
+ FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.
+
+ :attr str id: The unique identifier for this network interface.
+ """
+
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
+ """
+ Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object.
+
+ :param str id: The unique identifier for this network interface.
+ """
+ # pylint: disable=super-init-not-called
+ self.id = id
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById':
+ """Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
+ args = {}
+ if 'id' in _dict:
+ args['id'] = _dict.get('id')
+ else:
+ raise ValueError('Required property \'id\' not present in FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById 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 FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(FlowLogCollectorTargetPrototypeInstanceIdentity):
"""
FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN.
@@ -100944,8 +107149,10 @@ class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(FlowL
:attr str crn: The CRN for this virtual server instance.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN object.
@@ -100994,6 +107201,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstance
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(FlowLogCollectorTargetPrototypeInstanceIdentity):
"""
FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref.
@@ -101001,8 +107209,10 @@ class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(Flow
:attr str href: The URL for this virtual server instance.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref object.
@@ -101051,6 +107261,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstance
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById(FlowLogCollectorTargetPrototypeInstanceIdentity):
"""
FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById.
@@ -101058,8 +107269,10 @@ class FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById(FlowLo
:attr str id: The unique identifier for this virtual server instance.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById object.
@@ -101108,17 +107321,20 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeInstanceIdentityInstance
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity):
+
+class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity):
"""
- FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.
+ FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.
:attr str href: The URL for this network interface.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
- Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.
+ Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object.
:param str href: The URL for this network interface.
"""
@@ -101126,18 +107342,18 @@ def __init__(self,
self.href = href
@classmethod
- def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref':
- """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref':
+ """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
args = {}
if 'href' in _dict:
args['href'] = _dict.get('href')
else:
- raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON')
+ raise ValueError('Required property \'href\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
+ """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -101152,30 +107368,33 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object."""
+ """Return a `str` version of this FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> 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: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
+ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
-class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity):
+
+class FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity):
"""
- FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById.
+ FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.
:attr str id: The unique identifier for this network interface.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
- Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById object.
+ Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object.
:param str id: The unique identifier for this network interface.
"""
@@ -101183,18 +107402,18 @@ def __init__(self,
self.id = id
@classmethod
- def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById':
- """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
+ def from_dict(cls, _dict: Dict) -> 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById':
+ """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
args = {}
if 'id' in _dict:
args['id'] = _dict.get('id')
else:
- raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON')
+ raise ValueError('Required property \'id\' not present in FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById JSON')
return cls(**args)
@classmethod
def _from_dict(cls, _dict):
- """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
+ """Initialize a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object from a json dictionary."""
return cls.from_dict(_dict)
def to_dict(self) -> Dict:
@@ -101209,19 +107428,20 @@ def _to_dict(self):
return self.to_dict()
def __str__(self) -> str:
- """Return a `str` version of this FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById object."""
+ """Return a `str` version of this FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById object."""
return json.dumps(self.to_dict(), indent=2)
- def __eq__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> 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: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
+ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById') -> bool:
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(FlowLogCollectorTargetPrototypeSubnetIdentity):
"""
FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN.
@@ -101229,8 +107449,10 @@ class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(FlowLogCo
:attr str crn: The CRN for this subnet.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN object.
@@ -101279,6 +107501,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(FlowLogCollectorTargetPrototypeSubnetIdentity):
"""
FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref.
@@ -101286,8 +107509,10 @@ class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(FlowLogC
:attr str href: The URL for this subnet.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref object.
@@ -101336,6 +107561,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById(FlowLogCollectorTargetPrototypeSubnetIdentity):
"""
FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById.
@@ -101343,8 +107569,10 @@ class FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById(FlowLogCol
:attr str id: The unique identifier for this subnet.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById object.
@@ -101393,6 +107621,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(FlowLogCollectorTargetPrototypeVPCIdentity):
"""
FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN.
@@ -101400,8 +107629,10 @@ class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(FlowLogCollecto
:attr str crn: The CRN for this VPC.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN object.
@@ -101450,6 +107681,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityBy
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(FlowLogCollectorTargetPrototypeVPCIdentity):
"""
FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref.
@@ -101457,8 +107689,10 @@ class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(FlowLogCollect
:attr str href: The URL for this VPC.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref object.
@@ -101507,6 +107741,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityBy
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById(FlowLogCollectorTargetPrototypeVPCIdentity):
"""
FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById.
@@ -101514,8 +107749,10 @@ class FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById(FlowLogCollector
:attr str id: The unique identifier for this VPC.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById object.
@@ -101564,6 +107801,7 @@ def __ne__(self, other: 'FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityBy
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(InstanceGroupManagerActionPrototypeScheduledActionPrototype):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec.
@@ -101575,10 +107813,12 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(Inst
action. Actions can be applied a maximum of one time within a 5 min period.
"""
- def __init__(self,
- *,
- name: str = None,
- cron_spec: str = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ cron_spec: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec object.
@@ -101592,9 +107832,11 @@ def __init__(self,
"""
# 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):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt.
@@ -101606,10 +107848,12 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(Instanc
run.
"""
- def __init__(self,
- *,
- name: str = None,
- run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ *,
+ name: str = None,
+ run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt object.
@@ -101622,9 +107866,11 @@ def __init__(self,
"""
# pylint: disable=super-init-not-called
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
- ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup', 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager']))
+ ", ".join(['InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup', 'InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager'])
+ )
raise Exception(msg)
+
class InstanceGroupManagerActionScheduledActionGroupTarget(InstanceGroupManagerActionScheduledAction):
"""
InstanceGroupManagerActionScheduledActionGroupTarget.
@@ -101662,22 +107908,24 @@ class InstanceGroupManagerActionScheduledActionGroupTarget(InstanceGroupManagerA
:attr InstanceGroupManagerScheduledActionGroup group:
"""
- def __init__(self,
- auto_delete: bool,
- auto_delete_timeout: int,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- status: str,
- updated_at: datetime,
- action_type: str,
- group: 'InstanceGroupManagerScheduledActionGroup',
- *,
- cron_spec: str = None,
- last_applied_at: datetime = None,
- next_run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ auto_delete: bool,
+ auto_delete_timeout: int,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ status: str,
+ updated_at: datetime,
+ action_type: str,
+ group: 'InstanceGroupManagerScheduledActionGroup',
+ *,
+ cron_spec: str = None,
+ last_applied_at: datetime = None,
+ next_run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionScheduledActionGroupTarget object.
@@ -101853,6 +108101,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action'
@@ -101865,6 +108114,7 @@ class StatusEnum(str, Enum):
- `incompatible`: Action parameters are not compatible with the group or manager
- `omitted`: Action was not applied because this action's manager was disabled.
"""
+
ACTIVE = 'active'
COMPLETED = 'completed'
FAILED = 'failed'
@@ -101876,9 +108126,11 @@ class ActionTypeEnum(str, Enum):
"""
The type of action for the instance group.
"""
+
SCHEDULED = 'scheduled'
+
class InstanceGroupManagerActionScheduledActionManagerTarget(InstanceGroupManagerActionScheduledAction):
"""
InstanceGroupManagerActionScheduledActionManagerTarget.
@@ -101916,22 +108168,24 @@ class InstanceGroupManagerActionScheduledActionManagerTarget(InstanceGroupManage
:attr InstanceGroupManagerScheduledActionManager manager:
"""
- def __init__(self,
- auto_delete: bool,
- auto_delete_timeout: int,
- created_at: datetime,
- href: str,
- id: str,
- name: str,
- resource_type: str,
- status: str,
- updated_at: datetime,
- action_type: str,
- manager: 'InstanceGroupManagerScheduledActionManager',
- *,
- cron_spec: str = None,
- last_applied_at: datetime = None,
- next_run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ auto_delete: bool,
+ auto_delete_timeout: int,
+ created_at: datetime,
+ href: str,
+ id: str,
+ name: str,
+ resource_type: str,
+ status: str,
+ updated_at: datetime,
+ action_type: str,
+ manager: 'InstanceGroupManagerScheduledActionManager',
+ *,
+ cron_spec: str = None,
+ last_applied_at: datetime = None,
+ next_run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionScheduledActionManagerTarget object.
@@ -102107,6 +108361,7 @@ class ResourceTypeEnum(str, Enum):
"""
The resource type.
"""
+
INSTANCE_GROUP_MANAGER_ACTION = 'instance_group_manager_action'
@@ -102119,6 +108374,7 @@ class StatusEnum(str, Enum):
- `incompatible`: Action parameters are not compatible with the group or manager
- `omitted`: Action was not applied because this action's manager was disabled.
"""
+
ACTIVE = 'active'
COMPLETED = 'completed'
FAILED = 'failed'
@@ -102130,9 +108386,11 @@ class ActionTypeEnum(str, Enum):
"""
The type of action for the instance group.
"""
+
SCHEDULED = 'scheduled'
+
class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype):
"""
InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref.
@@ -102144,11 +108402,13 @@ class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHre
:attr str href: The URL for this instance group manager.
"""
- def __init__(self,
- href: str,
- *,
- max_membership_count: int = None,
- min_membership_count: int = None) -> None:
+ def __init__(
+ self,
+ href: str,
+ *,
+ max_membership_count: int = None,
+ min_membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref object.
@@ -102211,6 +108471,7 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAuto
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype):
"""
InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById.
@@ -102222,11 +108483,13 @@ class InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById(
:attr str id: The unique identifier for this instance group manager.
"""
- def __init__(self,
- id: str,
- *,
- max_membership_count: int = None,
- min_membership_count: int = None) -> None:
+ def __init__(
+ self,
+ id: str,
+ *,
+ max_membership_count: int = None,
+ min_membership_count: int = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById object.
@@ -102289,6 +108552,7 @@ def __ne__(self, other: 'InstanceGroupManagerScheduledActionManagerPrototypeAuto
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(InstancePlacementTargetPatchDedicatedHostGroupIdentity):
"""
InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.
@@ -102296,8 +108560,10 @@ class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupId
:attr str crn: The CRN for this dedicated host group.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN object.
@@ -102346,6 +108612,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityD
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(InstancePlacementTargetPatchDedicatedHostGroupIdentity):
"""
InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.
@@ -102353,8 +108620,10 @@ class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupId
:attr str href: The URL for this dedicated host group.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref object.
@@ -102403,6 +108672,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityD
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById(InstancePlacementTargetPatchDedicatedHostGroupIdentity):
"""
InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.
@@ -102410,8 +108680,10 @@ class InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupId
:attr str id: The unique identifier for this dedicated host group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById object.
@@ -102460,6 +108732,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostGroupIdentityD
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(InstancePlacementTargetPatchDedicatedHostIdentity):
"""
InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN.
@@ -102467,8 +108740,10 @@ class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCR
:attr str crn: The CRN for this dedicated host.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN object.
@@ -102517,6 +108792,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedica
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(InstancePlacementTargetPatchDedicatedHostIdentity):
"""
InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref.
@@ -102524,8 +108800,10 @@ class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHr
:attr str href: The URL for this dedicated host.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref object.
@@ -102574,6 +108852,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedica
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById(InstancePlacementTargetPatchDedicatedHostIdentity):
"""
InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById.
@@ -102581,8 +108860,10 @@ class InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById
:attr str id: The unique identifier for this dedicated host.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById object.
@@ -102631,6 +108912,7 @@ def __ne__(self, other: 'InstancePlacementTargetPatchDedicatedHostIdentityDedica
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity):
"""
InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN.
@@ -102638,8 +108920,10 @@ class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGro
:attr str crn: The CRN for this dedicated host group.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN object.
@@ -102688,6 +108972,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdent
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity):
"""
InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref.
@@ -102695,8 +108980,10 @@ class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGro
:attr str href: The URL for this dedicated host group.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref object.
@@ -102745,6 +109032,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdent
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity):
"""
InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById.
@@ -102752,8 +109040,10 @@ class InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGro
:attr str id: The unique identifier for this dedicated host group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById object.
@@ -102802,6 +109092,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostGroupIdent
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(InstancePlacementTargetPrototypeDedicatedHostIdentity):
"""
InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN.
@@ -102809,8 +109100,10 @@ class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentity
:attr str crn: The CRN for this dedicated host.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN object.
@@ -102859,6 +109152,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDe
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(InstancePlacementTargetPrototypeDedicatedHostIdentity):
"""
InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref.
@@ -102866,8 +109160,10 @@ class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentity
:attr str href: The URL for this dedicated host.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref object.
@@ -102916,6 +109212,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDe
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById(InstancePlacementTargetPrototypeDedicatedHostIdentity):
"""
InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById.
@@ -102923,8 +109220,10 @@ class InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentity
:attr str id: The unique identifier for this dedicated host.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById object.
@@ -102973,6 +109272,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypeDedicatedHostIdentityDe
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(InstancePlacementTargetPrototypePlacementGroupIdentity):
"""
InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN.
@@ -102980,8 +109280,10 @@ class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdenti
:attr str crn: The CRN for this placement group.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN object.
@@ -103030,6 +109332,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityP
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(InstancePlacementTargetPrototypePlacementGroupIdentity):
"""
InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref.
@@ -103037,8 +109340,10 @@ class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdenti
:attr str href: The URL for this placement group.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref object.
@@ -103087,6 +109392,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityP
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById(InstancePlacementTargetPrototypePlacementGroupIdentity):
"""
InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById.
@@ -103094,8 +109400,10 @@ class InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdenti
:attr str id: The unique identifier for this placement group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById object.
@@ -103144,6 +109452,7 @@ def __ne__(self, other: 'InstancePlacementTargetPrototypePlacementGroupIdentityP
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity):
"""
LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.
@@ -103151,8 +109460,10 @@ class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerP
:attr str href: The pool's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object.
@@ -103201,6 +109512,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolId
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity):
"""
LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.
@@ -103208,8 +109520,10 @@ class LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerP
:attr str id: The unique identifier for this load balancer pool.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById object.
@@ -103258,6 +109572,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolId
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity):
"""
LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref.
@@ -103265,8 +109580,10 @@ class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalan
:attr str href: The pool's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref object.
@@ -103315,6 +109632,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity):
"""
LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById.
@@ -103322,8 +109640,10 @@ class LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalan
:attr str id: The unique identifier for this load balancer pool.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById object.
@@ -103372,6 +109692,7 @@ def __ne__(self, other: 'LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPo
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity):
"""
LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN.
@@ -103379,8 +109700,10 @@ class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN
:attr str crn: The CRN for this virtual server instance.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN object.
@@ -103429,6 +109752,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIn
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity):
"""
LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref.
@@ -103436,8 +109760,10 @@ class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHre
:attr str href: The URL for this virtual server instance.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref object.
@@ -103486,6 +109812,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIn
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity):
"""
LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById.
@@ -103493,8 +109820,10 @@ class LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById(
:attr str id: The unique identifier for this virtual server instance.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById object.
@@ -103543,6 +109872,7 @@ def __ne__(self, other: 'LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIn
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref(NetworkInterfaceIPPrototypeReservedIPIdentity):
"""
NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref.
@@ -103550,8 +109880,10 @@ class NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref(Netw
:attr str href: The URL for this reserved IP.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref object.
@@ -103600,6 +109932,7 @@ def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityReservedIP
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById(NetworkInterfaceIPPrototypeReservedIPIdentity):
"""
NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById.
@@ -103607,8 +109940,10 @@ class NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById(Networ
:attr str id: The unique identifier for this reserved IP.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById object.
@@ -103657,6 +109992,7 @@ def __ne__(self, other: 'NetworkInterfaceIPPrototypeReservedIPIdentityReservedIP
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(PublicGatewayFloatingIPPrototypeFloatingIPIdentity):
"""
PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress.
@@ -103664,8 +110000,10 @@ class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddr
:attr str address: The globally unique IP address.
"""
- def __init__(self,
- address: str) -> None:
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress object.
@@ -103714,6 +110052,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(PublicGatewayFloatingIPPrototypeFloatingIPIdentity):
"""
PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN.
@@ -103721,8 +110060,10 @@ class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(
:attr str crn: The CRN for this floating IP.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN object.
@@ -103771,6 +110112,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(PublicGatewayFloatingIPPrototypeFloatingIPIdentity):
"""
PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref.
@@ -103778,8 +110120,10 @@ class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref
:attr str href: The URL for this floating IP.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref object.
@@ -103828,6 +110172,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById(PublicGatewayFloatingIPPrototypeFloatingIPIdentity):
"""
PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById.
@@ -103835,8 +110180,10 @@ class PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById(P
:attr str id: The unique identifier for this floating IP.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById object.
@@ -103885,6 +110232,7 @@ def __ne__(self, other: 'PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloat
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(ReservedIPTargetPrototypeEndpointGatewayIdentity):
"""
ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN.
@@ -103892,8 +110240,10 @@ class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByC
:attr str crn: The CRN for this endpoint gateway.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN object.
@@ -103942,6 +110292,7 @@ def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpoin
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(ReservedIPTargetPrototypeEndpointGatewayIdentity):
"""
ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref.
@@ -103949,8 +110300,10 @@ class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByH
:attr str href: The URL for this endpoint gateway.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref object.
@@ -103999,6 +110352,7 @@ def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpoin
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById(ReservedIPTargetPrototypeEndpointGatewayIdentity):
"""
ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById.
@@ -104006,8 +110360,10 @@ class ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByI
:attr str id: The unique identifier for this endpoint gateway.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById object.
@@ -104056,6 +110412,153 @@ def __ne__(self, other: 'ReservedIPTargetPrototypeEndpointGatewayIdentityEndpoin
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
+class RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(RouteNextHopPatchRouteNextHopIP):
+ """
+ RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP.
+
+ :attr str address: The sentinel IP address (`0.0.0.0`).
+ This property may add support for IPv6 addresses in the future. When processing
+ a value in this property, verify that the address is in an expected format. If
+ it is not, log an error. Optionally halt processing and surface the error, or
+ bypass the resource on which the unexpected IP address format was encountered.
+ """
+
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
+ """
+ Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP object.
+
+ :param str address: The sentinel IP address (`0.0.0.0`).
+ This property may add support for IPv6 addresses in the future. When
+ processing a value in this property, verify that the address is in an
+ expected format. If it is not, log an error. Optionally halt processing and
+ surface the error, or bypass the resource on which the unexpected IP
+ address format was encountered.
+ """
+ # pylint: disable=super-init-not-called
+ self.address = address
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP':
+ """Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP object from a json dictionary."""
+ args = {}
+ if 'address' in _dict:
+ args['address'] = _dict.get('address')
+ else:
+ raise ValueError('Required property \'address\' not present in RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP 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, 'address') and self.address is not None:
+ _dict['address'] = self.address
+ 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 RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(RouteNextHopPatchRouteNextHopIP):
+ """
+ RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP.
+
+ :attr str address: A unicast IP address, which must not be any of the following
+ values:
+ - `0.0.0.0` (the sentinel IP address)
+ - `224.0.0.0` to `239.255.255.255` (multicast IP addresses)
+ - `255.255.255.255` (the broadcast IP address)
+ This property may add support for IPv6 addresses in the future. When processing
+ a value in this property, verify that the address is in an expected format. If
+ it is not, log an error. Optionally halt processing and surface the error, or
+ bypass the resource on which the unexpected IP address format was encountered.
+ """
+
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
+ """
+ Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP object.
+
+ :param str address: A unicast IP address, which must not be any of the
+ following values:
+ - `0.0.0.0` (the sentinel IP address)
+ - `224.0.0.0` to `239.255.255.255` (multicast IP addresses)
+ - `255.255.255.255` (the broadcast IP address)
+ This property may add support for IPv6 addresses in the future. When
+ processing a value in this property, verify that the address is in an
+ expected format. If it is not, log an error. Optionally halt processing and
+ surface the error, or bypass the resource on which the unexpected IP
+ address format was encountered.
+ """
+ # pylint: disable=super-init-not-called
+ self.address = address
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP':
+ """Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP object from a json dictionary."""
+ args = {}
+ if 'address' in _dict:
+ args['address'] = _dict.get('address')
+ else:
+ raise ValueError('Required property \'address\' not present in RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP 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, 'address') and self.address is not None:
+ _dict['address'] = self.address
+ 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 RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(RouteNextHopPatchVPNGatewayConnectionIdentity):
"""
RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.
@@ -104063,8 +110566,10 @@ class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityB
:attr str href: The VPN connection's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object.
@@ -104113,6 +110618,7 @@ def __ne__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGateway
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(RouteNextHopPatchVPNGatewayConnectionIdentity):
"""
RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.
@@ -104120,8 +110626,10 @@ class RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityB
:attr str id: The unique identifier for this VPN gateway connection.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object.
@@ -104170,6 +110678,153 @@ def __ne__(self, other: 'RouteNextHopPatchVPNGatewayConnectionIdentityVPNGateway
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
+class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP):
+ """
+ RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.
+
+ :attr str address: The sentinel IP address (`0.0.0.0`).
+ This property may add support for IPv6 addresses in the future. When processing
+ a value in this property, verify that the address is in an expected format. If
+ it is not, log an error. Optionally halt processing and surface the error, or
+ bypass the resource on which the unexpected IP address format was encountered.
+ """
+
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
+ """
+ Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP object.
+
+ :param str address: The sentinel IP address (`0.0.0.0`).
+ This property may add support for IPv6 addresses in the future. When
+ processing a value in this property, verify that the address is in an
+ expected format. If it is not, log an error. Optionally halt processing and
+ surface the error, or bypass the resource on which the unexpected IP
+ address format was encountered.
+ """
+ # pylint: disable=super-init-not-called
+ self.address = address
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP':
+ """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP object from a json dictionary."""
+ args = {}
+ if 'address' in _dict:
+ args['address'] = _dict.get('address')
+ else:
+ raise ValueError('Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP 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, 'address') and self.address is not None:
+ _dict['address'] = self.address
+ 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 RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
+class RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP):
+ """
+ RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.
+
+ :attr str address: A unicast IP address, which must not be any of the following
+ values:
+ - `0.0.0.0` (the sentinel IP address)
+ - `224.0.0.0` to `239.255.255.255` (multicast IP addresses)
+ - `255.255.255.255` (the broadcast IP address)
+ This property may add support for IPv6 addresses in the future. When processing
+ a value in this property, verify that the address is in an expected format. If
+ it is not, log an error. Optionally halt processing and surface the error, or
+ bypass the resource on which the unexpected IP address format was encountered.
+ """
+
+ def __init__(
+ self,
+ address: str,
+ ) -> None:
+ """
+ Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP object.
+
+ :param str address: A unicast IP address, which must not be any of the
+ following values:
+ - `0.0.0.0` (the sentinel IP address)
+ - `224.0.0.0` to `239.255.255.255` (multicast IP addresses)
+ - `255.255.255.255` (the broadcast IP address)
+ This property may add support for IPv6 addresses in the future. When
+ processing a value in this property, verify that the address is in an
+ expected format. If it is not, log an error. Optionally halt processing and
+ surface the error, or bypass the resource on which the unexpected IP
+ address format was encountered.
+ """
+ # pylint: disable=super-init-not-called
+ self.address = address
+
+ @classmethod
+ def from_dict(cls, _dict: Dict) -> 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP':
+ """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP object from a json dictionary."""
+ args = {}
+ if 'address' in _dict:
+ args['address'] = _dict.get('address')
+ else:
+ raise ValueError('Required property \'address\' not present in RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP JSON')
+ return cls(**args)
+
+ @classmethod
+ def _from_dict(cls, _dict):
+ """Initialize a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP 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, 'address') and self.address is not None:
+ _dict['address'] = self.address
+ 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 RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP object."""
+ return json.dumps(self.to_dict(), indent=2)
+
+ def __eq__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP') -> bool:
+ """Return `true` when self and other are equal, false otherwise."""
+ if not isinstance(other, self.__class__):
+ return False
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP') -> bool:
+ """Return `true` when self and other are not equal, false otherwise."""
+ return not self == other
+
+
class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity):
"""
RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref.
@@ -104177,8 +110832,10 @@ class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRout
:attr str href: The VPN connection's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref object.
@@ -104227,6 +110884,7 @@ def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayCon
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity):
"""
RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById.
@@ -104234,8 +110892,10 @@ class RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRout
:attr str id: The unique identifier for this VPN gateway connection.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById object.
@@ -104284,6 +110944,7 @@ def __ne__(self, other: 'RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayCon
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(SecurityGroupRuleRemotePatchSecurityGroupIdentity):
"""
SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN.
@@ -104291,8 +110952,10 @@ class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCR
:attr str crn: The security group's CRN.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN object.
@@ -104341,6 +111004,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecuri
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(SecurityGroupRuleRemotePatchSecurityGroupIdentity):
"""
SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref.
@@ -104348,8 +111012,10 @@ class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHr
:attr str href: The security group's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref object.
@@ -104398,6 +111064,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecuri
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById(SecurityGroupRuleRemotePatchSecurityGroupIdentity):
"""
SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById.
@@ -104405,8 +111072,10 @@ class SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById
:attr str id: The unique identifier for this security group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById object.
@@ -104455,6 +111124,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePatchSecurityGroupIdentitySecuri
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity):
"""
SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN.
@@ -104462,8 +111132,10 @@ class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentity
:attr str crn: The security group's CRN.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN object.
@@ -104512,6 +111184,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySe
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity):
"""
SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref.
@@ -104519,8 +111192,10 @@ class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentity
:attr str href: The security group's canonical URL.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref object.
@@ -104569,6 +111244,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySe
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity):
"""
SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById.
@@ -104576,8 +111252,10 @@ class SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentity
:attr str id: The unique identifier for this security group.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById object.
@@ -104626,6 +111304,7 @@ def __ne__(self, other: 'SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySe
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(VolumeAttachmentPrototypeVolumeVolumeIdentity):
"""
VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN.
@@ -104633,8 +111312,10 @@ class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(VolumeAtt
:attr str crn: The CRN for this volume.
"""
- def __init__(self,
- crn: str) -> None:
+ def __init__(
+ self,
+ crn: str,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN object.
@@ -104683,6 +111364,7 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(VolumeAttachmentPrototypeVolumeVolumeIdentity):
"""
VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref.
@@ -104690,8 +111372,10 @@ class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(VolumeAt
:attr str href: The URL for this volume.
"""
- def __init__(self,
- href: str) -> None:
+ def __init__(
+ self,
+ href: str,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref object.
@@ -104740,6 +111424,7 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById(VolumeAttachmentPrototypeVolumeVolumeIdentity):
"""
VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById.
@@ -104747,8 +111432,10 @@ class VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById(VolumeAtta
:attr str id: The unique identifier for this volume.
"""
- def __init__(self,
- id: str) -> None:
+ def __init__(
+ self,
+ id: str,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById object.
@@ -104797,6 +111484,7 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIden
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext):
"""
VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity.
@@ -104821,14 +111509,16 @@ class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototy
If unspecified, the `encryption` type for the volume will be `provider_managed`.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- capacity: int,
- *,
- iops: int = None,
- name: str = None,
- user_tags: List[str] = None,
- encryption_key: 'EncryptionKeyIdentity' = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ capacity: int,
+ *,
+ iops: int = None,
+ name: str = None,
+ user_tags: List[str] = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity object.
@@ -104928,6 +111618,7 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceC
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext):
"""
VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot.
@@ -104955,15 +111646,17 @@ class VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototy
volume.
"""
- def __init__(self,
- profile: 'VolumeProfileIdentity',
- source_snapshot: 'SnapshotIdentity',
- *,
- iops: int = None,
- name: str = None,
- user_tags: List[str] = None,
- capacity: int = None,
- encryption_key: 'EncryptionKeyIdentity' = None) -> None:
+ def __init__(
+ self,
+ profile: 'VolumeProfileIdentity',
+ source_snapshot: 'SnapshotIdentity',
+ *,
+ iops: int = None,
+ name: str = None,
+ user_tags: List[str] = None,
+ capacity: int = None,
+ encryption_key: 'EncryptionKeyIdentity' = None,
+ ) -> None:
"""
Initialize a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot object.
@@ -105075,6 +111768,7 @@ def __ne__(self, other: 'VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceC
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup.
@@ -105087,11 +111781,13 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGro
:attr InstanceGroupManagerScheduledActionGroupPrototype group:
"""
- def __init__(self,
- group: 'InstanceGroupManagerScheduledActionGroupPrototype',
- *,
- name: str = None,
- cron_spec: str = None) -> None:
+ def __init__(
+ self,
+ group: 'InstanceGroupManagerScheduledActionGroupPrototype',
+ *,
+ name: str = None,
+ cron_spec: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup object.
@@ -105160,6 +111856,7 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager.
@@ -105172,11 +111869,13 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByMan
:attr InstanceGroupManagerScheduledActionManagerPrototype manager:
"""
- def __init__(self,
- manager: 'InstanceGroupManagerScheduledActionManagerPrototype',
- *,
- name: str = None,
- cron_spec: str = None) -> None:
+ def __init__(
+ self,
+ manager: 'InstanceGroupManagerScheduledActionManagerPrototype',
+ *,
+ name: str = None,
+ cron_spec: str = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager object.
@@ -105245,6 +111944,7 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup.
@@ -105257,11 +111957,13 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(
:attr InstanceGroupManagerScheduledActionGroupPrototype group:
"""
- def __init__(self,
- group: 'InstanceGroupManagerScheduledActionGroupPrototype',
- *,
- name: str = None,
- run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ group: 'InstanceGroupManagerScheduledActionGroupPrototype',
+ *,
+ name: str = None,
+ run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup object.
@@ -105329,6 +112031,7 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto
"""Return `true` when self and other are not equal, false otherwise."""
return not self == other
+
class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt):
"""
InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager.
@@ -105341,11 +112044,13 @@ class InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManage
:attr InstanceGroupManagerScheduledActionManagerPrototype manager:
"""
- def __init__(self,
- manager: 'InstanceGroupManagerScheduledActionManagerPrototype',
- *,
- name: str = None,
- run_at: datetime = None) -> None:
+ def __init__(
+ self,
+ manager: 'InstanceGroupManagerScheduledActionManagerPrototype',
+ *,
+ name: str = None,
+ run_at: datetime = None,
+ ) -> None:
"""
Initialize a InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager object.
@@ -105417,17 +112122,19 @@ def __ne__(self, other: 'InstanceGroupManagerActionPrototypeScheduledActionProto
# Pagers
##############################################################################
-class VpcsPager():
+
+class VpcsPager:
"""
VpcsPager can be used to simplify the use of the "list_vpcs" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- classic_access: bool = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ classic_access: bool = None,
) -> None:
"""
Initialize a VpcsPager object.
@@ -105439,7 +112146,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._classic_access = classic_access
@@ -105489,16 +112196,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpcAddressPrefixesPager():
+
+class VpcAddressPrefixesPager:
"""
VpcAddressPrefixesPager can be used to simplify the use of the "list_vpc_address_prefixes" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- vpc_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ vpc_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a VpcAddressPrefixesPager object.
@@ -105507,7 +112216,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._vpc_id = vpc_id
self._limit = limit
@@ -105555,17 +112264,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpcRoutesPager():
+
+class VpcRoutesPager:
"""
VpcRoutesPager can be used to simplify the use of the "list_vpc_routes" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- vpc_id: str,
- zone_name: str = None,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ vpc_id: str,
+ zone_name: str = None,
+ limit: int = None,
) -> None:
"""
Initialize a VpcRoutesPager object.
@@ -105576,7 +112287,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._vpc_id = vpc_id
self._zone_name = zone_name
self._limit = limit
@@ -105626,17 +112337,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpcRoutingTablesPager():
+
+class VpcRoutingTablesPager:
"""
VpcRoutingTablesPager can be used to simplify the use of the "list_vpc_routing_tables" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- vpc_id: str,
- limit: int = None,
- is_default: bool = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ vpc_id: str,
+ limit: int = None,
+ is_default: bool = None,
) -> None:
"""
Initialize a VpcRoutingTablesPager object.
@@ -105647,7 +112360,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._vpc_id = vpc_id
self._limit = limit
self._is_default = is_default
@@ -105697,17 +112410,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpcRoutingTableRoutesPager():
+
+class VpcRoutingTableRoutesPager:
"""
VpcRoutingTableRoutesPager can be used to simplify the use of the "list_vpc_routing_table_routes" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- vpc_id: str,
- routing_table_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ vpc_id: str,
+ routing_table_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a VpcRoutingTableRoutesPager object.
@@ -105717,7 +112432,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._vpc_id = vpc_id
self._routing_table_id = routing_table_id
self._limit = limit
@@ -105767,18 +112482,20 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class SubnetsPager():
+
+class SubnetsPager:
"""
SubnetsPager can be used to simplify the use of the "list_subnets" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- routing_table_id: str = None,
- routing_table_name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ routing_table_id: str = None,
+ routing_table_name: str = None,
) -> None:
"""
Initialize a SubnetsPager object.
@@ -105792,7 +112509,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._routing_table_id = routing_table_id
@@ -105844,17 +112561,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class SubnetReservedIpsPager():
+
+class SubnetReservedIpsPager:
"""
SubnetReservedIpsPager can be used to simplify the use of the "list_subnet_reserved_ips" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- subnet_id: str,
- limit: int = None,
- sort: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ subnet_id: str,
+ limit: int = None,
+ sort: str = None,
) -> None:
"""
Initialize a SubnetReservedIpsPager object.
@@ -105868,7 +112587,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._subnet_id = subnet_id
self._limit = limit
self._sort = sort
@@ -105918,18 +112637,20 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class ImagesPager():
+
+class ImagesPager:
"""
ImagesPager can be used to simplify the use of the "list_images" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- name: str = None,
- visibility: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ name: str = None,
+ visibility: str = None,
) -> None:
"""
Initialize a ImagesPager object.
@@ -105943,7 +112664,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._name = name
@@ -105995,15 +112716,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class OperatingSystemsPager():
+
+class OperatingSystemsPager:
"""
OperatingSystemsPager can be used to simplify the use of the "list_operating_systems" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a OperatingSystemsPager object.
@@ -106011,7 +112734,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -106057,15 +112780,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class KeysPager():
+
+class KeysPager:
"""
KeysPager can be used to simplify the use of the "list_keys" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a KeysPager object.
@@ -106073,7 +112798,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -106119,26 +112844,28 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstancesPager():
+
+class InstancesPager:
"""
InstancesPager can be used to simplify the use of the "list_instances" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- name: str = None,
- vpc_id: str = None,
- vpc_crn: str = None,
- vpc_name: str = None,
- dedicated_host_id: str = None,
- dedicated_host_crn: str = None,
- dedicated_host_name: str = None,
- placement_group_id: str = None,
- placement_group_crn: str = None,
- placement_group_name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ name: str = None,
+ vpc_id: str = None,
+ vpc_crn: str = None,
+ vpc_name: str = None,
+ dedicated_host_id: str = None,
+ dedicated_host_crn: str = None,
+ dedicated_host_name: str = None,
+ placement_group_id: str = None,
+ placement_group_crn: str = None,
+ placement_group_name: str = None,
) -> None:
"""
Initialize a InstancesPager object.
@@ -106168,7 +112895,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._name = name
@@ -106236,27 +112963,29 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstanceNetworkInterfaceIpsPager():
+
+class InstanceNetworkInterfaceIpsPager:
"""
InstanceNetworkInterfaceIpsPager can be used to simplify the use of the "list_instance_network_interface_ips" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- instance_id: str,
- network_interface_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ instance_id: str,
+ network_interface_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a InstanceNetworkInterfaceIpsPager object.
- :param str instance_id: The instance identifier.
+ :param str instance_id: The virtual server instance identifier.
:param str network_interface_id: The network interface identifier.
:param int limit: (optional) The number of resources to return on a page.
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._instance_id = instance_id
self._network_interface_id = network_interface_id
self._limit = limit
@@ -106306,15 +113035,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstanceGroupsPager():
+
+class InstanceGroupsPager:
"""
InstanceGroupsPager can be used to simplify the use of the "list_instance_groups" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a InstanceGroupsPager object.
@@ -106322,7 +113053,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -106368,16 +113099,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstanceGroupManagersPager():
+
+class InstanceGroupManagersPager:
"""
InstanceGroupManagersPager can be used to simplify the use of the "list_instance_group_managers" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- instance_group_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ instance_group_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a InstanceGroupManagersPager object.
@@ -106386,7 +113119,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._instance_group_id = instance_group_id
self._limit = limit
@@ -106434,17 +113167,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstanceGroupManagerActionsPager():
+
+class InstanceGroupManagerActionsPager:
"""
InstanceGroupManagerActionsPager can be used to simplify the use of the "list_instance_group_manager_actions" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- instance_group_id: str,
- instance_group_manager_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ instance_group_id: str,
+ instance_group_manager_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a InstanceGroupManagerActionsPager object.
@@ -106455,7 +113190,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._instance_group_id = instance_group_id
self._instance_group_manager_id = instance_group_manager_id
self._limit = limit
@@ -106505,17 +113240,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstanceGroupManagerPoliciesPager():
+
+class InstanceGroupManagerPoliciesPager:
"""
InstanceGroupManagerPoliciesPager can be used to simplify the use of the "list_instance_group_manager_policies" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- instance_group_id: str,
- instance_group_manager_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ instance_group_id: str,
+ instance_group_manager_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a InstanceGroupManagerPoliciesPager object.
@@ -106526,7 +113263,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._instance_group_id = instance_group_id
self._instance_group_manager_id = instance_group_manager_id
self._limit = limit
@@ -106576,16 +113313,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class InstanceGroupMembershipsPager():
+
+class InstanceGroupMembershipsPager:
"""
InstanceGroupMembershipsPager can be used to simplify the use of the "list_instance_group_memberships" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- instance_group_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ instance_group_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a InstanceGroupMembershipsPager object.
@@ -106594,7 +113333,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._instance_group_id = instance_group_id
self._limit = limit
@@ -106642,18 +113381,20 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class DedicatedHostGroupsPager():
+
+class DedicatedHostGroupsPager:
"""
DedicatedHostGroupsPager can be used to simplify the use of the "list_dedicated_host_groups" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- zone_name: str = None,
- name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ zone_name: str = None,
+ name: str = None,
) -> None:
"""
Initialize a DedicatedHostGroupsPager object.
@@ -106667,7 +113408,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._zone_name = zone_name
@@ -106719,15 +113460,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class DedicatedHostProfilesPager():
+
+class DedicatedHostProfilesPager:
"""
DedicatedHostProfilesPager can be used to simplify the use of the "list_dedicated_host_profiles" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a DedicatedHostProfilesPager object.
@@ -106735,7 +113478,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -106781,19 +113524,21 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class DedicatedHostsPager():
+
+class DedicatedHostsPager:
"""
DedicatedHostsPager can be used to simplify the use of the "list_dedicated_hosts" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- dedicated_host_group_id: str = None,
- limit: int = None,
- resource_group_id: str = None,
- zone_name: str = None,
- name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ dedicated_host_group_id: str = None,
+ limit: int = None,
+ resource_group_id: str = None,
+ zone_name: str = None,
+ name: str = None,
) -> None:
"""
Initialize a DedicatedHostsPager object.
@@ -106809,7 +113554,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._dedicated_host_group_id = dedicated_host_group_id
self._limit = limit
self._resource_group_id = resource_group_id
@@ -106863,18 +113608,20 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class BackupPoliciesPager():
+
+class BackupPoliciesPager:
"""
BackupPoliciesPager can be used to simplify the use of the "list_backup_policies" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- name: str = None,
- tag: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ name: str = None,
+ tag: str = None,
) -> None:
"""
Initialize a BackupPoliciesPager object.
@@ -106888,7 +113635,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._name = name
@@ -106940,22 +113687,24 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class BackupPolicyJobsPager():
+
+class BackupPolicyJobsPager:
"""
BackupPolicyJobsPager can be used to simplify the use of the "list_backup_policy_jobs" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- backup_policy_id: str,
- status: str = None,
- backup_policy_plan_id: str = None,
- limit: int = None,
- sort: str = None,
- source_id: str = None,
- target_snapshots_id: str = None,
- target_snapshots_crn: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ backup_policy_id: str,
+ status: str = None,
+ backup_policy_plan_id: str = None,
+ limit: int = None,
+ sort: str = None,
+ source_id: str = None,
+ target_snapshots_id: str = None,
+ target_snapshots_crn: str = None,
) -> None:
"""
Initialize a BackupPolicyJobsPager object.
@@ -106979,7 +113728,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._backup_policy_id = backup_policy_id
self._status = status
self._backup_policy_plan_id = backup_policy_plan_id
@@ -107039,15 +113788,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class PlacementGroupsPager():
+
+class PlacementGroupsPager:
"""
PlacementGroupsPager can be used to simplify the use of the "list_placement_groups" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a PlacementGroupsPager object.
@@ -107055,7 +113806,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -107101,15 +113852,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class BareMetalServerProfilesPager():
+
+class BareMetalServerProfilesPager:
"""
BareMetalServerProfilesPager can be used to simplify the use of the "list_bare_metal_server_profiles" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a BareMetalServerProfilesPager object.
@@ -107117,7 +113870,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -107163,23 +113916,25 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class BareMetalServersPager():
+
+class BareMetalServersPager:
"""
BareMetalServersPager can be used to simplify the use of the "list_bare_metal_servers" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- name: str = None,
- vpc_id: str = None,
- vpc_crn: str = None,
- vpc_name: str = None,
- network_interfaces_subnet_id: str = None,
- network_interfaces_subnet_crn: str = None,
- network_interfaces_subnet_name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ name: str = None,
+ vpc_id: str = None,
+ vpc_crn: str = None,
+ vpc_name: str = None,
+ network_interfaces_subnet_id: str = None,
+ network_interfaces_subnet_crn: str = None,
+ network_interfaces_subnet_name: str = None,
) -> None:
"""
Initialize a BareMetalServersPager object.
@@ -107203,7 +113958,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._name = name
@@ -107265,16 +114020,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class BareMetalServerNetworkInterfacesPager():
+
+class BareMetalServerNetworkInterfacesPager:
"""
BareMetalServerNetworkInterfacesPager can be used to simplify the use of the "list_bare_metal_server_network_interfaces" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- bare_metal_server_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ bare_metal_server_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a BareMetalServerNetworkInterfacesPager object.
@@ -107283,7 +114040,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._bare_metal_server_id = bare_metal_server_id
self._limit = limit
@@ -107331,15 +114088,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VolumeProfilesPager():
+
+class VolumeProfilesPager:
"""
VolumeProfilesPager can be used to simplify the use of the "list_volume_profiles" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a VolumeProfilesPager object.
@@ -107347,7 +114106,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -107393,21 +114152,23 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VolumesPager():
+
+class VolumesPager:
"""
VolumesPager can be used to simplify the use of the "list_volumes" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- name: str = None,
- attachment_state: str = None,
- encryption: str = None,
- operating_system_family: str = None,
- operating_system_architecture: str = None,
- zone_name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ name: str = None,
+ attachment_state: str = None,
+ encryption: str = None,
+ operating_system_family: str = None,
+ operating_system_architecture: str = None,
+ zone_name: str = None,
) -> None:
"""
Initialize a VolumesPager object.
@@ -107433,7 +114194,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._name = name
self._attachment_state = attachment_state
@@ -107491,25 +114252,27 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class SnapshotsPager():
+
+class SnapshotsPager:
"""
SnapshotsPager can be used to simplify the use of the "list_snapshots" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- tag: str = None,
- resource_group_id: str = None,
- name: str = None,
- source_volume_id: str = None,
- source_volume_crn: str = None,
- source_image_id: str = None,
- source_image_crn: str = None,
- sort: str = None,
- backup_policy_plan_id: str = None,
- clones_zone_name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ tag: str = None,
+ resource_group_id: str = None,
+ name: str = None,
+ source_volume_id: str = None,
+ source_volume_crn: str = None,
+ source_image_id: str = None,
+ source_image_crn: str = None,
+ sort: str = None,
+ backup_policy_plan_id: str = None,
+ clones_zone_name: str = None,
) -> None:
"""
Initialize a SnapshotsPager object.
@@ -107546,7 +114309,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._tag = tag
self._resource_group_id = resource_group_id
@@ -107612,16 +114375,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class PublicGatewaysPager():
+
+class PublicGatewaysPager:
"""
PublicGatewaysPager can be used to simplify the use of the "list_public_gateways" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
) -> None:
"""
Initialize a PublicGatewaysPager object.
@@ -107631,7 +114396,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
@@ -107679,17 +114444,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class FloatingIpsPager():
+
+class FloatingIpsPager:
"""
FloatingIpsPager can be used to simplify the use of the "list_floating_ips" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- sort: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ sort: str = None,
) -> None:
"""
Initialize a FloatingIpsPager object.
@@ -107704,7 +114471,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._sort = sort
@@ -107754,16 +114521,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class NetworkAclsPager():
+
+class NetworkAclsPager:
"""
NetworkAclsPager can be used to simplify the use of the "list_network_acls" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
) -> None:
"""
Initialize a NetworkAclsPager object.
@@ -107773,7 +114542,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
@@ -107821,17 +114590,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class NetworkAclRulesPager():
+
+class NetworkAclRulesPager:
"""
NetworkAclRulesPager can be used to simplify the use of the "list_network_acl_rules" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- network_acl_id: str,
- limit: int = None,
- direction: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ network_acl_id: str,
+ limit: int = None,
+ direction: str = None,
) -> None:
"""
Initialize a NetworkAclRulesPager object.
@@ -107842,7 +114613,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._network_acl_id = network_acl_id
self._limit = limit
self._direction = direction
@@ -107892,19 +114663,21 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class SecurityGroupsPager():
+
+class SecurityGroupsPager:
"""
SecurityGroupsPager can be used to simplify the use of the "list_security_groups" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- vpc_id: str = None,
- vpc_crn: str = None,
- vpc_name: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ vpc_id: str = None,
+ vpc_crn: str = None,
+ vpc_name: str = None,
) -> None:
"""
Initialize a SecurityGroupsPager object.
@@ -107920,7 +114693,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._vpc_id = vpc_id
@@ -107974,16 +114747,18 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class SecurityGroupTargetsPager():
+
+class SecurityGroupTargetsPager:
"""
SecurityGroupTargetsPager can be used to simplify the use of the "list_security_group_targets" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- security_group_id: str,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ security_group_id: str,
+ limit: int = None,
) -> None:
"""
Initialize a SecurityGroupTargetsPager object.
@@ -107992,7 +114767,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._security_group_id = security_group_id
self._limit = limit
@@ -108040,15 +114815,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class IkePoliciesPager():
+
+class IkePoliciesPager:
"""
IkePoliciesPager can be used to simplify the use of the "list_ike_policies" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a IkePoliciesPager object.
@@ -108056,7 +114833,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -108102,15 +114879,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class IpsecPoliciesPager():
+
+class IpsecPoliciesPager:
"""
IpsecPoliciesPager can be used to simplify the use of the "list_ipsec_policies" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a IpsecPoliciesPager object.
@@ -108118,7 +114897,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -108164,18 +114943,20 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpnGatewaysPager():
+
+class VpnGatewaysPager:
"""
VpnGatewaysPager can be used to simplify the use of the "list_vpn_gateways" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- sort: str = None,
- mode: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ sort: str = None,
+ mode: str = None,
) -> None:
"""
Initialize a VpnGatewaysPager object.
@@ -108192,7 +114973,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._sort = sort
@@ -108244,18 +115025,20 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpnServersPager():
+
+class VpnServersPager:
"""
VpnServersPager can be used to simplify the use of the "list_vpn_servers" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- name: str = None,
- limit: int = None,
- resource_group_id: str = None,
- sort: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ name: str = None,
+ limit: int = None,
+ resource_group_id: str = None,
+ sort: str = None,
) -> None:
"""
Initialize a VpnServersPager object.
@@ -108272,7 +115055,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._name = name
self._limit = limit
self._resource_group_id = resource_group_id
@@ -108324,17 +115107,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpnServerClientsPager():
+
+class VpnServerClientsPager:
"""
VpnServerClientsPager can be used to simplify the use of the "list_vpn_server_clients" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- vpn_server_id: str,
- limit: int = None,
- sort: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ vpn_server_id: str,
+ limit: int = None,
+ sort: str = None,
) -> None:
"""
Initialize a VpnServerClientsPager object.
@@ -108347,7 +115132,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._vpn_server_id = vpn_server_id
self._limit = limit
self._sort = sort
@@ -108397,17 +115182,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class VpnServerRoutesPager():
+
+class VpnServerRoutesPager:
"""
VpnServerRoutesPager can be used to simplify the use of the "list_vpn_server_routes" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- vpn_server_id: str,
- limit: int = None,
- sort: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ vpn_server_id: str,
+ limit: int = None,
+ sort: str = None,
) -> None:
"""
Initialize a VpnServerRoutesPager object.
@@ -108421,7 +115208,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._vpn_server_id = vpn_server_id
self._limit = limit
self._sort = sort
@@ -108471,15 +115258,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class LoadBalancerProfilesPager():
+
+class LoadBalancerProfilesPager:
"""
LoadBalancerProfilesPager can be used to simplify the use of the "list_load_balancer_profiles" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a LoadBalancerProfilesPager object.
@@ -108487,7 +115276,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -108533,15 +115322,17 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class LoadBalancersPager():
+
+class LoadBalancersPager:
"""
LoadBalancersPager can be used to simplify the use of the "list_load_balancers" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
) -> None:
"""
Initialize a LoadBalancersPager object.
@@ -108549,7 +115340,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
def has_next(self) -> bool:
@@ -108595,17 +115386,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class EndpointGatewaysPager():
+
+class EndpointGatewaysPager:
"""
EndpointGatewaysPager can be used to simplify the use of the "list_endpoint_gateways" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- name: str = None,
- limit: int = None,
- resource_group_id: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ name: str = None,
+ limit: int = None,
+ resource_group_id: str = None,
) -> None:
"""
Initialize a EndpointGatewaysPager object.
@@ -108617,7 +115410,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._name = name
self._limit = limit
self._resource_group_id = resource_group_id
@@ -108667,17 +115460,19 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class EndpointGatewayIpsPager():
+
+class EndpointGatewayIpsPager:
"""
EndpointGatewayIpsPager can be used to simplify the use of the "list_endpoint_gateway_ips" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- endpoint_gateway_id: str,
- limit: int = None,
- sort: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ endpoint_gateway_id: str,
+ limit: int = None,
+ sort: str = None,
) -> None:
"""
Initialize a EndpointGatewayIpsPager object.
@@ -108691,7 +115486,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._endpoint_gateway_id = endpoint_gateway_id
self._limit = limit
self._sort = sort
@@ -108741,22 +115536,24 @@ def get_all(self) -> List[dict]:
results.extend(next_page)
return results
-class FlowLogCollectorsPager():
+
+class FlowLogCollectorsPager:
"""
FlowLogCollectorsPager can be used to simplify the use of the "list_flow_log_collectors" method.
"""
- def __init__(self,
- *,
- client: VpcV1,
- limit: int = None,
- resource_group_id: str = None,
- name: str = None,
- vpc_id: str = None,
- vpc_crn: str = None,
- vpc_name: str = None,
- target_id: str = None,
- target_resource_type: str = None,
+ def __init__(
+ self,
+ *,
+ client: VpcV1,
+ limit: int = None,
+ resource_group_id: str = None,
+ name: str = None,
+ vpc_id: str = None,
+ vpc_crn: str = None,
+ vpc_name: str = None,
+ target_id: str = None,
+ target_resource_type: str = None,
) -> None:
"""
Initialize a FlowLogCollectorsPager object.
@@ -108778,7 +115575,7 @@ def __init__(self,
"""
self._has_next = True
self._client = client
- self._page_context = { 'next': None }
+ self._page_context = {'next': None}
self._limit = limit
self._resource_group_id = resource_group_id
self._name = name
diff --git a/requirements.txt b/requirements.txt
index 6adabd1..d151bc7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
python_dateutil>=2.5.3,<3.0.0
-ibm_cloud_sdk_core>=3.16.2
+ibm_cloud_sdk_core>=3.16.5
diff --git a/test/integration/test_gen2.py b/test/integration/test_gen2.py
index a6e3612..e6da2ea 100644
--- a/test/integration/test_gen2.py
+++ b/test/integration/test_gen2.py
@@ -71,7 +71,6 @@ def test_update_floating_ip(self, createGen2Service):
class TestImages():
def test_create_images(self, createGen2Service):
- pytest.skip("no cos bucket")
image = create_image(createGen2Service)
assertCreateResponse(image)
@@ -85,14 +84,29 @@ def test_get_image(self, createGen2Service):
assertGetPatchResponse(image)
def test_update_image(self, createGen2Service):
- pytest.skip("no private image")
- image = update_image(createGen2Service, store['created_image'])
+ image = update_image(createGen2Service, store['image_id'])
assertGetPatchResponse(image)
- def test_delete_image(self, createGen2Service):
- pytest.skip("no private image")
- image = delete_image(createGen2Service, store['created_image'])
- assertDeleteResponse(image)
+ def test_create_image_export_job(self, createGen2Service):
+ image = create_image_export_job(createGen2Service, store['image_id'])
+ assertCreateResponse(image)
+
+ def test_list_image_export_jobs(self, createGen2Service):
+ images = list_image_export_jobs(createGen2Service, store['image_id'])
+ assertListResponse(images, 'export_jobs')
+ store['image_export_job_id'] = images.get_result()['export_jobs'][0]['id']
+
+ def test_get_image_export_job(self, createGen2Service):
+ image = get_image_export_job(createGen2Service, store['image_id'], store['image_export_job_id'])
+ assertGetPatchResponse(image)
+
+ def test_update_image_export_job(self, createGen2Service):
+ image = update_image_export_job(createGen2Service, store['image_id'], store['image_export_job_id'])
+ assertGetPatchResponse(image)
+
+ def test_delete_image_export_job(self, createGen2Service):
+ image = delete_image_export_job(createGen2Service, store['image_id'], store['image_export_job_id'])
+ assertDeleteRequestAcceptedResponse(image)
def test_list_operating_systems(self, createGen2Service):
oss = list_operating_systems(createGen2Service)
@@ -1694,6 +1708,9 @@ def test_delete_vpc(self, createGen2Service):
vpc = delete_vpc(createGen2Service, store['created_vpc'])
assertDeleteResponse(vpc)
+ def test_delete_image(self, createGen2Service):
+ image = delete_image(createGen2Service, store['image_id'])
+ assertDeleteResponse(image)
# --------------------------------------------------------
# test helpers
@@ -2268,6 +2285,47 @@ def update_image(service, id):
)
return response
+def create_image_export_job(service, id):
+ cloud_object_storage_bucket_identity_model = {
+ 'name': 'bucket-27200-lwx4cfvcue',
+ }
+ image_export_job = service.create_image_export_job(
+ image_id=id,
+ name='my-image-export-job',
+ storage_bucket=cloud_object_storage_bucket_identity_model
+ )
+ return image_export_job
+
+def list_image_export_jobs(service, id):
+ response = service.list_image_export_jobs(
+ image_id=id
+ )
+ return response
+
+def update_image_export_job(service, id, export_id):
+ image_export_job_patch_model = {
+ 'name' : generate_name('image-export-job-updated')
+ }
+ image_export_job = service.update_image_export_job(
+ image_id=id,
+ id=export_id,
+ image_export_job_patch=image_export_job_patch_model
+ )
+ return image_export_job
+
+def get_image_export_job(service, id, export_id):
+ image_export_job = service.get_image_export_job(
+ image_id=id,
+ id=export_id
+ )
+ return image_export_job
+
+def delete_image_export_job(service, id, export_id):
+ response = service.delete_image_export_job(
+ image_id=id,
+ id=export_id
+ )
+ return response
# --------------------------------------------------------
# list_operating_systems()
# --------------------------------------------------------
diff --git a/test/unit/test_vpc_v1.py b/test/unit/test_vpc_v1.py
index 794e293..9d9bc2b 100644
--- a/test/unit/test_vpc_v1.py
+++ b/test/unit/test_vpc_v1.py
@@ -74,7 +74,8 @@ def preprocess_url(operation_path: str):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -119,7 +120,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListVpcs():
+
+class TestListVpcs:
"""
Test Class for list_vpcs
"""
@@ -132,11 +134,13 @@ def test_list_vpcs_all_params(self):
# Set up mock
url = preprocess_url('/vpcs')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -150,14 +154,14 @@ def test_list_vpcs_all_params(self):
limit=limit,
resource_group_id=resource_group_id,
classic_access=classic_access,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -181,16 +185,17 @@ def test_list_vpcs_required_params(self):
# Set up mock
url = preprocess_url('/vpcs')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_vpcs()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -212,17 +217,19 @@ def test_list_vpcs_value_error(self):
# Set up mock
url = preprocess_url('/vpcs')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "vpcs": [{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpcs(**req_copy)
@@ -244,16 +251,20 @@ def test_list_vpcs_with_pager_get_next(self):
url = preprocess_url('/vpcs')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}'
mock_response2 = '{"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}'
- 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)
+ 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 = []
@@ -278,16 +289,20 @@ def test_list_vpcs_with_pager_get_all(self):
url = preprocess_url('/vpcs')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}'
mock_response2 = '{"total_count":2,"limit":1,"vpcs":[{"classic_access":false,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","cse_source_ips":[{"ip":{"address":"192.168.3.4"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"default_network_acl":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"default_routing_table":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-routing-table-1","resource_type":"routing_table"},"default_security_group":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpc","status":"available"}]}'
- 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)
+ 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 = VpcsPager(
@@ -300,7 +315,8 @@ def test_list_vpcs_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpc():
+
+class TestCreateVpc:
"""
Test Class for create_vpc
"""
@@ -313,11 +329,13 @@ def test_create_vpc_all_params(self):
# Set up mock
url = preprocess_url('/vpcs')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -335,7 +353,7 @@ def test_create_vpc_all_params(self):
classic_access=classic_access,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -365,16 +383,17 @@ def test_create_vpc_required_params(self):
# Set up mock
url = preprocess_url('/vpcs')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Invoke method
response = _service.create_vpc()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 201
@@ -396,17 +415,19 @@ def test_create_vpc_value_error(self):
# Set up mock
url = preprocess_url('/vpcs')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpc(**req_copy)
@@ -419,7 +440,8 @@ def test_create_vpc_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpc_value_error()
-class TestDeleteVpc():
+
+class TestDeleteVpc:
"""
Test Class for delete_vpc
"""
@@ -431,9 +453,11 @@ def test_delete_vpc_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -441,7 +465,7 @@ def test_delete_vpc_all_params(self):
# Invoke method
response = _service.delete_vpc(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -464,9 +488,11 @@ def test_delete_vpc_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -476,7 +502,7 @@ def test_delete_vpc_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpc(**req_copy)
@@ -489,7 +515,8 @@ def test_delete_vpc_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpc_value_error()
-class TestGetVpc():
+
+class TestGetVpc:
"""
Test Class for get_vpc
"""
@@ -502,11 +529,13 @@ def test_get_vpc_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -514,7 +543,7 @@ def test_get_vpc_all_params(self):
# Invoke method
response = _service.get_vpc(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -538,11 +567,13 @@ def test_get_vpc_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -552,7 +583,7 @@ def test_get_vpc_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc(**req_copy)
@@ -565,7 +596,8 @@ def test_get_vpc_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_value_error()
-class TestUpdateVpc():
+
+class TestUpdateVpc:
"""
Test Class for update_vpc
"""
@@ -578,11 +610,13 @@ def test_update_vpc_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPCPatch model
vpc_patch_model = {}
@@ -596,7 +630,7 @@ def test_update_vpc_all_params(self):
response = _service.update_vpc(
id,
vpc_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -623,11 +657,13 @@ def test_update_vpc_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString')
mock_response = '{"classic_access": false, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "cse_source_ips": [{"ip": {"address": "192.168.3.4"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "default_network_acl": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "default_routing_table": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-routing-table-1", "resource_type": "routing_table"}, "default_security_group": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpc", "status": "available"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPCPatch model
vpc_patch_model = {}
@@ -643,7 +679,7 @@ def test_update_vpc_value_error(self):
"vpc_patch": vpc_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpc(**req_copy)
@@ -656,7 +692,8 @@ def test_update_vpc_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpc_value_error()
-class TestGetVpcDefaultNetworkAcl():
+
+class TestGetVpcDefaultNetworkAcl:
"""
Test Class for get_vpc_default_network_acl
"""
@@ -669,11 +706,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -681,7 +720,7 @@ def test_get_vpc_default_network_acl_all_params(self):
# Invoke method
response = _service.get_vpc_default_network_acl(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -705,11 +744,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -719,7 +760,7 @@ def test_get_vpc_default_network_acl_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_default_network_acl(**req_copy)
@@ -732,7 +773,8 @@ def test_get_vpc_default_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_default_network_acl_value_error()
-class TestGetVpcDefaultRoutingTable():
+
+class TestGetVpcDefaultRoutingTable:
"""
Test Class for get_vpc_default_routing_table
"""
@@ -745,11 +787,13 @@ def test_get_vpc_default_routing_table_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/default_routing_table')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "milled-easy-equine-machines", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -757,7 +801,7 @@ def test_get_vpc_default_routing_table_all_params(self):
# Invoke method
response = _service.get_vpc_default_routing_table(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -781,11 +825,13 @@ def test_get_vpc_default_routing_table_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/default_routing_table')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "milled-easy-equine-machines", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -795,7 +841,7 @@ def test_get_vpc_default_routing_table_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_default_routing_table(**req_copy)
@@ -808,7 +854,8 @@ def test_get_vpc_default_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_default_routing_table_value_error()
-class TestGetVpcDefaultSecurityGroup():
+
+class TestGetVpcDefaultSecurityGroup:
"""
Test Class for get_vpc_default_security_group
"""
@@ -821,11 +868,13 @@ def test_get_vpc_default_security_group_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/default_security_group')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -833,7 +882,7 @@ def test_get_vpc_default_security_group_all_params(self):
# Invoke method
response = _service.get_vpc_default_security_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -857,11 +906,13 @@ def test_get_vpc_default_security_group_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/default_security_group')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -871,7 +922,7 @@ def test_get_vpc_default_security_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_default_security_group(**req_copy)
@@ -884,7 +935,8 @@ def test_get_vpc_default_security_group_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_default_security_group_value_error()
-class TestListVpcAddressPrefixes():
+
+class TestListVpcAddressPrefixes:
"""
Test Class for list_vpc_address_prefixes
"""
@@ -897,11 +949,13 @@ def test_list_vpc_address_prefixes_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response = '{"address_prefixes": [{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -913,14 +967,14 @@ def test_list_vpc_address_prefixes_all_params(self):
vpc_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -942,11 +996,13 @@ def test_list_vpc_address_prefixes_required_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response = '{"address_prefixes": [{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -954,7 +1010,7 @@ def test_list_vpc_address_prefixes_required_params(self):
# Invoke method
response = _service.list_vpc_address_prefixes(
vpc_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -978,11 +1034,13 @@ def test_list_vpc_address_prefixes_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response = '{"address_prefixes": [{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -992,7 +1050,7 @@ def test_list_vpc_address_prefixes_value_error(self):
"vpc_id": vpc_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpc_address_prefixes(**req_copy)
@@ -1014,16 +1072,20 @@ def test_list_vpc_address_prefixes_with_pager_get_next(self):
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"address_prefixes":[{"cidr":"192.168.3.0/24","created_at":"2019-01-01T12:00:00.000Z","has_subnets":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":false,"name":"my-address-prefix-1","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"address_prefixes":[{"cidr":"192.168.3.0/24","created_at":"2019-01-01T12:00:00.000Z","has_subnets":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":false,"name":"my-address-prefix-1","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -1047,16 +1109,20 @@ def test_list_vpc_address_prefixes_with_pager_get_all(self):
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"address_prefixes":[{"cidr":"192.168.3.0/24","created_at":"2019-01-01T12:00:00.000Z","has_subnets":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":false,"name":"my-address-prefix-1","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"address_prefixes":[{"cidr":"192.168.3.0/24","created_at":"2019-01-01T12:00:00.000Z","has_subnets":false,"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":false,"name":"my-address-prefix-1","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = VpcAddressPrefixesPager(
@@ -1068,7 +1134,8 @@ def test_list_vpc_address_prefixes_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpcAddressPrefix():
+
+class TestCreateVpcAddressPrefix:
"""
Test Class for create_vpc_address_prefix
"""
@@ -1081,11 +1148,13 @@ def test_create_vpc_address_prefix_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response = '{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -1105,7 +1174,7 @@ def test_create_vpc_address_prefix_all_params(self):
zone,
is_default=is_default,
name=name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1135,11 +1204,13 @@ def test_create_vpc_address_prefix_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes')
mock_response = '{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -1159,7 +1230,7 @@ def test_create_vpc_address_prefix_value_error(self):
"zone": zone,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpc_address_prefix(**req_copy)
@@ -1172,7 +1243,8 @@ def test_create_vpc_address_prefix_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpc_address_prefix_value_error()
-class TestDeleteVpcAddressPrefix():
+
+class TestDeleteVpcAddressPrefix:
"""
Test Class for delete_vpc_address_prefix
"""
@@ -1184,9 +1256,11 @@ def test_delete_vpc_address_prefix_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1196,7 +1270,7 @@ def test_delete_vpc_address_prefix_all_params(self):
response = _service.delete_vpc_address_prefix(
vpc_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1219,9 +1293,11 @@ def test_delete_vpc_address_prefix_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1233,7 +1309,7 @@ def test_delete_vpc_address_prefix_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpc_address_prefix(**req_copy)
@@ -1246,7 +1322,8 @@ def test_delete_vpc_address_prefix_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpc_address_prefix_value_error()
-class TestGetVpcAddressPrefix():
+
+class TestGetVpcAddressPrefix:
"""
Test Class for get_vpc_address_prefix
"""
@@ -1259,11 +1336,13 @@ def test_get_vpc_address_prefix_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes/testString')
mock_response = '{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1273,7 +1352,7 @@ def test_get_vpc_address_prefix_all_params(self):
response = _service.get_vpc_address_prefix(
vpc_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1297,11 +1376,13 @@ def test_get_vpc_address_prefix_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes/testString')
mock_response = '{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1313,7 +1394,7 @@ def test_get_vpc_address_prefix_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_address_prefix(**req_copy)
@@ -1326,7 +1407,8 @@ def test_get_vpc_address_prefix_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_address_prefix_value_error()
-class TestUpdateVpcAddressPrefix():
+
+class TestUpdateVpcAddressPrefix:
"""
Test Class for update_vpc_address_prefix
"""
@@ -1339,11 +1421,13 @@ def test_update_vpc_address_prefix_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes/testString')
mock_response = '{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a AddressPrefixPatch model
address_prefix_patch_model = {}
@@ -1360,7 +1444,7 @@ def test_update_vpc_address_prefix_all_params(self):
vpc_id,
id,
address_prefix_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1387,11 +1471,13 @@ def test_update_vpc_address_prefix_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/address_prefixes/testString')
mock_response = '{"cidr": "192.168.3.0/24", "created_at": "2019-01-01T12:00:00.000Z", "has_subnets": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/address_prefixes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": false, "name": "my-address-prefix-1", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a AddressPrefixPatch model
address_prefix_patch_model = {}
@@ -1410,7 +1496,7 @@ def test_update_vpc_address_prefix_value_error(self):
"address_prefix_patch": address_prefix_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpc_address_prefix(**req_copy)
@@ -1423,7 +1509,8 @@ def test_update_vpc_address_prefix_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpc_address_prefix_value_error()
-class TestListVpcRoutes():
+
+class TestListVpcRoutes:
"""
Test Class for list_vpc_routes
"""
@@ -1436,11 +1523,13 @@ def test_list_vpc_routes_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1454,14 +1543,14 @@ def test_list_vpc_routes_all_params(self):
zone_name=zone_name,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'zone.name={}'.format(zone_name) in query_string
assert 'start={}'.format(start) in query_string
@@ -1484,11 +1573,13 @@ def test_list_vpc_routes_required_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1496,7 +1587,7 @@ def test_list_vpc_routes_required_params(self):
# Invoke method
response = _service.list_vpc_routes(
vpc_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1520,11 +1611,13 @@ def test_list_vpc_routes_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1534,7 +1627,7 @@ def test_list_vpc_routes_value_error(self):
"vpc_id": vpc_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpc_routes(**req_copy)
@@ -1556,16 +1649,20 @@ def test_list_vpc_routes_with_pager_get_next(self):
url = preprocess_url('/vpcs/testString/routes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -1590,16 +1687,20 @@ def test_list_vpc_routes_with_pager_get_all(self):
url = preprocess_url('/vpcs/testString/routes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = VpcRoutesPager(
@@ -1612,7 +1713,8 @@ def test_list_vpc_routes_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpcRoute():
+
+class TestCreateVpcRoute:
"""
Test Class for create_vpc_route
"""
@@ -1625,19 +1727,21 @@ def test_create_vpc_route_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
- # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
+ # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
route_prototype_next_hop_model = {}
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
# Set up parameter values
vpc_id = 'testString'
@@ -1657,7 +1761,7 @@ def test_create_vpc_route_all_params(self):
name=name,
next_hop=next_hop,
priority=priority,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1689,19 +1793,21 @@ def test_create_vpc_route_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
- # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
+ # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
route_prototype_next_hop_model = {}
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
# Set up parameter values
vpc_id = 'testString'
@@ -1719,7 +1825,7 @@ def test_create_vpc_route_value_error(self):
"zone": zone,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpc_route(**req_copy)
@@ -1732,7 +1838,8 @@ def test_create_vpc_route_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpc_route_value_error()
-class TestDeleteVpcRoute():
+
+class TestDeleteVpcRoute:
"""
Test Class for delete_vpc_route
"""
@@ -1744,9 +1851,11 @@ def test_delete_vpc_route_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1756,7 +1865,7 @@ def test_delete_vpc_route_all_params(self):
response = _service.delete_vpc_route(
vpc_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1779,9 +1888,11 @@ def test_delete_vpc_route_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1793,7 +1904,7 @@ def test_delete_vpc_route_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpc_route(**req_copy)
@@ -1806,7 +1917,8 @@ def test_delete_vpc_route_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpc_route_value_error()
-class TestGetVpcRoute():
+
+class TestGetVpcRoute:
"""
Test Class for get_vpc_route
"""
@@ -1819,11 +1931,13 @@ def test_get_vpc_route_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1833,7 +1947,7 @@ def test_get_vpc_route_all_params(self):
response = _service.get_vpc_route(
vpc_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1857,11 +1971,13 @@ def test_get_vpc_route_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -1873,7 +1989,7 @@ def test_get_vpc_route_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_route(**req_copy)
@@ -1886,7 +2002,8 @@ def test_get_vpc_route_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_route_value_error()
-class TestUpdateVpcRoute():
+
+class TestUpdateVpcRoute:
"""
Test Class for update_vpc_route
"""
@@ -1899,15 +2016,17 @@ def test_update_vpc_route_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
- # Construct a dict representation of a RouteNextHopPatchRouteNextHopIP model
+ # Construct a dict representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model
route_next_hop_patch_model = {}
- route_next_hop_patch_model['address'] = '192.168.3.4'
+ route_next_hop_patch_model['address'] = '0.0.0.0'
# Construct a dict representation of a RoutePatch model
route_patch_model = {}
@@ -1925,7 +2044,7 @@ def test_update_vpc_route_all_params(self):
vpc_id,
id,
route_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -1952,15 +2071,17 @@ def test_update_vpc_route_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
- # Construct a dict representation of a RouteNextHopPatchRouteNextHopIP model
+ # Construct a dict representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model
route_next_hop_patch_model = {}
- route_next_hop_patch_model['address'] = '192.168.3.4'
+ route_next_hop_patch_model['address'] = '0.0.0.0'
# Construct a dict representation of a RoutePatch model
route_patch_model = {}
@@ -1980,7 +2101,7 @@ def test_update_vpc_route_value_error(self):
"route_patch": route_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpc_route(**req_copy)
@@ -1993,7 +2114,8 @@ def test_update_vpc_route_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpc_route_value_error()
-class TestListVpcRoutingTables():
+
+class TestListVpcRoutingTables:
"""
Test Class for list_vpc_routing_tables
"""
@@ -2006,11 +2128,13 @@ def test_list_vpc_routing_tables_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2024,14 +2148,14 @@ def test_list_vpc_routing_tables_all_params(self):
start=start,
limit=limit,
is_default=is_default,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -2054,11 +2178,13 @@ def test_list_vpc_routing_tables_required_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2066,7 +2192,7 @@ def test_list_vpc_routing_tables_required_params(self):
# Invoke method
response = _service.list_vpc_routing_tables(
vpc_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2090,11 +2216,13 @@ def test_list_vpc_routing_tables_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "routing_tables": [{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2104,7 +2232,7 @@ def test_list_vpc_routing_tables_value_error(self):
"vpc_id": vpc_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpc_routing_tables(**req_copy)
@@ -2126,16 +2254,20 @@ def test_list_vpc_routing_tables_with_pager_get_next(self):
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_gateway"}],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":true,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":false,"route_internet_ingress":true,"route_transit_gateway_ingress":false,"route_vpc_zone_ingress":true,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"total_count":2,"limit":1}'
mock_response2 = '{"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_gateway"}],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":true,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":false,"route_internet_ingress":true,"route_transit_gateway_ingress":false,"route_vpc_zone_ingress":true,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"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)
+ 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 = []
@@ -2160,16 +2292,20 @@ def test_list_vpc_routing_tables_with_pager_get_all(self):
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_gateway"}],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":true,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":false,"route_internet_ingress":true,"route_transit_gateway_ingress":false,"route_vpc_zone_ingress":true,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"total_count":2,"limit":1}'
mock_response2 = '{"routing_tables":[{"accept_routes_from":[{"resource_type":"vpn_gateway"}],"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","is_default":true,"lifecycle_state":"stable","name":"my-routing-table-1","resource_type":"routing_table","route_direct_link_ingress":false,"route_internet_ingress":true,"route_transit_gateway_ingress":false,"route_vpc_zone_ingress":true,"routes":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","name":"my-route-1"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}]}],"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)
+ 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 = VpcRoutingTablesPager(
@@ -2182,7 +2318,8 @@ def test_list_vpc_routing_tables_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpcRoutingTable():
+
+class TestCreateVpcRoutingTable:
"""
Test Class for create_vpc_routing_table
"""
@@ -2195,19 +2332,21 @@ def test_create_vpc_routing_table_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceFilter model
resource_filter_model = {}
resource_filter_model['resource_type'] = 'vpn_server'
- # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
+ # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
route_prototype_next_hop_model = {}
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -2242,7 +2381,7 @@ def test_create_vpc_routing_table_all_params(self):
route_transit_gateway_ingress=route_transit_gateway_ingress,
route_vpc_zone_ingress=route_vpc_zone_ingress,
routes=routes,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2275,19 +2414,21 @@ def test_create_vpc_routing_table_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceFilter model
resource_filter_model = {}
resource_filter_model['resource_type'] = 'vpn_server'
- # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
+ # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
route_prototype_next_hop_model = {}
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -2317,7 +2458,7 @@ def test_create_vpc_routing_table_value_error(self):
"vpc_id": vpc_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpc_routing_table(**req_copy)
@@ -2330,7 +2471,8 @@ def test_create_vpc_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpc_routing_table_value_error()
-class TestDeleteVpcRoutingTable():
+
+class TestDeleteVpcRoutingTable:
"""
Test Class for delete_vpc_routing_table
"""
@@ -2342,9 +2484,11 @@ def test_delete_vpc_routing_table_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2356,7 +2500,7 @@ def test_delete_vpc_routing_table_all_params(self):
vpc_id,
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2379,9 +2523,11 @@ def test_delete_vpc_routing_table_required_params(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2391,7 +2537,7 @@ def test_delete_vpc_routing_table_required_params(self):
response = _service.delete_vpc_routing_table(
vpc_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2414,9 +2560,11 @@ def test_delete_vpc_routing_table_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2428,7 +2576,7 @@ def test_delete_vpc_routing_table_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpc_routing_table(**req_copy)
@@ -2441,7 +2589,8 @@ def test_delete_vpc_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpc_routing_table_value_error()
-class TestGetVpcRoutingTable():
+
+class TestGetVpcRoutingTable:
"""
Test Class for get_vpc_routing_table
"""
@@ -2454,11 +2603,13 @@ def test_get_vpc_routing_table_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2468,7 +2619,7 @@ def test_get_vpc_routing_table_all_params(self):
response = _service.get_vpc_routing_table(
vpc_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2492,11 +2643,13 @@ def test_get_vpc_routing_table_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2508,7 +2661,7 @@ def test_get_vpc_routing_table_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_routing_table(**req_copy)
@@ -2521,7 +2674,8 @@ def test_get_vpc_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_routing_table_value_error()
-class TestUpdateVpcRoutingTable():
+
+class TestUpdateVpcRoutingTable:
"""
Test Class for update_vpc_routing_table
"""
@@ -2534,11 +2688,13 @@ def test_update_vpc_routing_table_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ResourceFilter model
resource_filter_model = {}
@@ -2565,7 +2721,7 @@ def test_update_vpc_routing_table_all_params(self):
id,
routing_table_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2592,11 +2748,13 @@ def test_update_vpc_routing_table_required_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ResourceFilter model
resource_filter_model = {}
@@ -2621,7 +2779,7 @@ def test_update_vpc_routing_table_required_params(self):
vpc_id,
id,
routing_table_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2648,11 +2806,13 @@ def test_update_vpc_routing_table_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ResourceFilter model
resource_filter_model = {}
@@ -2679,7 +2839,7 @@ def test_update_vpc_routing_table_value_error(self):
"routing_table_patch": routing_table_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpc_routing_table(**req_copy)
@@ -2692,7 +2852,8 @@ def test_update_vpc_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpc_routing_table_value_error()
-class TestListVpcRoutingTableRoutes():
+
+class TestListVpcRoutingTableRoutes:
"""
Test Class for list_vpc_routing_table_routes
"""
@@ -2705,11 +2866,13 @@ def test_list_vpc_routing_table_routes_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2723,14 +2886,14 @@ def test_list_vpc_routing_table_routes_all_params(self):
routing_table_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -2752,11 +2915,13 @@ def test_list_vpc_routing_table_routes_required_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2766,7 +2931,7 @@ def test_list_vpc_routing_table_routes_required_params(self):
response = _service.list_vpc_routing_table_routes(
vpc_id,
routing_table_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2790,11 +2955,13 @@ def test_list_vpc_routing_table_routes_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -2806,7 +2973,7 @@ def test_list_vpc_routing_table_routes_value_error(self):
"routing_table_id": routing_table_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpc_routing_table_routes(**req_copy)
@@ -2828,16 +2995,20 @@ def test_list_vpc_routing_table_routes_with_pager_get_next(self):
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -2862,16 +3033,20 @@ def test_list_vpc_routing_table_routes_with_pager_get_all(self):
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"routes":[{"action":"delegate","created_at":"2019-01-01T12:00:00.000Z","creator":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","name":"my-vpn-gateway","resource_type":"vpn_gateway"},"destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-route-1","next_hop":{"address":"192.168.3.4"},"origin":"service","priority":1,"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = VpcRoutingTableRoutesPager(
@@ -2884,7 +3059,8 @@ def test_list_vpc_routing_table_routes_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpcRoutingTableRoute():
+
+class TestCreateVpcRoutingTableRoute:
"""
Test Class for create_vpc_routing_table_route
"""
@@ -2897,19 +3073,21 @@ def test_create_vpc_routing_table_route_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
- # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
+ # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
route_prototype_next_hop_model = {}
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
# Set up parameter values
vpc_id = 'testString'
@@ -2931,7 +3109,7 @@ def test_create_vpc_routing_table_route_all_params(self):
name=name,
next_hop=next_hop,
priority=priority,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -2963,19 +3141,21 @@ def test_create_vpc_routing_table_route_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
- # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
+ # Construct a dict representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
route_prototype_next_hop_model = {}
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
# Set up parameter values
vpc_id = 'testString'
@@ -2995,7 +3175,7 @@ def test_create_vpc_routing_table_route_value_error(self):
"zone": zone,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpc_routing_table_route(**req_copy)
@@ -3008,7 +3188,8 @@ def test_create_vpc_routing_table_route_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpc_routing_table_route_value_error()
-class TestDeleteVpcRoutingTableRoute():
+
+class TestDeleteVpcRoutingTableRoute:
"""
Test Class for delete_vpc_routing_table_route
"""
@@ -3020,9 +3201,11 @@ def test_delete_vpc_routing_table_route_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -3034,7 +3217,7 @@ def test_delete_vpc_routing_table_route_all_params(self):
vpc_id,
routing_table_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3057,9 +3240,11 @@ def test_delete_vpc_routing_table_route_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -3073,7 +3258,7 @@ def test_delete_vpc_routing_table_route_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpc_routing_table_route(**req_copy)
@@ -3086,7 +3271,8 @@ def test_delete_vpc_routing_table_route_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpc_routing_table_route_value_error()
-class TestGetVpcRoutingTableRoute():
+
+class TestGetVpcRoutingTableRoute:
"""
Test Class for get_vpc_routing_table_route
"""
@@ -3099,11 +3285,13 @@ def test_get_vpc_routing_table_route_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -3115,7 +3303,7 @@ def test_get_vpc_routing_table_route_all_params(self):
vpc_id,
routing_table_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3139,11 +3327,13 @@ def test_get_vpc_routing_table_route_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpc_id = 'testString'
@@ -3157,7 +3347,7 @@ def test_get_vpc_routing_table_route_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpc_routing_table_route(**req_copy)
@@ -3170,7 +3360,8 @@ def test_get_vpc_routing_table_route_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpc_routing_table_route_value_error()
-class TestUpdateVpcRoutingTableRoute():
+
+class TestUpdateVpcRoutingTableRoute:
"""
Test Class for update_vpc_routing_table_route
"""
@@ -3183,15 +3374,17 @@ def test_update_vpc_routing_table_route_all_params(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
- # Construct a dict representation of a RouteNextHopPatchRouteNextHopIP model
+ # Construct a dict representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model
route_next_hop_patch_model = {}
- route_next_hop_patch_model['address'] = '192.168.3.4'
+ route_next_hop_patch_model['address'] = '0.0.0.0'
# Construct a dict representation of a RoutePatch model
route_patch_model = {}
@@ -3211,7 +3404,7 @@ def test_update_vpc_routing_table_route_all_params(self):
routing_table_id,
id,
route_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3238,15 +3431,17 @@ def test_update_vpc_routing_table_route_value_error(self):
# Set up mock
url = preprocess_url('/vpcs/testString/routing_tables/testString/routes/testString')
mock_response = '{"action": "delegate", "created_at": "2019-01-01T12:00:00.000Z", "creator": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-vpn-gateway", "resource_type": "vpn_gateway"}, "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-route-1", "next_hop": {"address": "192.168.3.4"}, "origin": "service", "priority": 1, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
- # Construct a dict representation of a RouteNextHopPatchRouteNextHopIP model
+ # Construct a dict representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model
route_next_hop_patch_model = {}
- route_next_hop_patch_model['address'] = '192.168.3.4'
+ route_next_hop_patch_model['address'] = '0.0.0.0'
# Construct a dict representation of a RoutePatch model
route_patch_model = {}
@@ -3268,7 +3463,7 @@ def test_update_vpc_routing_table_route_value_error(self):
"route_patch": route_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpc_routing_table_route(**req_copy)
@@ -3281,6 +3476,7 @@ def test_update_vpc_routing_table_route_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpc_routing_table_route_value_error()
+
# endregion
##############################################################################
# End of Service: VPCs
@@ -3291,7 +3487,8 @@ def test_update_vpc_routing_table_route_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -3336,7 +3533,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListSubnets():
+
+class TestListSubnets:
"""
Test Class for list_subnets
"""
@@ -3349,11 +3547,13 @@ def test_list_subnets_all_params(self):
# Set up mock
url = preprocess_url('/subnets')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -3369,14 +3569,14 @@ def test_list_subnets_all_params(self):
resource_group_id=resource_group_id,
routing_table_id=routing_table_id,
routing_table_name=routing_table_name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -3401,16 +3601,17 @@ def test_list_subnets_required_params(self):
# Set up mock
url = preprocess_url('/subnets')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_subnets()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -3432,17 +3633,19 @@ def test_list_subnets_value_error(self):
# Set up mock
url = preprocess_url('/subnets')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "subnets": [{"available_ipv4_address_count": 15, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_subnets(**req_copy)
@@ -3464,16 +3667,20 @@ def test_list_subnets_with_pager_get_next(self):
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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::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":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::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":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -3499,16 +3706,20 @@ def test_list_subnets_with_pager_get_all(self):
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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::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":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"a4e28308-8ee7-46ab-8108-9f881f22bdbf","name":"my-network-acl"},"public_gateway":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::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":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = SubnetsPager(
@@ -3522,7 +3733,8 @@ def test_list_subnets_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateSubnet():
+
+class TestCreateSubnet:
"""
Test Class for create_subnet
"""
@@ -3535,11 +3747,13 @@ 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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkACLIdentityById model
network_acl_identity_model = {}
@@ -3583,7 +3797,7 @@ def test_create_subnet_all_params(self):
# Invoke method
response = _service.create_subnet(
subnet_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3610,11 +3824,13 @@ 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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkACLIdentityById model
network_acl_identity_model = {}
@@ -3660,7 +3876,7 @@ def test_create_subnet_value_error(self):
"subnet_prototype": subnet_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_subnet(**req_copy)
@@ -3673,7 +3889,8 @@ def test_create_subnet_value_error_with_retries(self):
_service.disable_retries()
self.test_create_subnet_value_error()
-class TestDeleteSubnet():
+
+class TestDeleteSubnet:
"""
Test Class for delete_subnet
"""
@@ -3685,9 +3902,11 @@ def test_delete_subnet_all_params(self):
"""
# Set up mock
url = preprocess_url('/subnets/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -3695,7 +3914,7 @@ def test_delete_subnet_all_params(self):
# Invoke method
response = _service.delete_subnet(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3718,9 +3937,11 @@ def test_delete_subnet_value_error(self):
"""
# Set up mock
url = preprocess_url('/subnets/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -3730,7 +3951,7 @@ def test_delete_subnet_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_subnet(**req_copy)
@@ -3743,7 +3964,8 @@ def test_delete_subnet_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_subnet_value_error()
-class TestGetSubnet():
+
+class TestGetSubnet:
"""
Test Class for get_subnet
"""
@@ -3756,11 +3978,13 @@ 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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -3768,7 +3992,7 @@ def test_get_subnet_all_params(self):
# Invoke method
response = _service.get_subnet(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3792,11 +4016,13 @@ 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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -3806,7 +4032,7 @@ def test_get_subnet_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_subnet(**req_copy)
@@ -3819,7 +4045,8 @@ def test_get_subnet_value_error_with_retries(self):
_service.disable_retries()
self.test_get_subnet_value_error()
-class TestUpdateSubnet():
+
+class TestUpdateSubnet:
"""
Test Class for update_subnet
"""
@@ -3832,11 +4059,13 @@ 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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkACLIdentityById model
network_acl_identity_model = {}
@@ -3865,7 +4094,7 @@ def test_update_subnet_all_params(self):
response = _service.update_subnet(
id,
subnet_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3892,11 +4121,13 @@ 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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::network-acl: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/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "a4e28308-8ee7-46ab-8108-9f881f22bdbf", "name": "my-network-acl"}, "public_gateway": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkACLIdentityById model
network_acl_identity_model = {}
@@ -3927,7 +4158,7 @@ def test_update_subnet_value_error(self):
"subnet_patch": subnet_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_subnet(**req_copy)
@@ -3940,7 +4171,8 @@ def test_update_subnet_value_error_with_retries(self):
_service.disable_retries()
self.test_update_subnet_value_error()
-class TestGetSubnetNetworkAcl():
+
+class TestGetSubnetNetworkAcl:
"""
Test Class for get_subnet_network_acl
"""
@@ -3953,11 +4185,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -3965,7 +4199,7 @@ def test_get_subnet_network_acl_all_params(self):
# Invoke method
response = _service.get_subnet_network_acl(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -3989,11 +4223,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -4003,7 +4239,7 @@ def test_get_subnet_network_acl_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_subnet_network_acl(**req_copy)
@@ -4016,7 +4252,8 @@ def test_get_subnet_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_get_subnet_network_acl_value_error()
-class TestReplaceSubnetNetworkAcl():
+
+class TestReplaceSubnetNetworkAcl:
"""
Test Class for replace_subnet_network_acl
"""
@@ -4029,11 +4266,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkACLIdentityById model
network_acl_identity_model = {}
@@ -4047,7 +4286,7 @@ def test_replace_subnet_network_acl_all_params(self):
response = _service.replace_subnet_network_acl(
id,
network_acl_identity,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4074,11 +4313,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkACLIdentityById model
network_acl_identity_model = {}
@@ -4094,7 +4335,7 @@ def test_replace_subnet_network_acl_value_error(self):
"network_acl_identity": network_acl_identity,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.replace_subnet_network_acl(**req_copy)
@@ -4107,7 +4348,8 @@ def test_replace_subnet_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_replace_subnet_network_acl_value_error()
-class TestUnsetSubnetPublicGateway():
+
+class TestUnsetSubnetPublicGateway:
"""
Test Class for unset_subnet_public_gateway
"""
@@ -4119,9 +4361,11 @@ def test_unset_subnet_public_gateway_all_params(self):
"""
# Set up mock
url = preprocess_url('/subnets/testString/public_gateway')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -4129,7 +4373,7 @@ def test_unset_subnet_public_gateway_all_params(self):
# Invoke method
response = _service.unset_subnet_public_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4152,9 +4396,11 @@ def test_unset_subnet_public_gateway_value_error(self):
"""
# Set up mock
url = preprocess_url('/subnets/testString/public_gateway')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -4164,7 +4410,7 @@ def test_unset_subnet_public_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.unset_subnet_public_gateway(**req_copy)
@@ -4177,7 +4423,8 @@ def test_unset_subnet_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_unset_subnet_public_gateway_value_error()
-class TestGetSubnetPublicGateway():
+
+class TestGetSubnetPublicGateway:
"""
Test Class for get_subnet_public_gateway
"""
@@ -4190,11 +4437,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -4202,7 +4451,7 @@ def test_get_subnet_public_gateway_all_params(self):
# Invoke method
response = _service.get_subnet_public_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4226,11 +4475,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -4240,7 +4491,7 @@ def test_get_subnet_public_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_subnet_public_gateway(**req_copy)
@@ -4253,7 +4504,8 @@ def test_get_subnet_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_get_subnet_public_gateway_value_error()
-class TestSetSubnetPublicGateway():
+
+class TestSetSubnetPublicGateway:
"""
Test Class for set_subnet_public_gateway
"""
@@ -4266,11 +4518,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a PublicGatewayIdentityPublicGatewayIdentityById model
public_gateway_identity_model = {}
@@ -4284,7 +4538,7 @@ def test_set_subnet_public_gateway_all_params(self):
response = _service.set_subnet_public_gateway(
id,
public_gateway_identity,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4311,11 +4565,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a PublicGatewayIdentityPublicGatewayIdentityById model
public_gateway_identity_model = {}
@@ -4331,7 +4587,7 @@ def test_set_subnet_public_gateway_value_error(self):
"public_gateway_identity": public_gateway_identity,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.set_subnet_public_gateway(**req_copy)
@@ -4344,7 +4600,8 @@ def test_set_subnet_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_set_subnet_public_gateway_value_error()
-class TestGetSubnetRoutingTable():
+
+class TestGetSubnetRoutingTable:
"""
Test Class for get_subnet_routing_table
"""
@@ -4357,11 +4614,13 @@ def test_get_subnet_routing_table_all_params(self):
# Set up mock
url = preprocess_url('/subnets/testString/routing_table')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -4369,7 +4628,7 @@ def test_get_subnet_routing_table_all_params(self):
# Invoke method
response = _service.get_subnet_routing_table(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4393,11 +4652,13 @@ def test_get_subnet_routing_table_value_error(self):
# Set up mock
url = preprocess_url('/subnets/testString/routing_table')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -4407,7 +4668,7 @@ def test_get_subnet_routing_table_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_subnet_routing_table(**req_copy)
@@ -4420,7 +4681,8 @@ def test_get_subnet_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_get_subnet_routing_table_value_error()
-class TestReplaceSubnetRoutingTable():
+
+class TestReplaceSubnetRoutingTable:
"""
Test Class for replace_subnet_routing_table
"""
@@ -4433,11 +4695,13 @@ def test_replace_subnet_routing_table_all_params(self):
# Set up mock
url = preprocess_url('/subnets/testString/routing_table')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a RoutingTableIdentityById model
routing_table_identity_model = {}
@@ -4451,7 +4715,7 @@ def test_replace_subnet_routing_table_all_params(self):
response = _service.replace_subnet_routing_table(
id,
routing_table_identity,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4478,11 +4742,13 @@ def test_replace_subnet_routing_table_value_error(self):
# Set up mock
url = preprocess_url('/subnets/testString/routing_table')
mock_response = '{"accept_routes_from": [{"resource_type": "vpn_gateway"}], "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "is_default": true, "lifecycle_state": "stable", "name": "my-routing-table-1", "resource_type": "routing_table", "route_direct_link_ingress": false, "route_internet_ingress": true, "route_transit_gateway_ingress": false, "route_vpc_zone_ingress": true, "routes": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "1a15dca5-7e33-45e1-b7c5-bc690e569531", "name": "my-route-1"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}]}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a RoutingTableIdentityById model
routing_table_identity_model = {}
@@ -4498,7 +4764,7 @@ def test_replace_subnet_routing_table_value_error(self):
"routing_table_identity": routing_table_identity,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.replace_subnet_routing_table(**req_copy)
@@ -4511,7 +4777,8 @@ def test_replace_subnet_routing_table_value_error_with_retries(self):
_service.disable_retries()
self.test_replace_subnet_routing_table_value_error()
-class TestListSubnetReservedIps():
+
+class TestListSubnetReservedIps:
"""
Test Class for list_subnet_reserved_ips
"""
@@ -4524,11 +4791,13 @@ def test_list_subnet_reserved_ips_all_params(self):
# Set up mock
url = preprocess_url('/subnets/testString/reserved_ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4542,14 +4811,14 @@ def test_list_subnet_reserved_ips_all_params(self):
start=start,
limit=limit,
sort=sort,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -4572,11 +4841,13 @@ def test_list_subnet_reserved_ips_required_params(self):
# Set up mock
url = preprocess_url('/subnets/testString/reserved_ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4584,7 +4855,7 @@ def test_list_subnet_reserved_ips_required_params(self):
# Invoke method
response = _service.list_subnet_reserved_ips(
subnet_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4608,11 +4879,13 @@ def test_list_subnet_reserved_ips_value_error(self):
# Set up mock
url = preprocess_url('/subnets/testString/reserved_ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4622,7 +4895,7 @@ def test_list_subnet_reserved_ips_value_error(self):
"subnet_id": subnet_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_subnet_reserved_ips(**req_copy)
@@ -4644,16 +4917,20 @@ def test_list_subnet_reserved_ips_with_pager_get_next(self):
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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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}'
- 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)
+ 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 = []
@@ -4678,16 +4955,20 @@ def test_list_subnet_reserved_ips_with_pager_get_all(self):
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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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}'
- 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)
+ 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 = SubnetReservedIpsPager(
@@ -4700,7 +4981,8 @@ def test_list_subnet_reserved_ips_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateSubnetReservedIp():
+
+class TestCreateSubnetReservedIp:
"""
Test Class for create_subnet_reserved_ip
"""
@@ -4713,11 +4995,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model
reserved_ip_target_prototype_model = {}
@@ -4737,7 +5021,7 @@ def test_create_subnet_reserved_ip_all_params(self):
auto_delete=auto_delete,
name=name,
target=target,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4767,11 +5051,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById model
reserved_ip_target_prototype_model = {}
@@ -4789,7 +5075,7 @@ def test_create_subnet_reserved_ip_value_error(self):
"subnet_id": subnet_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_subnet_reserved_ip(**req_copy)
@@ -4802,7 +5088,8 @@ def test_create_subnet_reserved_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_create_subnet_reserved_ip_value_error()
-class TestDeleteSubnetReservedIp():
+
+class TestDeleteSubnetReservedIp:
"""
Test Class for delete_subnet_reserved_ip
"""
@@ -4814,9 +5101,11 @@ def test_delete_subnet_reserved_ip_all_params(self):
"""
# Set up mock
url = preprocess_url('/subnets/testString/reserved_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4826,7 +5115,7 @@ def test_delete_subnet_reserved_ip_all_params(self):
response = _service.delete_subnet_reserved_ip(
subnet_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4849,9 +5138,11 @@ def test_delete_subnet_reserved_ip_value_error(self):
"""
# Set up mock
url = preprocess_url('/subnets/testString/reserved_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4863,7 +5154,7 @@ def test_delete_subnet_reserved_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_subnet_reserved_ip(**req_copy)
@@ -4876,7 +5167,8 @@ def test_delete_subnet_reserved_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_subnet_reserved_ip_value_error()
-class TestGetSubnetReservedIp():
+
+class TestGetSubnetReservedIp:
"""
Test Class for get_subnet_reserved_ip
"""
@@ -4889,11 +5181,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4903,7 +5197,7 @@ def test_get_subnet_reserved_ip_all_params(self):
response = _service.get_subnet_reserved_ip(
subnet_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -4927,11 +5221,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
subnet_id = 'testString'
@@ -4943,7 +5239,7 @@ def test_get_subnet_reserved_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_subnet_reserved_ip(**req_copy)
@@ -4956,7 +5252,8 @@ def test_get_subnet_reserved_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_get_subnet_reserved_ip_value_error()
-class TestUpdateSubnetReservedIp():
+
+class TestUpdateSubnetReservedIp:
"""
Test Class for update_subnet_reserved_ip
"""
@@ -4969,11 +5266,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ReservedIPPatch model
reserved_ip_patch_model = {}
@@ -4990,7 +5289,7 @@ def test_update_subnet_reserved_ip_all_params(self):
subnet_id,
id,
reserved_ip_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -5017,11 +5316,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ReservedIPPatch model
reserved_ip_patch_model = {}
@@ -5040,7 +5341,7 @@ def test_update_subnet_reserved_ip_value_error(self):
"reserved_ip_patch": reserved_ip_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_subnet_reserved_ip(**req_copy)
@@ -5053,6 +5354,7 @@ def test_update_subnet_reserved_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_update_subnet_reserved_ip_value_error()
+
# endregion
##############################################################################
# End of Service: Subnets
@@ -5063,7 +5365,8 @@ def test_update_subnet_reserved_ip_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -5108,7 +5411,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListImages():
+
+class TestListImages:
"""
Test Class for list_images
"""
@@ -5121,11 +5425,13 @@ def test_list_images_all_params(self):
# Set up mock
url = preprocess_url('/images')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -5141,14 +5447,14 @@ def test_list_images_all_params(self):
resource_group_id=resource_group_id,
name=name,
visibility=visibility,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -5173,16 +5479,17 @@ def test_list_images_required_params(self):
# Set up mock
url = preprocess_url('/images')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_images()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -5204,17 +5511,19 @@ def test_list_images_value_error(self):
# Set up mock
url = preprocess_url('/images')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "images": [{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_images(**req_copy)
@@ -5236,16 +5545,20 @@ def test_list_images_with_pager_get_next(self):
url = preprocess_url('/images')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}'
mock_response2 = '{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}'
- 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)
+ 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 = []
@@ -5271,16 +5584,20 @@ def test_list_images_with_pager_get_all(self):
url = preprocess_url('/images')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}'
mock_response2 = '{"images":[{"catalog_offering":{"managed":false,"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","encryption":"user_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"file":{"checksums":{"sha256":"e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"},"size":1},"href":"https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","minimum_provisioned_size":24,"name":"my-image","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"visibility":"private"}],"total_count":2,"limit":1}'
- 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)
+ 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 = ImagesPager(
@@ -5294,7 +5611,8 @@ def test_list_images_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateImage():
+
+class TestCreateImage:
"""
Test Class for create_image
"""
@@ -5307,11 +5625,13 @@ def test_create_image_all_params(self):
# Set up mock
url = preprocess_url('/images')
mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -5344,7 +5664,7 @@ def test_create_image_all_params(self):
# Invoke method
response = _service.create_image(
image_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -5371,11 +5691,13 @@ def test_create_image_value_error(self):
# Set up mock
url = preprocess_url('/images')
mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -5410,7 +5732,7 @@ def test_create_image_value_error(self):
"image_prototype": image_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_image(**req_copy)
@@ -5423,7 +5745,8 @@ def test_create_image_value_error_with_retries(self):
_service.disable_retries()
self.test_create_image_value_error()
-class TestDeleteImage():
+
+class TestDeleteImage:
"""
Test Class for delete_image
"""
@@ -5435,9 +5758,11 @@ def test_delete_image_all_params(self):
"""
# Set up mock
url = preprocess_url('/images/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -5445,7 +5770,7 @@ def test_delete_image_all_params(self):
# Invoke method
response = _service.delete_image(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -5468,9 +5793,11 @@ def test_delete_image_value_error(self):
"""
# Set up mock
url = preprocess_url('/images/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -5480,7 +5807,7 @@ def test_delete_image_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_image(**req_copy)
@@ -5493,7 +5820,8 @@ def test_delete_image_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_image_value_error()
-class TestGetImage():
+
+class TestGetImage:
"""
Test Class for get_image
"""
@@ -5506,11 +5834,13 @@ def test_get_image_all_params(self):
# Set up mock
url = preprocess_url('/images/testString')
mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -5518,7 +5848,7 @@ def test_get_image_all_params(self):
# Invoke method
response = _service.get_image(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -5542,11 +5872,13 @@ def test_get_image_value_error(self):
# Set up mock
url = preprocess_url('/images/testString')
mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -5556,7 +5888,7 @@ def test_get_image_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_image(**req_copy)
@@ -5569,7 +5901,8 @@ def test_get_image_value_error_with_retries(self):
_service.disable_retries()
self.test_get_image_value_error()
-class TestUpdateImage():
+
+class TestUpdateImage:
"""
Test Class for update_image
"""
@@ -5582,11 +5915,13 @@ def test_update_image_all_params(self):
# Set up mock
url = preprocess_url('/images/testString')
mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ImagePatch model
image_patch_model = {}
@@ -5600,7 +5935,7 @@ def test_update_image_all_params(self):
response = _service.update_image(
id,
image_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -5627,11 +5962,13 @@ def test_update_image_value_error(self):
# Set up mock
url = preprocess_url('/images/testString')
mock_response = '{"catalog_offering": {"managed": false, "version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d"}}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "file": {"checksums": {"sha256": "e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15"}, "size": 1}, "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "minimum_provisioned_size": 24, "name": "my-image", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "visibility": "private"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ImagePatch model
image_patch_model = {}
@@ -5647,7 +5984,7 @@ def test_update_image_value_error(self):
"image_patch": image_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_image(**req_copy)
@@ -5660,7 +5997,501 @@ def test_update_image_value_error_with_retries(self):
_service.disable_retries()
self.test_update_image_value_error()
-class TestListOperatingSystems():
+
+class TestListImageExportJobs:
+ """
+ Test Class for list_image_export_jobs
+ """
+
+ @responses.activate
+ def test_list_image_export_jobs_all_params(self):
+ """
+ list_image_export_jobs()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}]}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+ name = 'testString'
+
+ # Invoke method
+ response = _service.list_image_export_jobs(
+ image_id,
+ name=name,
+ 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 'name={}'.format(name) in query_string
+
+ def test_list_image_export_jobs_all_params_with_retries(self):
+ # Enable retries and run test_list_image_export_jobs_all_params.
+ _service.enable_retries()
+ self.test_list_image_export_jobs_all_params()
+
+ # Disable retries and run test_list_image_export_jobs_all_params.
+ _service.disable_retries()
+ self.test_list_image_export_jobs_all_params()
+
+ @responses.activate
+ def test_list_image_export_jobs_required_params(self):
+ """
+ test_list_image_export_jobs_required_params()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}]}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+
+ # Invoke method
+ response = _service.list_image_export_jobs(
+ image_id,
+ headers={},
+ )
+
+ # Check for correct operation
+ assert len(responses.calls) == 1
+ assert response.status_code == 200
+
+ def test_list_image_export_jobs_required_params_with_retries(self):
+ # Enable retries and run test_list_image_export_jobs_required_params.
+ _service.enable_retries()
+ self.test_list_image_export_jobs_required_params()
+
+ # Disable retries and run test_list_image_export_jobs_required_params.
+ _service.disable_retries()
+ self.test_list_image_export_jobs_required_params()
+
+ @responses.activate
+ def test_list_image_export_jobs_value_error(self):
+ """
+ test_list_image_export_jobs_value_error()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}]}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+
+ # Pass in all but one required param and check for a ValueError
+ req_param_dict = {
+ "image_id": image_id,
+ }
+ for param in req_param_dict.keys():
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
+ with pytest.raises(ValueError):
+ _service.list_image_export_jobs(**req_copy)
+
+ def test_list_image_export_jobs_value_error_with_retries(self):
+ # Enable retries and run test_list_image_export_jobs_value_error.
+ _service.enable_retries()
+ self.test_list_image_export_jobs_value_error()
+
+ # Disable retries and run test_list_image_export_jobs_value_error.
+ _service.disable_retries()
+ self.test_list_image_export_jobs_value_error()
+
+
+class TestCreateImageExportJob:
+ """
+ Test Class for create_image_export_job
+ """
+
+ @responses.activate
+ def test_create_image_export_job_all_params(self):
+ """
+ create_image_export_job()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}'
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
+
+ # Construct a dict representation of a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model
+ cloud_object_storage_bucket_identity_model = {}
+ cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue'
+
+ # Set up parameter values
+ image_id = 'testString'
+ storage_bucket = cloud_object_storage_bucket_identity_model
+ format = 'qcow2'
+ name = 'my-image-export'
+
+ # Invoke method
+ response = _service.create_image_export_job(
+ image_id,
+ storage_bucket,
+ format=format,
+ name=name,
+ 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['storage_bucket'] == cloud_object_storage_bucket_identity_model
+ assert req_body['format'] == 'qcow2'
+ assert req_body['name'] == 'my-image-export'
+
+ def test_create_image_export_job_all_params_with_retries(self):
+ # Enable retries and run test_create_image_export_job_all_params.
+ _service.enable_retries()
+ self.test_create_image_export_job_all_params()
+
+ # Disable retries and run test_create_image_export_job_all_params.
+ _service.disable_retries()
+ self.test_create_image_export_job_all_params()
+
+ @responses.activate
+ def test_create_image_export_job_value_error(self):
+ """
+ test_create_image_export_job_value_error()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}'
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
+
+ # Construct a dict representation of a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model
+ cloud_object_storage_bucket_identity_model = {}
+ cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue'
+
+ # Set up parameter values
+ image_id = 'testString'
+ storage_bucket = cloud_object_storage_bucket_identity_model
+ format = 'qcow2'
+ name = 'my-image-export'
+
+ # Pass in all but one required param and check for a ValueError
+ req_param_dict = {
+ "image_id": image_id,
+ "storage_bucket": storage_bucket,
+ }
+ for param in req_param_dict.keys():
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
+ with pytest.raises(ValueError):
+ _service.create_image_export_job(**req_copy)
+
+ def test_create_image_export_job_value_error_with_retries(self):
+ # Enable retries and run test_create_image_export_job_value_error.
+ _service.enable_retries()
+ self.test_create_image_export_job_value_error()
+
+ # Disable retries and run test_create_image_export_job_value_error.
+ _service.disable_retries()
+ self.test_create_image_export_job_value_error()
+
+
+class TestDeleteImageExportJob:
+ """
+ Test Class for delete_image_export_job
+ """
+
+ @responses.activate
+ def test_delete_image_export_job_all_params(self):
+ """
+ delete_image_export_job()
+ """
+ # Set up mock
+ url = preprocess_url('/images/testString/export_jobs/testString')
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+ id = 'testString'
+
+ # Invoke method
+ response = _service.delete_image_export_job(
+ image_id,
+ id,
+ headers={},
+ )
+
+ # Check for correct operation
+ assert len(responses.calls) == 1
+ assert response.status_code == 202
+
+ def test_delete_image_export_job_all_params_with_retries(self):
+ # Enable retries and run test_delete_image_export_job_all_params.
+ _service.enable_retries()
+ self.test_delete_image_export_job_all_params()
+
+ # Disable retries and run test_delete_image_export_job_all_params.
+ _service.disable_retries()
+ self.test_delete_image_export_job_all_params()
+
+ @responses.activate
+ def test_delete_image_export_job_value_error(self):
+ """
+ test_delete_image_export_job_value_error()
+ """
+ # Set up mock
+ url = preprocess_url('/images/testString/export_jobs/testString')
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+ id = 'testString'
+
+ # Pass in all but one required param and check for a ValueError
+ req_param_dict = {
+ "image_id": image_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_image_export_job(**req_copy)
+
+ def test_delete_image_export_job_value_error_with_retries(self):
+ # Enable retries and run test_delete_image_export_job_value_error.
+ _service.enable_retries()
+ self.test_delete_image_export_job_value_error()
+
+ # Disable retries and run test_delete_image_export_job_value_error.
+ _service.disable_retries()
+ self.test_delete_image_export_job_value_error()
+
+
+class TestGetImageExportJob:
+ """
+ Test Class for get_image_export_job
+ """
+
+ @responses.activate
+ def test_get_image_export_job_all_params(self):
+ """
+ get_image_export_job()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+ id = 'testString'
+
+ # Invoke method
+ response = _service.get_image_export_job(
+ image_id,
+ id,
+ headers={},
+ )
+
+ # Check for correct operation
+ assert len(responses.calls) == 1
+ assert response.status_code == 200
+
+ def test_get_image_export_job_all_params_with_retries(self):
+ # Enable retries and run test_get_image_export_job_all_params.
+ _service.enable_retries()
+ self.test_get_image_export_job_all_params()
+
+ # Disable retries and run test_get_image_export_job_all_params.
+ _service.disable_retries()
+ self.test_get_image_export_job_all_params()
+
+ @responses.activate
+ def test_get_image_export_job_value_error(self):
+ """
+ test_get_image_export_job_value_error()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Set up parameter values
+ image_id = 'testString'
+ id = 'testString'
+
+ # Pass in all but one required param and check for a ValueError
+ req_param_dict = {
+ "image_id": image_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_image_export_job(**req_copy)
+
+ def test_get_image_export_job_value_error_with_retries(self):
+ # Enable retries and run test_get_image_export_job_value_error.
+ _service.enable_retries()
+ self.test_get_image_export_job_value_error()
+
+ # Disable retries and run test_get_image_export_job_value_error.
+ _service.disable_retries()
+ self.test_get_image_export_job_value_error()
+
+
+class TestUpdateImageExportJob:
+ """
+ Test Class for update_image_export_job
+ """
+
+ @responses.activate
+ def test_update_image_export_job_all_params(self):
+ """
+ update_image_export_job()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}'
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Construct a dict representation of a ImageExportJobPatch model
+ image_export_job_patch_model = {}
+ image_export_job_patch_model['name'] = 'my-image-export'
+
+ # Set up parameter values
+ image_id = 'testString'
+ id = 'testString'
+ image_export_job_patch = image_export_job_patch_model
+
+ # Invoke method
+ response = _service.update_image_export_job(
+ image_id,
+ id,
+ image_export_job_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 == image_export_job_patch
+
+ def test_update_image_export_job_all_params_with_retries(self):
+ # Enable retries and run test_update_image_export_job_all_params.
+ _service.enable_retries()
+ self.test_update_image_export_job_all_params()
+
+ # Disable retries and run test_update_image_export_job_all_params.
+ _service.disable_retries()
+ self.test_update_image_export_job_all_params()
+
+ @responses.activate
+ def test_update_image_export_job_value_error(self):
+ """
+ test_update_image_export_job_value_error()
+ """
+ # 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": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "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/59bcbfa6ea2f006b4ed7094c1a08dcdd: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"}}'
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
+
+ # Construct a dict representation of a ImageExportJobPatch model
+ image_export_job_patch_model = {}
+ image_export_job_patch_model['name'] = 'my-image-export'
+
+ # Set up parameter values
+ image_id = 'testString'
+ id = 'testString'
+ image_export_job_patch = image_export_job_patch_model
+
+ # Pass in all but one required param and check for a ValueError
+ req_param_dict = {
+ "image_id": image_id,
+ "id": id,
+ "image_export_job_patch": image_export_job_patch,
+ }
+ for param in req_param_dict.keys():
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
+ with pytest.raises(ValueError):
+ _service.update_image_export_job(**req_copy)
+
+ def test_update_image_export_job_value_error_with_retries(self):
+ # Enable retries and run test_update_image_export_job_value_error.
+ _service.enable_retries()
+ self.test_update_image_export_job_value_error()
+
+ # Disable retries and run test_update_image_export_job_value_error.
+ _service.disable_retries()
+ self.test_update_image_export_job_value_error()
+
+
+class TestListOperatingSystems:
"""
Test Class for list_operating_systems
"""
@@ -5673,11 +6504,13 @@ def test_list_operating_systems_all_params(self):
# Set up mock
url = preprocess_url('/operating_systems')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -5687,14 +6520,14 @@ def test_list_operating_systems_all_params(self):
response = _service.list_operating_systems(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -5716,16 +6549,17 @@ def test_list_operating_systems_required_params(self):
# Set up mock
url = preprocess_url('/operating_systems')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_operating_systems()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -5747,17 +6581,19 @@ def test_list_operating_systems_value_error(self):
# Set up mock
url = preprocess_url('/operating_systems')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "operating_systems": [{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_operating_systems(**req_copy)
@@ -5779,16 +6615,20 @@ def test_list_operating_systems_with_pager_get_next(self):
url = preprocess_url('/operating_systems')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}'
mock_response2 = '{"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}'
- 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)
+ 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 = []
@@ -5811,16 +6651,20 @@ def test_list_operating_systems_with_pager_get_all(self):
url = preprocess_url('/operating_systems')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}'
mock_response2 = '{"operating_systems":[{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"}],"total_count":2,"limit":1}'
- 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)
+ 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 = OperatingSystemsPager(
@@ -5831,7 +6675,8 @@ def test_list_operating_systems_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetOperatingSystem():
+
+class TestGetOperatingSystem:
"""
Test Class for get_operating_system
"""
@@ -5844,11 +6689,13 @@ def test_get_operating_system_all_params(self):
# Set up mock
url = preprocess_url('/operating_systems/testString')
mock_response = '{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -5856,7 +6703,7 @@ def test_get_operating_system_all_params(self):
# Invoke method
response = _service.get_operating_system(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -5880,11 +6727,13 @@ def test_get_operating_system_value_error(self):
# Set up mock
url = preprocess_url('/operating_systems/testString')
mock_response = '{"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -5894,7 +6743,7 @@ def test_get_operating_system_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_operating_system(**req_copy)
@@ -5907,6 +6756,7 @@ def test_get_operating_system_value_error_with_retries(self):
_service.disable_retries()
self.test_get_operating_system_value_error()
+
# endregion
##############################################################################
# End of Service: Images
@@ -5917,7 +6767,8 @@ def test_get_operating_system_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -5962,7 +6813,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListKeys():
+
+class TestListKeys:
"""
Test Class for list_keys
"""
@@ -5975,11 +6827,13 @@ def test_list_keys_all_params(self):
# Set up mock
url = preprocess_url('/keys')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -5989,14 +6843,14 @@ def test_list_keys_all_params(self):
response = _service.list_keys(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -6018,16 +6872,17 @@ def test_list_keys_required_params(self):
# Set up mock
url = preprocess_url('/keys')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_keys()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -6049,17 +6904,19 @@ def test_list_keys_value_error(self):
# Set up mock
url = preprocess_url('/keys')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?limit=20"}, "keys": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_keys(**req_copy)
@@ -6081,16 +6938,20 @@ def test_list_keys_with_pager_get_next(self):
url = preprocess_url('/keys')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"rsa"}],"limit":1}'
mock_response2 = '{"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"rsa"}],"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)
+ 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 = []
@@ -6113,16 +6974,20 @@ def test_list_keys_with_pager_get_all(self):
url = preprocess_url('/keys')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"rsa"}],"limit":1}'
mock_response2 = '{"total_count":2,"keys":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803","fingerprint":"SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY","href":"https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","length":2048,"name":"my-key","public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"type":"rsa"}],"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)
+ 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 = KeysPager(
@@ -6133,7 +6998,8 @@ def test_list_keys_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateKey():
+
+class TestCreateKey:
"""
Test Class for create_key
"""
@@ -6146,11 +7012,13 @@ def test_create_key_all_params(self):
# Set up mock
url = preprocess_url('/keys')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -6168,7 +7036,7 @@ def test_create_key_all_params(self):
name=name,
resource_group=resource_group,
type=type,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -6198,11 +7066,13 @@ def test_create_key_value_error(self):
# Set up mock
url = preprocess_url('/keys')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -6219,7 +7089,7 @@ def test_create_key_value_error(self):
"public_key": public_key,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_key(**req_copy)
@@ -6232,7 +7102,8 @@ def test_create_key_value_error_with_retries(self):
_service.disable_retries()
self.test_create_key_value_error()
-class TestDeleteKey():
+
+class TestDeleteKey:
"""
Test Class for delete_key
"""
@@ -6244,9 +7115,11 @@ def test_delete_key_all_params(self):
"""
# Set up mock
url = preprocess_url('/keys/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -6254,7 +7127,7 @@ def test_delete_key_all_params(self):
# Invoke method
response = _service.delete_key(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -6277,9 +7150,11 @@ def test_delete_key_value_error(self):
"""
# Set up mock
url = preprocess_url('/keys/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -6289,7 +7164,7 @@ def test_delete_key_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_key(**req_copy)
@@ -6302,7 +7177,8 @@ def test_delete_key_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_key_value_error()
-class TestGetKey():
+
+class TestGetKey:
"""
Test Class for get_key
"""
@@ -6315,11 +7191,13 @@ def test_get_key_all_params(self):
# Set up mock
url = preprocess_url('/keys/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -6327,7 +7205,7 @@ def test_get_key_all_params(self):
# Invoke method
response = _service.get_key(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -6351,11 +7229,13 @@ def test_get_key_value_error(self):
# Set up mock
url = preprocess_url('/keys/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -6365,7 +7245,7 @@ def test_get_key_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_key(**req_copy)
@@ -6378,7 +7258,8 @@ def test_get_key_value_error_with_retries(self):
_service.disable_retries()
self.test_get_key_value_error()
-class TestUpdateKey():
+
+class TestUpdateKey:
"""
Test Class for update_key
"""
@@ -6391,11 +7272,13 @@ def test_update_key_all_params(self):
# Set up mock
url = preprocess_url('/keys/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a KeyPatch model
key_patch_model = {}
@@ -6409,7 +7292,7 @@ def test_update_key_all_params(self):
response = _service.update_key(
id,
key_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -6436,11 +7319,13 @@ def test_update_key_value_error(self):
# Set up mock
url = preprocess_url('/keys/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "length": 2048, "name": "my-key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDGe50Bxa5T5NDddrrtbx2Y4/VGbiCgXqnBsYToIUKoFSHTQl5IX3PasGnneKanhcLwWz5M5MoCRvhxTp66NKzIfAz7r+FX9rxgR+ZgcM253YAqOVeIpOU408simDZKriTlN8kYsXL7P34tsWuAJf4MgZtJAQxous/2byetpdCv8ddnT4X3ltOg9w+LqSCPYfNivqH00Eh7S1Ldz7I8aw5WOp5a+sQFP/RbwfpwHp+ny7DfeIOokcuI42tJkoBn7UsLTVpCSmXr2EDRlSWe/1M/iHNRBzaT3CK0+SwZWd2AEjePxSnWKNGIEUJDlUYp7hKhiQcgT5ZAnWU121oc5En", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "type": "rsa"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a KeyPatch model
key_patch_model = {}
@@ -6456,7 +7341,7 @@ def test_update_key_value_error(self):
"key_patch": key_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_key(**req_copy)
@@ -6469,6 +7354,7 @@ def test_update_key_value_error_with_retries(self):
_service.disable_retries()
self.test_update_key_value_error()
+
# endregion
##############################################################################
# End of Service: Keys
@@ -6479,7 +7365,8 @@ def test_update_key_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -6524,7 +7411,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListInstanceProfiles():
+
+class TestListInstanceProfiles:
"""
Test Class for list_instance_profiles
"""
@@ -6537,16 +7425,17 @@ def test_list_instance_profiles_all_params(self):
# Set up mock
url = preprocess_url('/instance/profiles')
mock_response = '{"profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_instance_profiles()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -6568,17 +7457,19 @@ def test_list_instance_profiles_value_error(self):
# Set up mock
url = preprocess_url('/instance/profiles')
mock_response = '{"profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_profiles(**req_copy)
@@ -6591,7 +7482,8 @@ def test_list_instance_profiles_value_error_with_retries(self):
_service.disable_retries()
self.test_list_instance_profiles_value_error()
-class TestGetInstanceProfile():
+
+class TestGetInstanceProfile:
"""
Test Class for get_instance_profile
"""
@@ -6604,11 +7496,13 @@ def test_get_instance_profile_all_params(self):
# Set up mock
url = preprocess_url('/instance/profiles/testString')
mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -6616,7 +7510,7 @@ def test_get_instance_profile_all_params(self):
# Invoke method
response = _service.get_instance_profile(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -6640,11 +7534,13 @@ def test_get_instance_profile_value_error(self):
# Set up mock
url = preprocess_url('/instance/profiles/testString')
mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "nvme", "type": "enum", "values": ["nvme"]}}], "family": "balanced", "gpu_count": {"type": "fixed", "value": 2}, "gpu_manufacturer": {"type": "enum", "values": ["nvidia"]}, "gpu_memory": {"type": "fixed", "value": 16}, "gpu_model": {"type": "enum", "values": ["Tesla V100"]}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "memory": {"type": "fixed", "value": 16}, "name": "bx2-4x16", "network_interface_count": {"max": 5, "min": 1, "type": "range"}, "os_architecture": {"default": "default", "type": "enum", "values": ["amd64"]}, "port_speed": {"type": "fixed", "value": 1000}, "total_volume_bandwidth": {"type": "fixed", "value": 20000}, "vcpu_architecture": {"default": "default", "type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"default": "default", "type": "fixed", "value": "intel"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -6654,7 +7550,7 @@ def test_get_instance_profile_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_profile(**req_copy)
@@ -6667,7 +7563,8 @@ def test_get_instance_profile_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_profile_value_error()
-class TestListInstanceTemplates():
+
+class TestListInstanceTemplates:
"""
Test Class for list_instance_templates
"""
@@ -6679,17 +7576,18 @@ def test_list_instance_templates_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance/templates')
- mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}], "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_instance_templates()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -6710,18 +7608,20 @@ def test_list_instance_templates_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance/templates')
- mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "templates": [{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}], "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_templates(**req_copy)
@@ -6734,7 +7634,8 @@ def test_list_instance_templates_value_error_with_retries(self):
_service.disable_retries()
self.test_list_instance_templates_value_error()
-class TestCreateInstanceTemplate():
+
+class TestCreateInstanceTemplate:
"""
Test Class for create_instance_template
"""
@@ -6746,12 +7647,14 @@ def test_create_instance_template_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance/templates')
- mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
+ 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 = {}
@@ -6776,28 +7679,6 @@ def test_create_instance_template_all_params(self):
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- # 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 SecurityGroupIdentityById model
- security_group_identity_model = {}
- security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
- network_interface_prototype_model = {}
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-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 InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model
instance_placement_target_prototype_model = {}
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -6834,7 +7715,7 @@ def test_create_instance_template_all_params(self):
# Construct a dict representation of a VolumePrototypeInstanceByImageContext model
volume_prototype_instance_by_image_context_model = {}
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ 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'
@@ -6851,18 +7732,39 @@ def test_create_instance_template_all_params(self):
image_identity_model = {}
image_identity_model['id'] = '3f9a2d96-830e-4100-9b4c-663225a3f872'
+ # 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 SecurityGroupIdentityById model
+ security_group_identity_model = {}
+ security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
+ network_interface_prototype_model = {}
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-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 ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
- # Construct a dict representation of a InstanceTemplatePrototypeInstanceByImage model
+ # Construct a dict representation of a InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext model
instance_template_prototype_model = {}
instance_template_prototype_model['availability_policy'] = instance_availability_policy_prototype_model
instance_template_prototype_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
instance_template_prototype_model['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['network_interfaces'] = [network_interface_prototype_model]
instance_template_prototype_model['placement_target'] = instance_placement_target_prototype_model
instance_template_prototype_model['profile'] = instance_profile_identity_model
instance_template_prototype_model['resource_group'] = resource_group_identity_model
@@ -6872,6 +7774,7 @@ def test_create_instance_template_all_params(self):
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['image'] = image_identity_model
+ instance_template_prototype_model['network_interfaces'] = [network_interface_prototype_model]
instance_template_prototype_model['primary_network_interface'] = network_interface_prototype_model
instance_template_prototype_model['zone'] = zone_identity_model
@@ -6881,7 +7784,7 @@ def test_create_instance_template_all_params(self):
# Invoke method
response = _service.create_instance_template(
instance_template_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -6907,12 +7810,14 @@ def test_create_instance_template_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance/templates')
- mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
+ 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 = {}
@@ -6937,28 +7842,6 @@ def test_create_instance_template_value_error(self):
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- # 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 SecurityGroupIdentityById model
- security_group_identity_model = {}
- security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
- network_interface_prototype_model = {}
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-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 InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model
instance_placement_target_prototype_model = {}
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -6995,7 +7878,7 @@ def test_create_instance_template_value_error(self):
# Construct a dict representation of a VolumePrototypeInstanceByImageContext model
volume_prototype_instance_by_image_context_model = {}
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ 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'
@@ -7012,18 +7895,39 @@ def test_create_instance_template_value_error(self):
image_identity_model = {}
image_identity_model['id'] = '3f9a2d96-830e-4100-9b4c-663225a3f872'
+ # 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 SecurityGroupIdentityById model
+ security_group_identity_model = {}
+ security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
+ network_interface_prototype_model = {}
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-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 ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
- # Construct a dict representation of a InstanceTemplatePrototypeInstanceByImage model
+ # Construct a dict representation of a InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext model
instance_template_prototype_model = {}
instance_template_prototype_model['availability_policy'] = instance_availability_policy_prototype_model
instance_template_prototype_model['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
instance_template_prototype_model['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['network_interfaces'] = [network_interface_prototype_model]
instance_template_prototype_model['placement_target'] = instance_placement_target_prototype_model
instance_template_prototype_model['profile'] = instance_profile_identity_model
instance_template_prototype_model['resource_group'] = resource_group_identity_model
@@ -7033,6 +7937,7 @@ def test_create_instance_template_value_error(self):
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['image'] = image_identity_model
+ instance_template_prototype_model['network_interfaces'] = [network_interface_prototype_model]
instance_template_prototype_model['primary_network_interface'] = network_interface_prototype_model
instance_template_prototype_model['zone'] = zone_identity_model
@@ -7044,7 +7949,7 @@ def test_create_instance_template_value_error(self):
"instance_template_prototype": instance_template_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_template(**req_copy)
@@ -7057,7 +7962,8 @@ def test_create_instance_template_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_template_value_error()
-class TestDeleteInstanceTemplate():
+
+class TestDeleteInstanceTemplate:
"""
Test Class for delete_instance_template
"""
@@ -7069,9 +7975,11 @@ def test_delete_instance_template_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance/templates/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -7079,7 +7987,7 @@ def test_delete_instance_template_all_params(self):
# Invoke method
response = _service.delete_instance_template(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -7102,9 +8010,11 @@ def test_delete_instance_template_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance/templates/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -7114,7 +8024,7 @@ def test_delete_instance_template_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_template(**req_copy)
@@ -7127,7 +8037,8 @@ def test_delete_instance_template_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_template_value_error()
-class TestGetInstanceTemplate():
+
+class TestGetInstanceTemplate:
"""
Test Class for get_instance_template
"""
@@ -7139,12 +8050,14 @@ def test_get_instance_template_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance/templates/testString')
- mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -7152,7 +8065,7 @@ def test_get_instance_template_all_params(self):
# Invoke method
response = _service.get_instance_template(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -7175,12 +8088,14 @@ def test_get_instance_template_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance/templates/testString')
- mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -7190,7 +8105,7 @@ def test_get_instance_template_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_template(**req_copy)
@@ -7203,7 +8118,8 @@ def test_get_instance_template_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_template_value_error()
-class TestUpdateInstanceTemplate():
+
+class TestUpdateInstanceTemplate:
"""
Test Class for update_instance_template
"""
@@ -7215,12 +8131,14 @@ def test_update_instance_template_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance/templates/testString')
- mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceTemplatePatch model
instance_template_patch_model = {}
@@ -7234,7 +8152,7 @@ def test_update_instance_template_all_params(self):
response = _service.update_instance_template(
id,
instance_template_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -7260,12 +8178,14 @@ def test_update_instance_template_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance/templates/testString')
- mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"capacity": 250, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"availability_policy": {"host_failure": "restart"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "default_trusted_profile": {"auto_link": false, "target": {"id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5"}}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "metadata_service": {"enabled": false, "protocol": "https", "response_hop_limit": 2}, "name": "my-instance-template", "placement_target": {"id": "1e09281b-f177-46fb-baf1-bc152b2e391a"}, "profile": {"name": "bx2-4x16"}, "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": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "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/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "iops": 10000, "name": "my-volume", "profile": {"name": "general-purpose"}, "user_tags": ["user_tags"]}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, "network_interfaces": [{"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "primary_network_interface": {"allow_ip_spoofing": true, "name": "my-network-interface", "primary_ip": {"id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb"}, "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}}'
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceTemplatePatch model
instance_template_patch_model = {}
@@ -7281,7 +8201,7 @@ def test_update_instance_template_value_error(self):
"instance_template_patch": instance_template_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_template(**req_copy)
@@ -7294,7 +8214,8 @@ def test_update_instance_template_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_template_value_error()
-class TestListInstances():
+
+class TestListInstances:
"""
Test Class for list_instances
"""
@@ -7307,11 +8228,13 @@ def test_list_instances_all_params(self):
# Set up mock
url = preprocess_url('/instances')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -7343,14 +8266,14 @@ 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,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -7383,16 +8306,17 @@ def test_list_instances_required_params(self):
# Set up mock
url = preprocess_url('/instances')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_instances()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -7414,17 +8338,19 @@ def test_list_instances_value_error(self):
# Set up mock
url = preprocess_url('/instances')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20"}, "instances": [{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instances(**req_copy)
@@ -7446,16 +8372,20 @@ def test_list_instances_with_pager_get_next(self):
url = preprocess_url('/instances')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -7489,16 +8419,20 @@ def test_list_instances_with_pager_get_all(self):
url = preprocess_url('/instances')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"total_count":2,"limit":1}'
mock_response2 = '{"instances":[{"availability_policy":{"host_failure":"restart"},"bandwidth":1000,"boot_volume_attachment":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}},"catalog_offering":{"version":{"crn":"crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a","dedicated_host":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"},"disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","interface_type":"nvme","name":"my-instance-disk","resource_type":"instance_disk","size":100}],"gpu":{"count":1,"manufacturer":"nvidia","memory":1,"model":"Tesla V100"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"lifecycle_reasons":[{"code":"resource_suspended_by_provider","message":"The resource has been suspended. Contact IBM support with the CRN for next steps.","more_info":"https://cloud.ibm.com/apidocs/vpc#resource-suspension"}],"lifecycle_state":"stable","memory":8,"metadata_service":{"enabled":false,"protocol":"http","response_hop_limit":1},"name":"my-instance","network_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"placement_target":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"instance","startable":false,"status":"deleting","status_reasons":[{"code":"cannot_start_storage","message":"The virtual server instance is unusable because the encryption key for the boot volume\\nhas been deleted","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"total_network_bandwidth":500,"total_volume_bandwidth":500,"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"volume_attachments":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","name":"my-volume-attachment","volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"}}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = InstancesPager(
@@ -7520,7 +8454,8 @@ def test_list_instances_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateInstance():
+
+class TestCreateInstance:
"""
Test Class for create_instance
"""
@@ -7533,11 +8468,13 @@ def test_create_instance_all_params(self):
# Set up mock
url = preprocess_url('/instances')
mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ 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 = {}
@@ -7562,28 +8499,6 @@ def test_create_instance_all_params(self):
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- # 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 SecurityGroupIdentityById model
- security_group_identity_model = {}
- security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
- network_interface_prototype_model = {}
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-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 InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model
instance_placement_target_prototype_model = {}
instance_placement_target_prototype_model['id'] = '0787-84e4793a-7cd8-4a7b-b253-818aa19d0512'
@@ -7625,7 +8540,7 @@ def test_create_instance_all_params(self):
# Construct a dict representation of a VolumePrototypeInstanceByImageContext model
volume_prototype_instance_by_image_context_model = {}
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ 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-boot-volume'
@@ -7642,6 +8557,28 @@ def test_create_instance_all_params(self):
image_identity_model = {}
image_identity_model['id'] = '9aaf3bcb-dcd7-4de7-bb60-24e39ff9d366'
+ # 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 SecurityGroupIdentityById model
+ security_group_identity_model = {}
+ security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
+ network_interface_prototype_model = {}
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-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 ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
@@ -7653,7 +8590,6 @@ def test_create_instance_all_params(self):
instance_prototype_model['keys'] = [key_identity_model]
instance_prototype_model['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_model['name'] = 'my-instance'
- instance_prototype_model['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_model['placement_target'] = instance_placement_target_prototype_model
instance_prototype_model['profile'] = instance_profile_identity_model
instance_prototype_model['resource_group'] = resource_group_identity_model
@@ -7663,6 +8599,7 @@ def test_create_instance_all_params(self):
instance_prototype_model['vpc'] = vpc_identity_model
instance_prototype_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
instance_prototype_model['image'] = image_identity_model
+ instance_prototype_model['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_model['primary_network_interface'] = network_interface_prototype_model
instance_prototype_model['zone'] = zone_identity_model
@@ -7672,7 +8609,7 @@ def test_create_instance_all_params(self):
# Invoke method
response = _service.create_instance(
instance_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -7699,11 +8636,13 @@ def test_create_instance_value_error(self):
# Set up mock
url = preprocess_url('/instances')
mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ 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 = {}
@@ -7728,28 +8667,6 @@ def test_create_instance_value_error(self):
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- # 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 SecurityGroupIdentityById model
- security_group_identity_model = {}
- security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
- network_interface_prototype_model = {}
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-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 InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById model
instance_placement_target_prototype_model = {}
instance_placement_target_prototype_model['id'] = '0787-84e4793a-7cd8-4a7b-b253-818aa19d0512'
@@ -7791,7 +8708,7 @@ def test_create_instance_value_error(self):
# Construct a dict representation of a VolumePrototypeInstanceByImageContext model
volume_prototype_instance_by_image_context_model = {}
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ 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-boot-volume'
@@ -7808,6 +8725,28 @@ def test_create_instance_value_error(self):
image_identity_model = {}
image_identity_model['id'] = '9aaf3bcb-dcd7-4de7-bb60-24e39ff9d366'
+ # 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 SecurityGroupIdentityById model
+ security_group_identity_model = {}
+ security_group_identity_model['id'] = '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 NetworkInterfacePrototype model
+ network_interface_prototype_model = {}
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-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 ZoneIdentityByName model
zone_identity_model = {}
zone_identity_model['name'] = 'us-south-1'
@@ -7819,7 +8758,6 @@ def test_create_instance_value_error(self):
instance_prototype_model['keys'] = [key_identity_model]
instance_prototype_model['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_model['name'] = 'my-instance'
- instance_prototype_model['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_model['placement_target'] = instance_placement_target_prototype_model
instance_prototype_model['profile'] = instance_profile_identity_model
instance_prototype_model['resource_group'] = resource_group_identity_model
@@ -7829,6 +8767,7 @@ def test_create_instance_value_error(self):
instance_prototype_model['vpc'] = vpc_identity_model
instance_prototype_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
instance_prototype_model['image'] = image_identity_model
+ instance_prototype_model['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_model['primary_network_interface'] = network_interface_prototype_model
instance_prototype_model['zone'] = zone_identity_model
@@ -7840,7 +8779,7 @@ def test_create_instance_value_error(self):
"instance_prototype": instance_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance(**req_copy)
@@ -7853,7 +8792,8 @@ def test_create_instance_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_value_error()
-class TestDeleteInstance():
+
+class TestDeleteInstance:
"""
Test Class for delete_instance
"""
@@ -7865,9 +8805,11 @@ def test_delete_instance_all_params(self):
"""
# Set up mock
url = preprocess_url('/instances/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -7875,7 +8817,7 @@ def test_delete_instance_all_params(self):
# Invoke method
response = _service.delete_instance(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -7898,9 +8840,11 @@ def test_delete_instance_value_error(self):
"""
# Set up mock
url = preprocess_url('/instances/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -7910,7 +8854,7 @@ def test_delete_instance_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance(**req_copy)
@@ -7923,7 +8867,8 @@ def test_delete_instance_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_value_error()
-class TestGetInstance():
+
+class TestGetInstance:
"""
Test Class for get_instance
"""
@@ -7936,11 +8881,13 @@ def test_get_instance_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString')
mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -7948,7 +8895,7 @@ def test_get_instance_all_params(self):
# Invoke method
response = _service.get_instance(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -7972,11 +8919,13 @@ def test_get_instance_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString')
mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -7986,7 +8935,7 @@ def test_get_instance_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance(**req_copy)
@@ -7999,7 +8948,8 @@ def test_get_instance_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_value_error()
-class TestUpdateInstance():
+
+class TestUpdateInstance:
"""
Test Class for update_instance
"""
@@ -8012,11 +8962,13 @@ def test_update_instance_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString')
mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceAvailabilityPolicyPatch model
instance_availability_policy_patch_model = {}
@@ -8053,7 +9005,7 @@ def test_update_instance_all_params(self):
response = _service.update_instance(
id,
instance_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8080,11 +9032,13 @@ def test_update_instance_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString')
mock_response = '{"availability_policy": {"host_failure": "restart"}, "bandwidth": 1000, "boot_volume_attachment": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}, "catalog_offering": {"version": {"crn": "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "dedicated_host": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}, "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}], "gpu": {"count": 1, "manufacturer": "nvidia", "memory": 1, "model": "Tesla V100"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "lifecycle_reasons": [{"code": "resource_suspended_by_provider", "message": "The resource has been suspended. Contact IBM support with the CRN for next steps.", "more_info": "https://cloud.ibm.com/apidocs/vpc#resource-suspension"}], "lifecycle_state": "stable", "memory": 8, "metadata_service": {"enabled": false, "protocol": "http", "response_hop_limit": 1}, "name": "my-instance", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "placement_target": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "instance", "startable": false, "status": "deleting", "status_reasons": [{"code": "cannot_start_storage", "message": "The virtual server instance is unusable because the encryption key for the boot volume\nhas been deleted", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "total_network_bandwidth": 500, "total_volume_bandwidth": 500, "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "volume_attachments": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceAvailabilityPolicyPatch model
instance_availability_policy_patch_model = {}
@@ -8123,7 +9077,7 @@ def test_update_instance_value_error(self):
"instance_patch": instance_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance(**req_copy)
@@ -8136,7 +9090,8 @@ def test_update_instance_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_value_error()
-class TestGetInstanceInitialization():
+
+class TestGetInstanceInitialization:
"""
Test Class for get_instance_initialization
"""
@@ -8149,11 +9104,13 @@ def test_get_instance_initialization_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/initialization')
mock_response = '{"default_trusted_profile": {"auto_link": true, "target": {"crn": "crn:v1:bluemix:public:iam-identity::a/123456::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "resource_type": "trusted_profile"}}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "password": {"encrypted_password": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "encryption_key": {"fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY"}}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -8161,7 +9118,7 @@ def test_get_instance_initialization_all_params(self):
# Invoke method
response = _service.get_instance_initialization(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8185,11 +9142,13 @@ def test_get_instance_initialization_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/initialization')
mock_response = '{"default_trusted_profile": {"auto_link": true, "target": {"crn": "crn:v1:bluemix:public:iam-identity::a/123456::profile:Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "id": "Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5", "resource_type": "trusted_profile"}}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "password": {"encrypted_password": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "encryption_key": {"fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY"}}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -8199,7 +9158,7 @@ def test_get_instance_initialization_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_initialization(**req_copy)
@@ -8212,7 +9171,8 @@ def test_get_instance_initialization_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_initialization_value_error()
-class TestCreateInstanceAction():
+
+class TestCreateInstanceAction:
"""
Test Class for create_instance_action
"""
@@ -8225,11 +9185,13 @@ def test_create_instance_action_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/actions')
mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "force": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/actions/109a1b6e-1242-4de1-be44-38705e9474ed", "id": "109a1b6e-1242-4de1-be44-38705e9474ed", "started_at": "2019-01-01T12:00:00.000Z", "status": "completed", "type": "reboot"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8241,7 +9203,7 @@ def test_create_instance_action_all_params(self):
instance_id,
type,
force=force,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8269,11 +9231,13 @@ def test_create_instance_action_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/actions')
mock_response = '{"completed_at": "2019-01-01T12:00:00.000Z", "created_at": "2019-01-01T12:00:00.000Z", "force": false, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/actions/109a1b6e-1242-4de1-be44-38705e9474ed", "id": "109a1b6e-1242-4de1-be44-38705e9474ed", "started_at": "2019-01-01T12:00:00.000Z", "status": "completed", "type": "reboot"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8286,7 +9250,7 @@ def test_create_instance_action_value_error(self):
"type": type,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_action(**req_copy)
@@ -8299,7 +9263,8 @@ def test_create_instance_action_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_action_value_error()
-class TestCreateInstanceConsoleAccessToken():
+
+class TestCreateInstanceConsoleAccessToken:
"""
Test Class for create_instance_console_access_token
"""
@@ -8312,11 +9277,13 @@ def test_create_instance_console_access_token_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/console_access_token')
mock_response = '{"access_token": "VGhpcyBJcyBhIHRva2Vu", "console_type": "serial", "created_at": "2020-07-27T21:50:14.000Z", "expires_at": "2020-07-27T21:51:14.000Z", "force": false, "href": "wss://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8328,7 +9295,7 @@ def test_create_instance_console_access_token_all_params(self):
instance_id,
console_type,
force=force,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8356,11 +9323,13 @@ def test_create_instance_console_access_token_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/console_access_token')
mock_response = '{"access_token": "VGhpcyBJcyBhIHRva2Vu", "console_type": "serial", "created_at": "2020-07-27T21:50:14.000Z", "expires_at": "2020-07-27T21:51:14.000Z", "force": false, "href": "wss://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8373,7 +9342,7 @@ def test_create_instance_console_access_token_value_error(self):
"console_type": console_type,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_console_access_token(**req_copy)
@@ -8386,7 +9355,8 @@ def test_create_instance_console_access_token_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_console_access_token_value_error()
-class TestListInstanceDisks():
+
+class TestListInstanceDisks:
"""
Test Class for list_instance_disks
"""
@@ -8399,11 +9369,13 @@ def test_list_instance_disks_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/disks')
mock_response = '{"disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8411,7 +9383,7 @@ def test_list_instance_disks_all_params(self):
# Invoke method
response = _service.list_instance_disks(
instance_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8435,11 +9407,13 @@ def test_list_instance_disks_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/disks')
mock_response = '{"disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8449,7 +9423,7 @@ def test_list_instance_disks_value_error(self):
"instance_id": instance_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_disks(**req_copy)
@@ -8462,7 +9436,8 @@ def test_list_instance_disks_value_error_with_retries(self):
_service.disable_retries()
self.test_list_instance_disks_value_error()
-class TestGetInstanceDisk():
+
+class TestGetInstanceDisk:
"""
Test Class for get_instance_disk
"""
@@ -8475,11 +9450,13 @@ def test_get_instance_disk_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8489,7 +9466,7 @@ def test_get_instance_disk_all_params(self):
response = _service.get_instance_disk(
instance_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8513,11 +9490,13 @@ def test_get_instance_disk_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8529,7 +9508,7 @@ def test_get_instance_disk_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_disk(**req_copy)
@@ -8542,7 +9521,8 @@ def test_get_instance_disk_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_disk_value_error()
-class TestUpdateInstanceDisk():
+
+class TestUpdateInstanceDisk:
"""
Test Class for update_instance_disk
"""
@@ -8555,11 +9535,13 @@ def test_update_instance_disk_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceDiskPatch model
instance_disk_patch_model = {}
@@ -8575,7 +9557,7 @@ def test_update_instance_disk_all_params(self):
instance_id,
id,
instance_disk_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8602,11 +9584,13 @@ def test_update_instance_disk_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "nvme", "name": "my-instance-disk", "resource_type": "instance_disk", "size": 100}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceDiskPatch model
instance_disk_patch_model = {}
@@ -8624,7 +9608,7 @@ def test_update_instance_disk_value_error(self):
"instance_disk_patch": instance_disk_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_disk(**req_copy)
@@ -8637,7 +9621,8 @@ def test_update_instance_disk_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_disk_value_error()
-class TestListInstanceNetworkInterfaces():
+
+class TestListInstanceNetworkInterfaces:
"""
Test Class for list_instance_network_interfaces
"""
@@ -8650,11 +9635,13 @@ def test_list_instance_network_interfaces_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces')
mock_response = '{"network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8662,7 +9649,7 @@ def test_list_instance_network_interfaces_all_params(self):
# Invoke method
response = _service.list_instance_network_interfaces(
instance_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8686,11 +9673,13 @@ def test_list_instance_network_interfaces_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces')
mock_response = '{"network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8700,7 +9689,7 @@ def test_list_instance_network_interfaces_value_error(self):
"instance_id": instance_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_network_interfaces(**req_copy)
@@ -8713,7 +9702,8 @@ def test_list_instance_network_interfaces_value_error_with_retries(self):
_service.disable_retries()
self.test_list_instance_network_interfaces_value_error()
-class TestCreateInstanceNetworkInterface():
+
+class TestCreateInstanceNetworkInterface:
"""
Test Class for create_instance_network_interface
"""
@@ -8726,11 +9716,13 @@ def test_create_instance_network_interface_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a SubnetIdentityById model
subnet_identity_model = {}
@@ -8762,7 +9754,7 @@ def test_create_instance_network_interface_all_params(self):
name=name,
primary_ip=primary_ip,
security_groups=security_groups,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8793,11 +9785,13 @@ def test_create_instance_network_interface_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a SubnetIdentityById model
subnet_identity_model = {}
@@ -8827,7 +9821,7 @@ def test_create_instance_network_interface_value_error(self):
"subnet": subnet,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_network_interface(**req_copy)
@@ -8840,7 +9834,8 @@ def test_create_instance_network_interface_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_network_interface_value_error()
-class TestDeleteInstanceNetworkInterface():
+
+class TestDeleteInstanceNetworkInterface:
"""
Test Class for delete_instance_network_interface
"""
@@ -8852,9 +9847,11 @@ def test_delete_instance_network_interface_all_params(self):
"""
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8864,7 +9861,7 @@ def test_delete_instance_network_interface_all_params(self):
response = _service.delete_instance_network_interface(
instance_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8887,9 +9884,11 @@ def test_delete_instance_network_interface_value_error(self):
"""
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8901,7 +9900,7 @@ def test_delete_instance_network_interface_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_network_interface(**req_copy)
@@ -8914,7 +9913,8 @@ def test_delete_instance_network_interface_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_network_interface_value_error()
-class TestGetInstanceNetworkInterface():
+
+class TestGetInstanceNetworkInterface:
"""
Test Class for get_instance_network_interface
"""
@@ -8927,11 +9927,13 @@ def test_get_instance_network_interface_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8941,7 +9943,7 @@ def test_get_instance_network_interface_all_params(self):
response = _service.get_instance_network_interface(
instance_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -8965,11 +9967,13 @@ def test_get_instance_network_interface_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -8981,7 +9985,7 @@ def test_get_instance_network_interface_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_network_interface(**req_copy)
@@ -8994,7 +9998,8 @@ def test_get_instance_network_interface_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_network_interface_value_error()
-class TestUpdateInstanceNetworkInterface():
+
+class TestUpdateInstanceNetworkInterface:
"""
Test Class for update_instance_network_interface
"""
@@ -9007,11 +10012,13 @@ def test_update_instance_network_interface_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkInterfacePatch model
network_interface_patch_model = {}
@@ -9028,7 +10035,7 @@ def test_update_instance_network_interface_all_params(self):
instance_id,
id,
network_interface_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9055,11 +10062,13 @@ def test_update_instance_network_interface_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkInterfacePatch model
network_interface_patch_model = {}
@@ -9078,7 +10087,7 @@ def test_update_instance_network_interface_value_error(self):
"network_interface_patch": network_interface_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_network_interface(**req_copy)
@@ -9091,7 +10100,8 @@ def test_update_instance_network_interface_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_network_interface_value_error()
-class TestListInstanceNetworkInterfaceFloatingIps():
+
+class TestListInstanceNetworkInterfaceFloatingIps:
"""
Test Class for list_instance_network_interface_floating_ips
"""
@@ -9104,11 +10114,13 @@ def test_list_instance_network_interface_floating_ips_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips')
mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9118,7 +10130,7 @@ def test_list_instance_network_interface_floating_ips_all_params(self):
response = _service.list_instance_network_interface_floating_ips(
instance_id,
network_interface_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9142,11 +10154,13 @@ def test_list_instance_network_interface_floating_ips_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips')
mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9158,7 +10172,7 @@ def test_list_instance_network_interface_floating_ips_value_error(self):
"network_interface_id": network_interface_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_network_interface_floating_ips(**req_copy)
@@ -9171,7 +10185,8 @@ def test_list_instance_network_interface_floating_ips_value_error_with_retries(s
_service.disable_retries()
self.test_list_instance_network_interface_floating_ips_value_error()
-class TestRemoveInstanceNetworkInterfaceFloatingIp():
+
+class TestRemoveInstanceNetworkInterfaceFloatingIp:
"""
Test Class for remove_instance_network_interface_floating_ip
"""
@@ -9183,9 +10198,11 @@ def test_remove_instance_network_interface_floating_ip_all_params(self):
"""
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9197,7 +10214,7 @@ def test_remove_instance_network_interface_floating_ip_all_params(self):
instance_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9220,9 +10237,11 @@ def test_remove_instance_network_interface_floating_ip_value_error(self):
"""
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9236,7 +10255,7 @@ def test_remove_instance_network_interface_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.remove_instance_network_interface_floating_ip(**req_copy)
@@ -9249,7 +10268,8 @@ def test_remove_instance_network_interface_floating_ip_value_error_with_retries(
_service.disable_retries()
self.test_remove_instance_network_interface_floating_ip_value_error()
-class TestGetInstanceNetworkInterfaceFloatingIp():
+
+class TestGetInstanceNetworkInterfaceFloatingIp:
"""
Test Class for get_instance_network_interface_floating_ip
"""
@@ -9262,11 +10282,13 @@ def test_get_instance_network_interface_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9278,7 +10300,7 @@ def test_get_instance_network_interface_floating_ip_all_params(self):
instance_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9302,11 +10324,13 @@ def test_get_instance_network_interface_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9320,7 +10344,7 @@ def test_get_instance_network_interface_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_network_interface_floating_ip(**req_copy)
@@ -9333,7 +10357,8 @@ def test_get_instance_network_interface_floating_ip_value_error_with_retries(sel
_service.disable_retries()
self.test_get_instance_network_interface_floating_ip_value_error()
-class TestAddInstanceNetworkInterfaceFloatingIp():
+
+class TestAddInstanceNetworkInterfaceFloatingIp:
"""
Test Class for add_instance_network_interface_floating_ip
"""
@@ -9346,11 +10371,13 @@ def test_add_instance_network_interface_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9362,7 +10389,7 @@ def test_add_instance_network_interface_floating_ip_all_params(self):
instance_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9386,11 +10413,13 @@ def test_add_instance_network_interface_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9404,7 +10433,7 @@ def test_add_instance_network_interface_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.add_instance_network_interface_floating_ip(**req_copy)
@@ -9417,7 +10446,8 @@ def test_add_instance_network_interface_floating_ip_value_error_with_retries(sel
_service.disable_retries()
self.test_add_instance_network_interface_floating_ip_value_error()
-class TestListInstanceNetworkInterfaceIps():
+
+class TestListInstanceNetworkInterfaceIps:
"""
Test Class for list_instance_network_interface_ips
"""
@@ -9430,11 +10460,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9448,14 +10480,14 @@ def test_list_instance_network_interface_ips_all_params(self):
network_interface_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -9477,11 +10509,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9491,7 +10525,7 @@ def test_list_instance_network_interface_ips_required_params(self):
response = _service.list_instance_network_interface_ips(
instance_id,
network_interface_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9515,11 +10549,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9531,7 +10567,7 @@ def test_list_instance_network_interface_ips_value_error(self):
"network_interface_id": network_interface_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_network_interface_ips(**req_copy)
@@ -9553,16 +10589,20 @@ def test_list_instance_network_interface_ips_with_pager_get_next(self):
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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -9587,16 +10627,20 @@ def test_list_instance_network_interface_ips_with_pager_get_all(self):
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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = InstanceNetworkInterfaceIpsPager(
@@ -9609,7 +10653,8 @@ def test_list_instance_network_interface_ips_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetInstanceNetworkInterfaceIp():
+
+class TestGetInstanceNetworkInterfaceIp:
"""
Test Class for get_instance_network_interface_ip
"""
@@ -9622,11 +10667,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9638,7 +10685,7 @@ def test_get_instance_network_interface_ip_all_params(self):
instance_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9662,11 +10709,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9680,7 +10729,7 @@ def test_get_instance_network_interface_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_network_interface_ip(**req_copy)
@@ -9693,7 +10742,8 @@ def test_get_instance_network_interface_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_network_interface_ip_value_error()
-class TestListInstanceVolumeAttachments():
+
+class TestListInstanceVolumeAttachments:
"""
Test Class for list_instance_volume_attachments
"""
@@ -9706,11 +10756,13 @@ def test_list_instance_volume_attachments_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments')
mock_response = '{"volume_attachments": [{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9718,7 +10770,7 @@ def test_list_instance_volume_attachments_all_params(self):
# Invoke method
response = _service.list_instance_volume_attachments(
instance_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9742,11 +10794,13 @@ def test_list_instance_volume_attachments_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments')
mock_response = '{"volume_attachments": [{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9756,7 +10810,7 @@ def test_list_instance_volume_attachments_value_error(self):
"instance_id": instance_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_volume_attachments(**req_copy)
@@ -9769,7 +10823,8 @@ def test_list_instance_volume_attachments_value_error_with_retries(self):
_service.disable_retries()
self.test_list_instance_volume_attachments_value_error()
-class TestCreateInstanceVolumeAttachment():
+
+class TestCreateInstanceVolumeAttachment:
"""
Test Class for create_instance_volume_attachment
"""
@@ -9782,11 +10837,13 @@ def test_create_instance_volume_attachment_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments')
mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model
volume_attachment_prototype_volume_model = {}
@@ -9804,7 +10861,7 @@ def test_create_instance_volume_attachment_all_params(self):
volume,
delete_volume_on_instance_delete=delete_volume_on_instance_delete,
name=name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9833,11 +10890,13 @@ def test_create_instance_volume_attachment_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments')
mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById model
volume_attachment_prototype_volume_model = {}
@@ -9855,7 +10914,7 @@ def test_create_instance_volume_attachment_value_error(self):
"volume": volume,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_volume_attachment(**req_copy)
@@ -9868,7 +10927,8 @@ def test_create_instance_volume_attachment_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_volume_attachment_value_error()
-class TestDeleteInstanceVolumeAttachment():
+
+class TestDeleteInstanceVolumeAttachment:
"""
Test Class for delete_instance_volume_attachment
"""
@@ -9880,9 +10940,11 @@ def test_delete_instance_volume_attachment_all_params(self):
"""
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9892,7 +10954,7 @@ def test_delete_instance_volume_attachment_all_params(self):
response = _service.delete_instance_volume_attachment(
instance_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9915,9 +10977,11 @@ def test_delete_instance_volume_attachment_value_error(self):
"""
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9929,7 +10993,7 @@ def test_delete_instance_volume_attachment_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_volume_attachment(**req_copy)
@@ -9942,7 +11006,8 @@ def test_delete_instance_volume_attachment_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_volume_attachment_value_error()
-class TestGetInstanceVolumeAttachment():
+
+class TestGetInstanceVolumeAttachment:
"""
Test Class for get_instance_volume_attachment
"""
@@ -9955,11 +11020,13 @@ def test_get_instance_volume_attachment_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments/testString')
mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -9969,7 +11036,7 @@ def test_get_instance_volume_attachment_all_params(self):
response = _service.get_instance_volume_attachment(
instance_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -9993,11 +11060,13 @@ def test_get_instance_volume_attachment_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments/testString')
mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_id = 'testString'
@@ -10009,7 +11078,7 @@ def test_get_instance_volume_attachment_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_volume_attachment(**req_copy)
@@ -10022,7 +11091,8 @@ def test_get_instance_volume_attachment_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_volume_attachment_value_error()
-class TestUpdateInstanceVolumeAttachment():
+
+class TestUpdateInstanceVolumeAttachment:
"""
Test Class for update_instance_volume_attachment
"""
@@ -10035,11 +11105,13 @@ def test_update_instance_volume_attachment_all_params(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments/testString')
mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VolumeAttachmentPatch model
volume_attachment_patch_model = {}
@@ -10056,7 +11128,7 @@ def test_update_instance_volume_attachment_all_params(self):
instance_id,
id,
volume_attachment_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10083,11 +11155,13 @@ def test_update_instance_volume_attachment_value_error(self):
# Set up mock
url = preprocess_url('/instances/testString/volume_attachments/testString')
mock_response = '{"bandwidth": 250, "created_at": "2019-01-01T12:00:00.000Z", "delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "name": "my-volume-attachment", "status": "attached", "type": "boot", "volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VolumeAttachmentPatch model
volume_attachment_patch_model = {}
@@ -10106,7 +11180,7 @@ def test_update_instance_volume_attachment_value_error(self):
"volume_attachment_patch": volume_attachment_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_volume_attachment(**req_copy)
@@ -10119,6 +11193,7 @@ def test_update_instance_volume_attachment_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_volume_attachment_value_error()
+
# endregion
##############################################################################
# End of Service: Instances
@@ -10129,7 +11204,8 @@ def test_update_instance_volume_attachment_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -10174,7 +11250,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListInstanceGroups():
+
+class TestListInstanceGroups:
"""
Test Class for list_instance_groups
"""
@@ -10187,11 +11264,13 @@ def test_list_instance_groups_all_params(self):
# Set up mock
url = preprocess_url('/instance_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -10201,14 +11280,14 @@ def test_list_instance_groups_all_params(self):
response = _service.list_instance_groups(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -10230,16 +11309,17 @@ def test_list_instance_groups_required_params(self):
# Set up mock
url = preprocess_url('/instance_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_instance_groups()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -10261,17 +11341,19 @@ def test_list_instance_groups_value_error(self):
# Set up mock
url = preprocess_url('/instance_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20"}, "instance_groups": [{"application_port": 22, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_groups(**req_copy)
@@ -10293,16 +11375,20 @@ def test_list_instance_groups_with_pager_get_next(self):
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/123456::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/123456::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"},"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::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/123456::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"},"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}'
- 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)
+ 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 = []
@@ -10325,16 +11411,20 @@ def test_list_instance_groups_with_pager_get_all(self):
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/123456::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/123456::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"},"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::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/123456::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"},"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}'
- 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)
+ 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 = InstanceGroupsPager(
@@ -10345,7 +11435,8 @@ def test_list_instance_groups_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateInstanceGroup():
+
+class TestCreateInstanceGroup:
"""
Test Class for create_instance_group
"""
@@ -10358,11 +11449,13 @@ 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/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceTemplateIdentityById model
instance_template_identity_model = {}
@@ -10404,7 +11497,7 @@ def test_create_instance_group_all_params(self):
membership_count=membership_count,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10438,11 +11531,13 @@ 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/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceTemplateIdentityById model
instance_template_identity_model = {}
@@ -10480,7 +11575,7 @@ def test_create_instance_group_value_error(self):
"subnets": subnets,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_group(**req_copy)
@@ -10493,7 +11588,8 @@ def test_create_instance_group_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_group_value_error()
-class TestDeleteInstanceGroup():
+
+class TestDeleteInstanceGroup:
"""
Test Class for delete_instance_group
"""
@@ -10505,9 +11601,11 @@ def test_delete_instance_group_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -10515,7 +11613,7 @@ def test_delete_instance_group_all_params(self):
# Invoke method
response = _service.delete_instance_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10538,9 +11636,11 @@ def test_delete_instance_group_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -10550,7 +11650,7 @@ def test_delete_instance_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group(**req_copy)
@@ -10563,7 +11663,8 @@ def test_delete_instance_group_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_value_error()
-class TestGetInstanceGroup():
+
+class TestGetInstanceGroup:
"""
Test Class for get_instance_group
"""
@@ -10576,11 +11677,13 @@ 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/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -10588,7 +11691,7 @@ def test_get_instance_group_all_params(self):
# Invoke method
response = _service.get_instance_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10612,11 +11715,13 @@ 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/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -10626,7 +11731,7 @@ def test_get_instance_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_group(**req_copy)
@@ -10639,7 +11744,8 @@ def test_get_instance_group_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_group_value_error()
-class TestUpdateInstanceGroup():
+
+class TestUpdateInstanceGroup:
"""
Test Class for update_instance_group
"""
@@ -10652,11 +11758,13 @@ 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/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceTemplateIdentityById model
instance_template_identity_model = {}
@@ -10692,7 +11800,7 @@ def test_update_instance_group_all_params(self):
response = _service.update_instance_group(
id,
instance_group_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10719,11 +11827,13 @@ 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/123456::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/123456::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"}, "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceTemplateIdentityById model
instance_template_identity_model = {}
@@ -10761,7 +11871,7 @@ def test_update_instance_group_value_error(self):
"instance_group_patch": instance_group_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_group(**req_copy)
@@ -10774,7 +11884,8 @@ def test_update_instance_group_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_group_value_error()
-class TestDeleteInstanceGroupLoadBalancer():
+
+class TestDeleteInstanceGroupLoadBalancer:
"""
Test Class for delete_instance_group_load_balancer
"""
@@ -10786,9 +11897,11 @@ def test_delete_instance_group_load_balancer_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/load_balancer')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -10796,7 +11909,7 @@ def test_delete_instance_group_load_balancer_all_params(self):
# Invoke method
response = _service.delete_instance_group_load_balancer(
instance_group_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10819,9 +11932,11 @@ def test_delete_instance_group_load_balancer_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/load_balancer')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -10831,7 +11946,7 @@ def test_delete_instance_group_load_balancer_value_error(self):
"instance_group_id": instance_group_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group_load_balancer(**req_copy)
@@ -10844,7 +11959,8 @@ def test_delete_instance_group_load_balancer_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_load_balancer_value_error()
-class TestListInstanceGroupManagers():
+
+class TestListInstanceGroupManagers:
"""
Test Class for list_instance_group_managers
"""
@@ -10857,11 +11973,13 @@ def test_list_instance_group_managers_all_params(self):
# Set up mock
url = preprocess_url('/instance_groups/testString/managers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -10873,14 +11991,14 @@ def test_list_instance_group_managers_all_params(self):
instance_group_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -10902,11 +12020,13 @@ def test_list_instance_group_managers_required_params(self):
# Set up mock
url = preprocess_url('/instance_groups/testString/managers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -10914,7 +12034,7 @@ def test_list_instance_group_managers_required_params(self):
# Invoke method
response = _service.list_instance_group_managers(
instance_group_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -10938,11 +12058,13 @@ def test_list_instance_group_managers_value_error(self):
# Set up mock
url = preprocess_url('/instance_groups/testString/managers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -10952,7 +12074,7 @@ def test_list_instance_group_managers_value_error(self):
"instance_group_id": instance_group_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_group_managers(**req_copy)
@@ -10974,16 +12096,20 @@ def test_list_instance_group_managers_with_pager_get_next(self):
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"}]}]}'
- 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)
+ 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 = []
@@ -11007,16 +12133,20 @@ def test_list_instance_group_managers_with_pager_get_all(self):
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"}]}]}'
- 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)
+ 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 = InstanceGroupManagersPager(
@@ -11028,7 +12158,8 @@ def test_list_instance_group_managers_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateInstanceGroupManager():
+
+class TestCreateInstanceGroupManager:
"""
Test Class for create_instance_group_manager
"""
@@ -11041,11 +12172,13 @@ 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"}]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model
instance_group_manager_prototype_model = {}
@@ -11065,7 +12198,7 @@ def test_create_instance_group_manager_all_params(self):
response = _service.create_instance_group_manager(
instance_group_id,
instance_group_manager_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11092,11 +12225,13 @@ 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"}]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype model
instance_group_manager_prototype_model = {}
@@ -11118,7 +12253,7 @@ def test_create_instance_group_manager_value_error(self):
"instance_group_manager_prototype": instance_group_manager_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_group_manager(**req_copy)
@@ -11131,7 +12266,8 @@ def test_create_instance_group_manager_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_group_manager_value_error()
-class TestDeleteInstanceGroupManager():
+
+class TestDeleteInstanceGroupManager:
"""
Test Class for delete_instance_group_manager
"""
@@ -11143,9 +12279,11 @@ def test_delete_instance_group_manager_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/managers/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11155,7 +12293,7 @@ def test_delete_instance_group_manager_all_params(self):
response = _service.delete_instance_group_manager(
instance_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11178,9 +12316,11 @@ def test_delete_instance_group_manager_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/managers/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11192,7 +12332,7 @@ def test_delete_instance_group_manager_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group_manager(**req_copy)
@@ -11205,7 +12345,8 @@ def test_delete_instance_group_manager_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_manager_value_error()
-class TestGetInstanceGroupManager():
+
+class TestGetInstanceGroupManager:
"""
Test Class for get_instance_group_manager
"""
@@ -11218,11 +12359,13 @@ 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"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11232,7 +12375,7 @@ def test_get_instance_group_manager_all_params(self):
response = _service.get_instance_group_manager(
instance_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11256,11 +12399,13 @@ 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"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11272,7 +12417,7 @@ def test_get_instance_group_manager_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_group_manager(**req_copy)
@@ -11285,7 +12430,8 @@ def test_get_instance_group_manager_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_group_manager_value_error()
-class TestUpdateInstanceGroupManager():
+
+class TestUpdateInstanceGroupManager:
"""
Test Class for update_instance_group_manager
"""
@@ -11298,11 +12444,13 @@ 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"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupManagerPatch model
instance_group_manager_patch_model = {}
@@ -11323,7 +12471,7 @@ def test_update_instance_group_manager_all_params(self):
instance_group_id,
id,
instance_group_manager_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11350,11 +12498,13 @@ 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"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupManagerPatch model
instance_group_manager_patch_model = {}
@@ -11377,7 +12527,7 @@ def test_update_instance_group_manager_value_error(self):
"instance_group_manager_patch": instance_group_manager_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_group_manager(**req_copy)
@@ -11390,7 +12540,8 @@ def test_update_instance_group_manager_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_group_manager_value_error()
-class TestListInstanceGroupManagerActions():
+
+class TestListInstanceGroupManagerActions:
"""
Test Class for list_instance_group_manager_actions
"""
@@ -11403,11 +12554,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11421,14 +12574,14 @@ def test_list_instance_group_manager_actions_all_params(self):
instance_group_manager_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -11450,11 +12603,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11464,7 +12619,7 @@ def test_list_instance_group_manager_actions_required_params(self):
response = _service.list_instance_group_manager_actions(
instance_group_id,
instance_group_manager_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11488,11 +12643,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11504,7 +12661,7 @@ def test_list_instance_group_manager_actions_value_error(self):
"instance_group_manager_id": instance_group_manager_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_group_manager_actions(**req_copy)
@@ -11526,16 +12683,20 @@ def test_list_instance_group_manager_actions_with_pager_get_next(self):
url = preprocess_url('/instance_groups/testString/managers/testString/actions')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}'
mock_response2 = '{"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}'
- responses.add(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)
+ 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 = []
@@ -11560,16 +12721,20 @@ def test_list_instance_group_manager_actions_with_pager_get_all(self):
url = preprocess_url('/instance_groups/testString/managers/testString/actions')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}'
mock_response2 = '{"total_count":2,"limit":1,"actions":[{"auto_delete":true,"auto_delete_timeout":24,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-action","resource_type":"instance_group_manager_action","status":"active","updated_at":"2019-01-01T12:00:00.000Z","action_type":"scheduled","cron_spec":"30 */2 * * 1-5","last_applied_at":"2019-01-01T12:00:00.000Z","next_run_at":"2019-01-01T12:00:00.000Z","group":{"membership_count":10}}]}'
- responses.add(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)
+ 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 = InstanceGroupManagerActionsPager(
@@ -11582,7 +12747,8 @@ def test_list_instance_group_manager_actions_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateInstanceGroupManagerAction():
+
+class TestCreateInstanceGroupManagerAction:
"""
Test Class for create_instance_group_manager_action
"""
@@ -11595,11 +12761,13 @@ 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}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceGroupManagerScheduledActionGroupPrototype model
instance_group_manager_scheduled_action_group_prototype_model = {}
@@ -11621,7 +12789,7 @@ def test_create_instance_group_manager_action_all_params(self):
instance_group_id,
instance_group_manager_id,
instance_group_manager_action_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11648,11 +12816,13 @@ 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}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceGroupManagerScheduledActionGroupPrototype model
instance_group_manager_scheduled_action_group_prototype_model = {}
@@ -11676,7 +12846,7 @@ def test_create_instance_group_manager_action_value_error(self):
"instance_group_manager_action_prototype": instance_group_manager_action_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_group_manager_action(**req_copy)
@@ -11689,7 +12859,8 @@ def test_create_instance_group_manager_action_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_group_manager_action_value_error()
-class TestDeleteInstanceGroupManagerAction():
+
+class TestDeleteInstanceGroupManagerAction:
"""
Test Class for delete_instance_group_manager_action
"""
@@ -11701,9 +12872,11 @@ def test_delete_instance_group_manager_action_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11715,7 +12888,7 @@ def test_delete_instance_group_manager_action_all_params(self):
instance_group_id,
instance_group_manager_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11738,9 +12911,11 @@ def test_delete_instance_group_manager_action_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/managers/testString/actions/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11754,7 +12929,7 @@ def test_delete_instance_group_manager_action_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group_manager_action(**req_copy)
@@ -11767,7 +12942,8 @@ def test_delete_instance_group_manager_action_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_manager_action_value_error()
-class TestGetInstanceGroupManagerAction():
+
+class TestGetInstanceGroupManagerAction:
"""
Test Class for get_instance_group_manager_action
"""
@@ -11780,11 +12956,13 @@ 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}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11796,7 +12974,7 @@ def test_get_instance_group_manager_action_all_params(self):
instance_group_id,
instance_group_manager_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11820,11 +12998,13 @@ 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}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -11838,7 +13018,7 @@ def test_get_instance_group_manager_action_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_group_manager_action(**req_copy)
@@ -11851,7 +13031,8 @@ def test_get_instance_group_manager_action_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_group_manager_action_value_error()
-class TestUpdateInstanceGroupManagerAction():
+
+class TestUpdateInstanceGroupManagerAction:
"""
Test Class for update_instance_group_manager_action
"""
@@ -11864,11 +13045,13 @@ 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}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupManagerActionGroupPatch model
instance_group_manager_action_group_patch_model = {}
@@ -11899,7 +13082,7 @@ def test_update_instance_group_manager_action_all_params(self):
instance_group_manager_id,
id,
instance_group_manager_action_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -11926,11 +13109,13 @@ 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}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupManagerActionGroupPatch model
instance_group_manager_action_group_patch_model = {}
@@ -11963,7 +13148,7 @@ def test_update_instance_group_manager_action_value_error(self):
"instance_group_manager_action_patch": instance_group_manager_action_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_group_manager_action(**req_copy)
@@ -11976,7 +13161,8 @@ def test_update_instance_group_manager_action_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_group_manager_action_value_error()
-class TestListInstanceGroupManagerPolicies():
+
+class TestListInstanceGroupManagerPolicies:
"""
Test Class for list_instance_group_manager_policies
"""
@@ -11989,11 +13175,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12007,14 +13195,14 @@ def test_list_instance_group_manager_policies_all_params(self):
instance_group_manager_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -12036,11 +13224,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12050,7 +13240,7 @@ def test_list_instance_group_manager_policies_required_params(self):
response = _service.list_instance_group_manager_policies(
instance_group_id,
instance_group_manager_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12074,11 +13264,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "policies": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy", "updated_at": "2019-01-01T12:00:00.000Z", "metric_type": "cpu", "metric_value": 12, "policy_type": "target"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12090,7 +13282,7 @@ def test_list_instance_group_manager_policies_value_error(self):
"instance_group_manager_id": instance_group_manager_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_group_manager_policies(**req_copy)
@@ -12112,16 +13304,20 @@ def test_list_instance_group_manager_policies_with_pager_get_next(self):
url = preprocess_url('/instance_groups/testString/managers/testString/policies')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}'
mock_response2 = '{"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}'
- responses.add(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)
+ 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 = []
@@ -12146,16 +13342,20 @@ def test_list_instance_group_manager_policies_with_pager_get_all(self):
url = preprocess_url('/instance_groups/testString/managers/testString/policies')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}'
mock_response2 = '{"total_count":2,"limit":1,"policies":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance-group-manager-policy","updated_at":"2019-01-01T12:00:00.000Z","metric_type":"cpu","metric_value":12,"policy_type":"target"}]}'
- responses.add(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)
+ 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 = InstanceGroupManagerPoliciesPager(
@@ -12168,7 +13368,8 @@ def test_list_instance_group_manager_policies_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateInstanceGroupManagerPolicy():
+
+class TestCreateInstanceGroupManagerPolicy:
"""
Test Class for create_instance_group_manager_policy
"""
@@ -12181,11 +13382,13 @@ 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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model
instance_group_manager_policy_prototype_model = {}
@@ -12204,7 +13407,7 @@ def test_create_instance_group_manager_policy_all_params(self):
instance_group_id,
instance_group_manager_id,
instance_group_manager_policy_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12231,11 +13434,13 @@ 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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype model
instance_group_manager_policy_prototype_model = {}
@@ -12256,7 +13461,7 @@ def test_create_instance_group_manager_policy_value_error(self):
"instance_group_manager_policy_prototype": instance_group_manager_policy_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_instance_group_manager_policy(**req_copy)
@@ -12269,7 +13474,8 @@ def test_create_instance_group_manager_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_create_instance_group_manager_policy_value_error()
-class TestDeleteInstanceGroupManagerPolicy():
+
+class TestDeleteInstanceGroupManagerPolicy:
"""
Test Class for delete_instance_group_manager_policy
"""
@@ -12281,9 +13487,11 @@ def test_delete_instance_group_manager_policy_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12295,7 +13503,7 @@ def test_delete_instance_group_manager_policy_all_params(self):
instance_group_id,
instance_group_manager_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12318,9 +13526,11 @@ def test_delete_instance_group_manager_policy_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/managers/testString/policies/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12334,7 +13544,7 @@ def test_delete_instance_group_manager_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group_manager_policy(**req_copy)
@@ -12347,7 +13557,8 @@ def test_delete_instance_group_manager_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_manager_policy_value_error()
-class TestGetInstanceGroupManagerPolicy():
+
+class TestGetInstanceGroupManagerPolicy:
"""
Test Class for get_instance_group_manager_policy
"""
@@ -12360,11 +13571,13 @@ 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"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12376,7 +13589,7 @@ def test_get_instance_group_manager_policy_all_params(self):
instance_group_id,
instance_group_manager_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12400,11 +13613,13 @@ 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"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12418,7 +13633,7 @@ def test_get_instance_group_manager_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_group_manager_policy(**req_copy)
@@ -12431,7 +13646,8 @@ def test_get_instance_group_manager_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_group_manager_policy_value_error()
-class TestUpdateInstanceGroupManagerPolicy():
+
+class TestUpdateInstanceGroupManagerPolicy:
"""
Test Class for update_instance_group_manager_policy
"""
@@ -12444,11 +13660,13 @@ 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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupManagerPolicyPatch model
instance_group_manager_policy_patch_model = {}
@@ -12468,7 +13686,7 @@ def test_update_instance_group_manager_policy_all_params(self):
instance_group_manager_id,
id,
instance_group_manager_policy_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12495,11 +13713,13 @@ 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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupManagerPolicyPatch model
instance_group_manager_policy_patch_model = {}
@@ -12521,7 +13741,7 @@ def test_update_instance_group_manager_policy_value_error(self):
"instance_group_manager_policy_patch": instance_group_manager_policy_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_group_manager_policy(**req_copy)
@@ -12534,7 +13754,8 @@ def test_update_instance_group_manager_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_group_manager_policy_value_error()
-class TestDeleteInstanceGroupMemberships():
+
+class TestDeleteInstanceGroupMemberships:
"""
Test Class for delete_instance_group_memberships
"""
@@ -12546,9 +13767,11 @@ def test_delete_instance_group_memberships_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12556,7 +13779,7 @@ def test_delete_instance_group_memberships_all_params(self):
# Invoke method
response = _service.delete_instance_group_memberships(
instance_group_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12579,9 +13802,11 @@ def test_delete_instance_group_memberships_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12591,7 +13816,7 @@ def test_delete_instance_group_memberships_value_error(self):
"instance_group_id": instance_group_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group_memberships(**req_copy)
@@ -12604,7 +13829,8 @@ def test_delete_instance_group_memberships_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_memberships_value_error()
-class TestListInstanceGroupMemberships():
+
+class TestListInstanceGroupMemberships:
"""
Test Class for list_instance_group_memberships
"""
@@ -12617,11 +13843,13 @@ def test_list_instance_group_memberships_all_params(self):
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12633,14 +13861,14 @@ def test_list_instance_group_memberships_all_params(self):
instance_group_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -12662,11 +13890,13 @@ def test_list_instance_group_memberships_required_params(self):
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12674,7 +13904,7 @@ def test_list_instance_group_memberships_required_params(self):
# Invoke method
response = _service.list_instance_group_memberships(
instance_group_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12698,11 +13928,13 @@ def test_list_instance_group_memberships_value_error(self):
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20"}, "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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::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": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12712,7 +13944,7 @@ def test_list_instance_group_memberships_value_error(self):
"instance_group_id": instance_group_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_instance_group_memberships(**req_copy)
@@ -12734,16 +13966,20 @@ def test_list_instance_group_memberships_with_pager_get_next(self):
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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"name":"my-instance-group-membership","pool_member":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -12767,16 +14003,20 @@ def test_list_instance_group_memberships_with_pager_get_all(self):
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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"instance_template":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"a6b1a881-2ce8-41a3-80fc-36316a73f803","name":"my-instance-template"},"name":"my-instance-group-membership","pool_member":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004","id":"70294e14-4e61-11e8-bcf4-0242ac110004"},"status":"deleting","updated_at":"2019-01-01T12:00:00.000Z"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = InstanceGroupMembershipsPager(
@@ -12788,7 +14028,8 @@ def test_list_instance_group_memberships_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestDeleteInstanceGroupMembership():
+
+class TestDeleteInstanceGroupMembership:
"""
Test Class for delete_instance_group_membership
"""
@@ -12800,9 +14041,11 @@ def test_delete_instance_group_membership_all_params(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12812,7 +14055,7 @@ def test_delete_instance_group_membership_all_params(self):
response = _service.delete_instance_group_membership(
instance_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12835,9 +14078,11 @@ def test_delete_instance_group_membership_value_error(self):
"""
# Set up mock
url = preprocess_url('/instance_groups/testString/memberships/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12849,7 +14094,7 @@ def test_delete_instance_group_membership_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_instance_group_membership(**req_copy)
@@ -12862,7 +14107,8 @@ def test_delete_instance_group_membership_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_instance_group_membership_value_error()
-class TestGetInstanceGroupMembership():
+
+class TestGetInstanceGroupMembership:
"""
Test Class for get_instance_group_membership
"""
@@ -12875,11 +14121,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12889,7 +14137,7 @@ def test_get_instance_group_membership_all_params(self):
response = _service.get_instance_group_membership(
instance_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -12913,11 +14161,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
instance_group_id = 'testString'
@@ -12929,7 +14179,7 @@ def test_get_instance_group_membership_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_instance_group_membership(**req_copy)
@@ -12942,7 +14192,8 @@ def test_get_instance_group_membership_value_error_with_retries(self):
_service.disable_retries()
self.test_get_instance_group_membership_value_error()
-class TestUpdateInstanceGroupMembership():
+
+class TestUpdateInstanceGroupMembership:
"""
Test Class for update_instance_group_membership
"""
@@ -12955,11 +14206,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupMembershipPatch model
instance_group_membership_patch_model = {}
@@ -12975,7 +14228,7 @@ def test_update_instance_group_membership_all_params(self):
instance_group_id,
id,
instance_group_membership_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -13002,11 +14255,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "instance_template": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-instance-template"}, "name": "my-instance-group-membership", "pool_member": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}, "status": "deleting", "updated_at": "2019-01-01T12:00:00.000Z"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a InstanceGroupMembershipPatch model
instance_group_membership_patch_model = {}
@@ -13024,7 +14279,7 @@ def test_update_instance_group_membership_value_error(self):
"instance_group_membership_patch": instance_group_membership_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_instance_group_membership(**req_copy)
@@ -13037,6 +14292,7 @@ def test_update_instance_group_membership_value_error_with_retries(self):
_service.disable_retries()
self.test_update_instance_group_membership_value_error()
+
# endregion
##############################################################################
# End of Service: InstanceGroups
@@ -13047,7 +14303,8 @@ def test_update_instance_group_membership_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -13092,7 +14349,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListDedicatedHostGroups():
+
+class TestListDedicatedHostGroups:
"""
Test Class for list_dedicated_host_groups
"""
@@ -13105,11 +14363,13 @@ def test_list_dedicated_host_groups_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -13125,14 +14385,14 @@ def test_list_dedicated_host_groups_all_params(self):
resource_group_id=resource_group_id,
zone_name=zone_name,
name=name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -13157,16 +14417,17 @@ def test_list_dedicated_host_groups_required_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_dedicated_host_groups()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -13188,17 +14449,19 @@ def test_list_dedicated_host_groups_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20"}, "groups": [{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_dedicated_host_groups(**req_copy)
@@ -13220,16 +14483,20 @@ def test_list_dedicated_host_groups_with_pager_get_next(self):
url = preprocess_url('/dedicated_host/groups')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"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,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"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_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -13255,16 +14522,20 @@ def test_list_dedicated_host_groups_with_pager_get_all(self):
url = preprocess_url('/dedicated_host/groups')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"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,"groups":[{"class":"mx2","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","dedicated_hosts":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-host","resource_type":"dedicated_host"}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host_group","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"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_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = DedicatedHostGroupsPager(
@@ -13278,7 +14549,8 @@ def test_list_dedicated_host_groups_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateDedicatedHostGroup():
+
+class TestCreateDedicatedHostGroup:
"""
Test Class for create_dedicated_host_group
"""
@@ -13291,11 +14563,13 @@ def test_create_dedicated_host_group_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups')
mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -13314,12 +14588,12 @@ def test_create_dedicated_host_group_all_params(self):
# Invoke method
response = _service.create_dedicated_host_group(
- class_=class_,
- family=family,
- zone=zone,
+ class_,
+ family,
+ zone,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -13343,55 +14617,44 @@ def test_create_dedicated_host_group_all_params_with_retries(self):
self.test_create_dedicated_host_group_all_params()
@responses.activate
- def test_create_dedicated_host_group_required_params(self):
+ def test_create_dedicated_host_group_value_error(self):
"""
- test_create_dedicated_host_group_required_params()
+ test_create_dedicated_host_group_value_error()
"""
# Set up mock
url = preprocess_url('/dedicated_host/groups')
mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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)
-
- # Invoke method
- response = _service.create_dedicated_host_group()
-
-
- # Check for correct operation
- assert len(responses.calls) == 1
- assert response.status_code == 201
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
- def test_create_dedicated_host_group_required_params_with_retries(self):
- # Enable retries and run test_create_dedicated_host_group_required_params.
- _service.enable_retries()
- self.test_create_dedicated_host_group_required_params()
+ # Construct a dict representation of a ZoneIdentityByName model
+ zone_identity_model = {}
+ zone_identity_model['name'] = 'us-south-1'
- # Disable retries and run test_create_dedicated_host_group_required_params.
- _service.disable_retries()
- self.test_create_dedicated_host_group_required_params()
+ # Construct a dict representation of a ResourceGroupIdentityById model
+ resource_group_identity_model = {}
+ resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- @responses.activate
- def test_create_dedicated_host_group_value_error(self):
- """
- test_create_dedicated_host_group_value_error()
- """
- # Set up mock
- url = preprocess_url('/dedicated_host/groups')
- mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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
+ class_ = 'mx2'
+ family = 'balanced'
+ zone = zone_identity_model
+ name = 'testString'
+ resource_group = resource_group_identity_model
# Pass in all but one required param and check for a ValueError
req_param_dict = {
+ "class_": class_,
+ "family": family,
+ "zone": zone,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_dedicated_host_group(**req_copy)
@@ -13404,7 +14667,8 @@ def test_create_dedicated_host_group_value_error_with_retries(self):
_service.disable_retries()
self.test_create_dedicated_host_group_value_error()
-class TestDeleteDedicatedHostGroup():
+
+class TestDeleteDedicatedHostGroup:
"""
Test Class for delete_dedicated_host_group
"""
@@ -13416,9 +14680,11 @@ def test_delete_dedicated_host_group_all_params(self):
"""
# Set up mock
url = preprocess_url('/dedicated_host/groups/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -13426,7 +14692,7 @@ def test_delete_dedicated_host_group_all_params(self):
# Invoke method
response = _service.delete_dedicated_host_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -13449,9 +14715,11 @@ def test_delete_dedicated_host_group_value_error(self):
"""
# Set up mock
url = preprocess_url('/dedicated_host/groups/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -13461,7 +14729,7 @@ def test_delete_dedicated_host_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_dedicated_host_group(**req_copy)
@@ -13474,7 +14742,8 @@ def test_delete_dedicated_host_group_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_dedicated_host_group_value_error()
-class TestGetDedicatedHostGroup():
+
+class TestGetDedicatedHostGroup:
"""
Test Class for get_dedicated_host_group
"""
@@ -13487,11 +14756,13 @@ def test_get_dedicated_host_group_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups/testString')
mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -13499,7 +14770,7 @@ def test_get_dedicated_host_group_all_params(self):
# Invoke method
response = _service.get_dedicated_host_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -13523,11 +14794,13 @@ def test_get_dedicated_host_group_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups/testString')
mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -13537,7 +14810,7 @@ def test_get_dedicated_host_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_dedicated_host_group(**req_copy)
@@ -13550,7 +14823,8 @@ def test_get_dedicated_host_group_value_error_with_retries(self):
_service.disable_retries()
self.test_get_dedicated_host_group_value_error()
-class TestUpdateDedicatedHostGroup():
+
+class TestUpdateDedicatedHostGroup:
"""
Test Class for update_dedicated_host_group
"""
@@ -13563,11 +14837,13 @@ def test_update_dedicated_host_group_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups/testString')
mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DedicatedHostGroupPatch model
dedicated_host_group_patch_model = {}
@@ -13581,7 +14857,7 @@ def test_update_dedicated_host_group_all_params(self):
response = _service.update_dedicated_host_group(
id,
dedicated_host_group_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -13608,11 +14884,13 @@ def test_update_dedicated_host_group_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_host/groups/testString')
mock_response = '{"class": "mx2", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "dedicated_hosts": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host: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/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-host", "resource_type": "dedicated_host"}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host_group", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "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)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DedicatedHostGroupPatch model
dedicated_host_group_patch_model = {}
@@ -13628,7 +14906,7 @@ def test_update_dedicated_host_group_value_error(self):
"dedicated_host_group_patch": dedicated_host_group_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_dedicated_host_group(**req_copy)
@@ -13641,7 +14919,8 @@ def test_update_dedicated_host_group_value_error_with_retries(self):
_service.disable_retries()
self.test_update_dedicated_host_group_value_error()
-class TestListDedicatedHostProfiles():
+
+class TestListDedicatedHostProfiles:
"""
Test Class for list_dedicated_host_profiles
"""
@@ -13654,11 +14933,13 @@ def test_list_dedicated_host_profiles_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -13668,14 +14949,14 @@ def test_list_dedicated_host_profiles_all_params(self):
response = _service.list_dedicated_host_profiles(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -13697,16 +14978,17 @@ def test_list_dedicated_host_profiles_required_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_dedicated_host_profiles()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -13728,17 +15010,19 @@ def test_list_dedicated_host_profiles_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_host/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20"}, "profiles": [{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_dedicated_host_profiles(**req_copy)
@@ -13760,16 +15044,20 @@ def test_list_dedicated_host_profiles_with_pager_get_next(self):
url = preprocess_url('/dedicated_host/profiles')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}'
mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}'
- 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)
+ 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 = []
@@ -13792,16 +15080,20 @@ def test_list_dedicated_host_profiles_with_pager_get_all(self):
url = preprocess_url('/dedicated_host/profiles')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}'
mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"class":"mx2","disks":[{"interface_type":{"type":"fixed","value":"nvme"},"quantity":{"type":"fixed","value":4},"size":{"type":"fixed","value":3200},"supported_instance_interface_types":{"type":"fixed","value":["nvme"]}}],"family":"balanced","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","memory":{"type":"fixed","value":16},"name":"mx2-host-152x1216","socket_count":{"type":"fixed","value":2},"supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu_architecture":{"type":"fixed","value":"amd64"},"vcpu_count":{"type":"fixed","value":16},"vcpu_manufacturer":{"type":"fixed","value":"intel"}}]}'
- 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)
+ 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 = DedicatedHostProfilesPager(
@@ -13812,7 +15104,8 @@ def test_list_dedicated_host_profiles_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetDedicatedHostProfile():
+
+class TestGetDedicatedHostProfile:
"""
Test Class for get_dedicated_host_profile
"""
@@ -13825,11 +15118,13 @@ def test_get_dedicated_host_profile_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_host/profiles/testString')
mock_response = '{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -13837,7 +15132,7 @@ def test_get_dedicated_host_profile_all_params(self):
# Invoke method
response = _service.get_dedicated_host_profile(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -13861,11 +15156,13 @@ def test_get_dedicated_host_profile_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_host/profiles/testString')
mock_response = '{"class": "mx2", "disks": [{"interface_type": {"type": "fixed", "value": "nvme"}, "quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 3200}, "supported_instance_interface_types": {"type": "fixed", "value": ["nvme"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": {"type": "fixed", "value": 16}, "name": "mx2-host-152x1216", "socket_count": {"type": "fixed", "value": 2}, "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu_architecture": {"type": "fixed", "value": "amd64"}, "vcpu_count": {"type": "fixed", "value": 16}, "vcpu_manufacturer": {"type": "fixed", "value": "intel"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -13875,7 +15172,7 @@ def test_get_dedicated_host_profile_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_dedicated_host_profile(**req_copy)
@@ -13888,7 +15185,8 @@ def test_get_dedicated_host_profile_value_error_with_retries(self):
_service.disable_retries()
self.test_get_dedicated_host_profile_value_error()
-class TestListDedicatedHosts():
+
+class TestListDedicatedHosts:
"""
Test Class for list_dedicated_hosts
"""
@@ -13901,11 +15199,13 @@ def test_list_dedicated_hosts_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts')
mock_response = '{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
dedicated_host_group_id = 'testString'
@@ -13923,14 +15223,14 @@ def test_list_dedicated_hosts_all_params(self):
resource_group_id=resource_group_id,
zone_name=zone_name,
name=name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'dedicated_host_group.id={}'.format(dedicated_host_group_id) in query_string
assert 'start={}'.format(start) in query_string
@@ -13956,16 +15256,17 @@ def test_list_dedicated_hosts_required_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts')
mock_response = '{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_dedicated_hosts()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -13987,17 +15288,19 @@ def test_list_dedicated_hosts_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts')
mock_response = '{"dedicated_hosts": [{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_dedicated_hosts(**req_copy)
@@ -14019,16 +15322,20 @@ def test_list_dedicated_hosts_with_pager_get_next(self):
url = preprocess_url('/dedicated_hosts')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"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 = '{"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"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)
+ 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 = []
@@ -14055,16 +15362,20 @@ def test_list_dedicated_hosts_with_pager_get_all(self):
url = preprocess_url('/dedicated_hosts')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"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 = '{"dedicated_hosts":[{"available_memory":128,"available_vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"available":9,"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","instance_disks":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-instance-disk","resource_type":"instance_disk"}],"interface_type":"nvme","lifecycle_state":"stable","name":"my-dedicated-host-disk","provisionable":false,"resource_type":"dedicated_host_disk","size":4,"supported_instance_interface_types":["nvme"]}],"group":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","id":"bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0","name":"my-host-group","resource_type":"dedicated_host_group"},"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","instance_placement_enabled":true,"instances":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"}],"lifecycle_state":"stable","memory":128,"name":"my-host","profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a","name":"mx2-host-152x1216"},"provisionable":false,"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"dedicated_host","socket_count":4,"state":"available","supported_instance_profiles":[{"href":"https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16","name":"bx2-4x16"}],"vcpu":{"architecture":"amd64","count":4,"manufacturer":"intel"},"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)
+ 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 = DedicatedHostsPager(
@@ -14079,7 +15390,8 @@ def test_list_dedicated_hosts_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateDedicatedHost():
+
+class TestCreateDedicatedHost:
"""
Test Class for create_dedicated_host
"""
@@ -14092,11 +15404,13 @@ def test_create_dedicated_host_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts')
mock_response = '{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "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)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a DedicatedHostProfileIdentityByName model
dedicated_host_profile_identity_model = {}
@@ -14124,7 +15438,7 @@ def test_create_dedicated_host_all_params(self):
# Invoke method
response = _service.create_dedicated_host(
dedicated_host_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14151,11 +15465,13 @@ def test_create_dedicated_host_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts')
mock_response = '{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "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)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a DedicatedHostProfileIdentityByName model
dedicated_host_profile_identity_model = {}
@@ -14185,7 +15501,7 @@ def test_create_dedicated_host_value_error(self):
"dedicated_host_prototype": dedicated_host_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_dedicated_host(**req_copy)
@@ -14198,7 +15514,8 @@ def test_create_dedicated_host_value_error_with_retries(self):
_service.disable_retries()
self.test_create_dedicated_host_value_error()
-class TestListDedicatedHostDisks():
+
+class TestListDedicatedHostDisks:
"""
Test Class for list_dedicated_host_disks
"""
@@ -14211,11 +15528,13 @@ def test_list_dedicated_host_disks_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString/disks')
mock_response = '{"disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
dedicated_host_id = 'testString'
@@ -14223,7 +15542,7 @@ def test_list_dedicated_host_disks_all_params(self):
# Invoke method
response = _service.list_dedicated_host_disks(
dedicated_host_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14247,11 +15566,13 @@ def test_list_dedicated_host_disks_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString/disks')
mock_response = '{"disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
dedicated_host_id = 'testString'
@@ -14261,7 +15582,7 @@ def test_list_dedicated_host_disks_value_error(self):
"dedicated_host_id": dedicated_host_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_dedicated_host_disks(**req_copy)
@@ -14274,7 +15595,8 @@ def test_list_dedicated_host_disks_value_error_with_retries(self):
_service.disable_retries()
self.test_list_dedicated_host_disks_value_error()
-class TestGetDedicatedHostDisk():
+
+class TestGetDedicatedHostDisk:
"""
Test Class for get_dedicated_host_disk
"""
@@ -14287,11 +15609,13 @@ def test_get_dedicated_host_disk_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString/disks/testString')
mock_response = '{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
dedicated_host_id = 'testString'
@@ -14301,7 +15625,7 @@ def test_get_dedicated_host_disk_all_params(self):
response = _service.get_dedicated_host_disk(
dedicated_host_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14325,11 +15649,13 @@ def test_get_dedicated_host_disk_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString/disks/testString')
mock_response = '{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
dedicated_host_id = 'testString'
@@ -14341,7 +15667,7 @@ def test_get_dedicated_host_disk_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_dedicated_host_disk(**req_copy)
@@ -14354,7 +15680,8 @@ def test_get_dedicated_host_disk_value_error_with_retries(self):
_service.disable_retries()
self.test_get_dedicated_host_disk_value_error()
-class TestUpdateDedicatedHostDisk():
+
+class TestUpdateDedicatedHostDisk:
"""
Test Class for update_dedicated_host_disk
"""
@@ -14367,11 +15694,13 @@ def test_update_dedicated_host_disk_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString/disks/testString')
mock_response = '{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DedicatedHostDiskPatch model
dedicated_host_disk_patch_model = {}
@@ -14387,7 +15716,7 @@ def test_update_dedicated_host_disk_all_params(self):
dedicated_host_id,
id,
dedicated_host_disk_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14414,11 +15743,13 @@ def test_update_dedicated_host_disk_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString/disks/testString')
mock_response = '{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DedicatedHostDiskPatch model
dedicated_host_disk_patch_model = {}
@@ -14436,7 +15767,7 @@ def test_update_dedicated_host_disk_value_error(self):
"dedicated_host_disk_patch": dedicated_host_disk_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_dedicated_host_disk(**req_copy)
@@ -14449,7 +15780,8 @@ def test_update_dedicated_host_disk_value_error_with_retries(self):
_service.disable_retries()
self.test_update_dedicated_host_disk_value_error()
-class TestDeleteDedicatedHost():
+
+class TestDeleteDedicatedHost:
"""
Test Class for delete_dedicated_host
"""
@@ -14461,9 +15793,11 @@ def test_delete_dedicated_host_all_params(self):
"""
# Set up mock
url = preprocess_url('/dedicated_hosts/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -14471,7 +15805,7 @@ def test_delete_dedicated_host_all_params(self):
# Invoke method
response = _service.delete_dedicated_host(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14494,9 +15828,11 @@ def test_delete_dedicated_host_value_error(self):
"""
# Set up mock
url = preprocess_url('/dedicated_hosts/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -14506,7 +15842,7 @@ def test_delete_dedicated_host_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_dedicated_host(**req_copy)
@@ -14519,7 +15855,8 @@ def test_delete_dedicated_host_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_dedicated_host_value_error()
-class TestGetDedicatedHost():
+
+class TestGetDedicatedHost:
"""
Test Class for get_dedicated_host
"""
@@ -14532,11 +15869,13 @@ def test_get_dedicated_host_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString')
mock_response = '{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "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)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -14544,7 +15883,7 @@ def test_get_dedicated_host_all_params(self):
# Invoke method
response = _service.get_dedicated_host(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14568,11 +15907,13 @@ def test_get_dedicated_host_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString')
mock_response = '{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "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)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -14582,7 +15923,7 @@ def test_get_dedicated_host_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_dedicated_host(**req_copy)
@@ -14595,7 +15936,8 @@ def test_get_dedicated_host_value_error_with_retries(self):
_service.disable_retries()
self.test_get_dedicated_host_value_error()
-class TestUpdateDedicatedHost():
+
+class TestUpdateDedicatedHost:
"""
Test Class for update_dedicated_host
"""
@@ -14608,11 +15950,13 @@ def test_update_dedicated_host_all_params(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString')
mock_response = '{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "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)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DedicatedHostPatch model
dedicated_host_patch_model = {}
@@ -14627,7 +15971,7 @@ def test_update_dedicated_host_all_params(self):
response = _service.update_dedicated_host(
id,
dedicated_host_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -14654,11 +15998,13 @@ def test_update_dedicated_host_value_error(self):
# Set up mock
url = preprocess_url('/dedicated_hosts/testString')
mock_response = '{"available_memory": 128, "available_vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"available": 9, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "instance_disks": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-instance-disk", "resource_type": "instance_disk"}], "interface_type": "nvme", "lifecycle_state": "stable", "name": "my-dedicated-host-disk", "provisionable": false, "resource_type": "dedicated_host_disk", "size": 4, "supported_instance_interface_types": ["nvme"]}], "group": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "id": "bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0", "name": "my-host-group", "resource_type": "dedicated_host_group"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "instance_placement_enabled": true, "instances": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}], "lifecycle_state": "stable", "memory": 128, "name": "my-host", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "mx2-host-152x1216"}, "provisionable": false, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "dedicated_host", "socket_count": 4, "state": "available", "supported_instance_profiles": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16", "name": "bx2-4x16"}], "vcpu": {"architecture": "amd64", "count": 4, "manufacturer": "intel"}, "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)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DedicatedHostPatch model
dedicated_host_patch_model = {}
@@ -14675,7 +16021,7 @@ def test_update_dedicated_host_value_error(self):
"dedicated_host_patch": dedicated_host_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_dedicated_host(**req_copy)
@@ -14688,6 +16034,7 @@ def test_update_dedicated_host_value_error_with_retries(self):
_service.disable_retries()
self.test_update_dedicated_host_value_error()
+
# endregion
##############################################################################
# End of Service: DedicatedHosts
@@ -14698,7 +16045,8 @@ def test_update_dedicated_host_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -14743,7 +16091,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListBackupPolicies():
+
+class TestListBackupPolicies:
"""
Test Class for list_backup_policies
"""
@@ -14756,11 +16105,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -14776,14 +16127,14 @@ def test_list_backup_policies_all_params(self):
resource_group_id=resource_group_id,
name=name,
tag=tag,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -14808,16 +16159,17 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_backup_policies()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -14839,17 +16191,19 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_backup_policies(**req_copy)
@@ -14871,16 +16225,20 @@ def test_list_backup_policies_with_pager_get_next(self):
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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","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_resource_types":["volume"],"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","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"}],"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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","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_resource_types":["volume"],"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","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"}],"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)
+ 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 = []
@@ -14906,16 +16264,20 @@ def test_list_backup_policies_with_pager_get_all(self):
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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","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_resource_types":["volume"],"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","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"}],"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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6","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_resource_types":["volume"],"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","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"}],"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)
+ 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 = BackupPoliciesPager(
@@ -14929,7 +16291,8 @@ def test_list_backup_policies_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateBackupPolicy():
+
+class TestCreateBackupPolicy:
"""
Test Class for create_backup_policy
"""
@@ -14942,11 +16305,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -14985,12 +16350,12 @@ def test_create_backup_policy_all_params(self):
# Invoke method
response = _service.create_backup_policy(
- match_user_tags=match_user_tags,
+ match_user_tags,
match_resource_types=match_resource_types,
name=name,
plans=plans,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15014,55 +16379,62 @@ def test_create_backup_policy_all_params_with_retries(self):
self.test_create_backup_policy_all_params()
@responses.activate
- def test_create_backup_policy_required_params(self):
+ def test_create_backup_policy_value_error(self):
"""
- test_create_backup_policy_required_params()
+ test_create_backup_policy_value_error()
"""
# 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
- # Invoke method
- response = _service.create_backup_policy()
+ # Construct a dict representation of a ZoneIdentityByName model
+ zone_identity_model = {}
+ zone_identity_model['name'] = 'us-south-1'
+ # Construct a dict representation of a BackupPolicyPlanClonePolicyPrototype model
+ backup_policy_plan_clone_policy_prototype_model = {}
+ backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 1
+ backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model]
- # Check for correct operation
- assert len(responses.calls) == 1
- assert response.status_code == 201
+ # Construct a dict representation of a BackupPolicyPlanDeletionTriggerPrototype model
+ backup_policy_plan_deletion_trigger_prototype_model = {}
+ backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20
+ backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20
- def test_create_backup_policy_required_params_with_retries(self):
- # Enable retries and run test_create_backup_policy_required_params.
- _service.enable_retries()
- self.test_create_backup_policy_required_params()
+ # Construct a dict representation of a BackupPolicyPlanPrototype model
+ backup_policy_plan_prototype_model = {}
+ backup_policy_plan_prototype_model['active'] = True
+ backup_policy_plan_prototype_model['attach_user_tags'] = ['my-daily-backup-plan']
+ backup_policy_plan_prototype_model['clone_policy'] = backup_policy_plan_clone_policy_prototype_model
+ backup_policy_plan_prototype_model['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'
- # Disable retries and run test_create_backup_policy_required_params.
- _service.disable_retries()
- self.test_create_backup_policy_required_params()
+ # Construct a dict representation of a ResourceGroupIdentityById model
+ resource_group_identity_model = {}
+ resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- @responses.activate
- def test_create_backup_policy_value_error(self):
- """
- test_create_backup_policy_value_error()
- """
- # 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ # Set up parameter values
+ match_user_tags = ['my-daily-backup-policy']
+ match_resource_types = ['volume']
+ name = 'my-backup-policy'
+ plans = [backup_policy_plan_prototype_model]
+ resource_group = resource_group_identity_model
# Pass in all but one required param and check for a ValueError
req_param_dict = {
+ "match_user_tags": match_user_tags,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_backup_policy(**req_copy)
@@ -15075,7 +16447,8 @@ def test_create_backup_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_create_backup_policy_value_error()
-class TestListBackupPolicyJobs():
+
+class TestListBackupPolicyJobs:
"""
Test Class for list_backup_policy_jobs
"""
@@ -15088,11 +16461,13 @@ def test_list_backup_policy_jobs_all_params(self):
# Set up mock
url = preprocess_url('/backup_policies/testString/jobs')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "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", "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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15116,14 +16491,14 @@ def test_list_backup_policy_jobs_all_params(self):
source_id=source_id,
target_snapshots_id=target_snapshots_id,
target_snapshots_crn=target_snapshots_crn,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'status={}'.format(status) in query_string
assert 'backup_policy_plan.id={}'.format(backup_policy_plan_id) in query_string
@@ -15151,11 +16526,13 @@ def test_list_backup_policy_jobs_required_params(self):
# Set up mock
url = preprocess_url('/backup_policies/testString/jobs')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "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", "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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15163,7 +16540,7 @@ def test_list_backup_policy_jobs_required_params(self):
# Invoke method
response = _service.list_backup_policy_jobs(
backup_policy_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15187,11 +16564,13 @@ def test_list_backup_policy_jobs_value_error(self):
# Set up mock
url = preprocess_url('/backup_policies/testString/jobs')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20"}, "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", "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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}]}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15201,7 +16580,7 @@ def test_list_backup_policy_jobs_value_error(self):
"backup_policy_id": backup_policy_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_backup_policy_jobs(**req_copy)
@@ -15223,16 +16602,20 @@ def test_list_backup_policy_jobs_with_pager_get_next(self):
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","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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","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","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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","resource_type":"snapshot"}]}],"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)
+ 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 = []
@@ -15262,16 +16645,20 @@ def test_list_backup_policy_jobs_with_pager_get_all(self):
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","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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","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","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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"status":"failed","status_reasons":[{"code":"source_volume_busy","message":"message","more_info":"https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}],"target_snapshots":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","resource_type":"snapshot"}]}],"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)
+ 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 = BackupPolicyJobsPager(
@@ -15289,7 +16676,8 @@ def test_list_backup_policy_jobs_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetBackupPolicyJob():
+
+class TestGetBackupPolicyJob:
"""
Test Class for get_backup_policy_job
"""
@@ -15302,11 +16690,13 @@ 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", "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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15316,7 +16706,7 @@ def test_get_backup_policy_job_all_params(self):
response = _service.get_backup_policy_job(
backup_policy_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15340,11 +16730,13 @@ 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", "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/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "status": "failed", "status_reasons": [{"code": "source_volume_busy", "message": "message", "more_info": "https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc"}], "target_snapshots": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15356,7 +16748,7 @@ def test_get_backup_policy_job_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_backup_policy_job(**req_copy)
@@ -15369,7 +16761,8 @@ def test_get_backup_policy_job_value_error_with_retries(self):
_service.disable_retries()
self.test_get_backup_policy_job_value_error()
-class TestListBackupPolicyPlans():
+
+class TestListBackupPolicyPlans:
"""
Test Class for list_backup_policy_plans
"""
@@ -15382,11 +16775,13 @@ def test_list_backup_policy_plans_all_params(self):
# Set up mock
url = preprocess_url('/backup_policies/testString/plans')
mock_response = '{"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", "resource_type": "backup_policy_plan"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15396,14 +16791,14 @@ def test_list_backup_policy_plans_all_params(self):
response = _service.list_backup_policy_plans(
backup_policy_id,
name=name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'name={}'.format(name) in query_string
@@ -15424,11 +16819,13 @@ def test_list_backup_policy_plans_required_params(self):
# Set up mock
url = preprocess_url('/backup_policies/testString/plans')
mock_response = '{"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", "resource_type": "backup_policy_plan"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15436,7 +16833,7 @@ def test_list_backup_policy_plans_required_params(self):
# Invoke method
response = _service.list_backup_policy_plans(
backup_policy_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15460,11 +16857,13 @@ def test_list_backup_policy_plans_value_error(self):
# Set up mock
url = preprocess_url('/backup_policies/testString/plans')
mock_response = '{"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", "resource_type": "backup_policy_plan"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15474,7 +16873,7 @@ def test_list_backup_policy_plans_value_error(self):
"backup_policy_id": backup_policy_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_backup_policy_plans(**req_copy)
@@ -15487,7 +16886,8 @@ def test_list_backup_policy_plans_value_error_with_retries(self):
_service.disable_retries()
self.test_list_backup_policy_plans_value_error()
-class TestCreateBackupPolicyPlan():
+
+class TestCreateBackupPolicyPlan:
"""
Test Class for create_backup_policy_plan
"""
@@ -15500,11 +16900,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -15540,7 +16942,7 @@ def test_create_backup_policy_plan_all_params(self):
copy_user_tags=copy_user_tags,
deletion_trigger=deletion_trigger,
name=name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15573,11 +16975,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -15609,7 +17013,7 @@ def test_create_backup_policy_plan_value_error(self):
"cron_spec": cron_spec,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_backup_policy_plan(**req_copy)
@@ -15622,7 +17026,8 @@ def test_create_backup_policy_plan_value_error_with_retries(self):
_service.disable_retries()
self.test_create_backup_policy_plan_value_error()
-class TestDeleteBackupPolicyPlan():
+
+class TestDeleteBackupPolicyPlan:
"""
Test Class for delete_backup_policy_plan
"""
@@ -15635,11 +17040,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.DELETE,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15651,7 +17058,7 @@ def test_delete_backup_policy_plan_all_params(self):
backup_policy_id,
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15675,11 +17082,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.DELETE,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15689,7 +17098,7 @@ def test_delete_backup_policy_plan_required_params(self):
response = _service.delete_backup_policy_plan(
backup_policy_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15713,11 +17122,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.DELETE,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15729,7 +17140,7 @@ def test_delete_backup_policy_plan_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_backup_policy_plan(**req_copy)
@@ -15742,7 +17153,8 @@ def test_delete_backup_policy_plan_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_backup_policy_plan_value_error()
-class TestGetBackupPolicyPlan():
+
+class TestGetBackupPolicyPlan:
"""
Test Class for get_backup_policy_plan
"""
@@ -15755,11 +17167,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15769,7 +17183,7 @@ def test_get_backup_policy_plan_all_params(self):
response = _service.get_backup_policy_plan(
backup_policy_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15793,11 +17207,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
backup_policy_id = 'testString'
@@ -15809,7 +17225,7 @@ def test_get_backup_policy_plan_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_backup_policy_plan(**req_copy)
@@ -15822,7 +17238,8 @@ def test_get_backup_policy_plan_value_error_with_retries(self):
_service.disable_retries()
self.test_get_backup_policy_plan_value_error()
-class TestUpdateBackupPolicyPlan():
+
+class TestUpdateBackupPolicyPlan:
"""
Test Class for update_backup_policy_plan
"""
@@ -15835,11 +17252,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -15877,7 +17296,7 @@ def test_update_backup_policy_plan_all_params(self):
id,
backup_policy_plan_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15904,11 +17323,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -15944,7 +17365,7 @@ def test_update_backup_policy_plan_required_params(self):
backup_policy_id,
id,
backup_policy_plan_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -15971,11 +17392,13 @@ 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", "resource_type": "backup_policy_plan"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -16013,7 +17436,7 @@ def test_update_backup_policy_plan_value_error(self):
"backup_policy_plan_patch": backup_policy_plan_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_backup_policy_plan(**req_copy)
@@ -16026,7 +17449,8 @@ def test_update_backup_policy_plan_value_error_with_retries(self):
_service.disable_retries()
self.test_update_backup_policy_plan_value_error()
-class TestDeleteBackupPolicy():
+
+class TestDeleteBackupPolicy:
"""
Test Class for delete_backup_policy
"""
@@ -16039,11 +17463,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.DELETE,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -16053,7 +17479,7 @@ def test_delete_backup_policy_all_params(self):
response = _service.delete_backup_policy(
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16077,11 +17503,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.DELETE,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -16089,7 +17517,7 @@ def test_delete_backup_policy_required_params(self):
# Invoke method
response = _service.delete_backup_policy(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16113,11 +17541,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.DELETE,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -16127,7 +17557,7 @@ def test_delete_backup_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_backup_policy(**req_copy)
@@ -16140,7 +17570,8 @@ def test_delete_backup_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_backup_policy_value_error()
-class TestGetBackupPolicy():
+
+class TestGetBackupPolicy:
"""
Test Class for get_backup_policy
"""
@@ -16153,11 +17584,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -16165,7 +17598,7 @@ def test_get_backup_policy_all_params(self):
# Invoke method
response = _service.get_backup_policy(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16189,11 +17622,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -16203,7 +17638,7 @@ def test_get_backup_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_backup_policy(**req_copy)
@@ -16216,7 +17651,8 @@ def test_get_backup_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_get_backup_policy_value_error()
-class TestUpdateBackupPolicy():
+
+class TestUpdateBackupPolicy:
"""
Test Class for update_backup_policy
"""
@@ -16229,11 +17665,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BackupPolicyPatch model
backup_policy_patch_model = {}
@@ -16250,7 +17688,7 @@ def test_update_backup_policy_all_params(self):
id,
backup_policy_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16277,11 +17715,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BackupPolicyPatch model
backup_policy_patch_model = {}
@@ -16296,7 +17736,7 @@ def test_update_backup_policy_required_params(self):
response = _service.update_backup_policy(
id,
backup_policy_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16323,11 +17763,13 @@ 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/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6", "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_resource_types": ["volume"], "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", "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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BackupPolicyPatch model
backup_policy_patch_model = {}
@@ -16344,7 +17786,7 @@ def test_update_backup_policy_value_error(self):
"backup_policy_patch": backup_policy_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_backup_policy(**req_copy)
@@ -16357,6 +17799,7 @@ def test_update_backup_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_update_backup_policy_value_error()
+
# endregion
##############################################################################
# End of Service: BackupPolicies
@@ -16367,7 +17810,8 @@ def test_update_backup_policy_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -16412,7 +17856,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListPlacementGroups():
+
+class TestListPlacementGroups:
"""
Test Class for list_placement_groups
"""
@@ -16425,11 +17870,13 @@ def test_list_placement_groups_all_params(self):
# Set up mock
url = preprocess_url('/placement_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -16439,14 +17886,14 @@ def test_list_placement_groups_all_params(self):
response = _service.list_placement_groups(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -16468,16 +17915,17 @@ def test_list_placement_groups_required_params(self):
# Set up mock
url = preprocess_url('/placement_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_placement_groups()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -16499,17 +17947,19 @@ def test_list_placement_groups_value_error(self):
# Set up mock
url = preprocess_url('/placement_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "placement_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_placement_groups(**req_copy)
@@ -16531,16 +17981,20 @@ def test_list_placement_groups_with_pager_get_next(self):
url = preprocess_url('/placement_groups')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}'
mock_response2 = '{"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}'
- 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)
+ 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 = []
@@ -16563,16 +18017,20 @@ def test_list_placement_groups_with_pager_get_all(self):
url = preprocess_url('/placement_groups')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}'
mock_response2 = '{"total_count":2,"limit":1,"placement_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871","href":"https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871","id":"r018-418fe842-a3e9-47b9-a938-1aa5bd632871","lifecycle_state":"stable","name":"my-placement-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"placement_group","strategy":"host_spread"}]}'
- 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)
+ 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 = PlacementGroupsPager(
@@ -16583,7 +18041,8 @@ def test_list_placement_groups_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreatePlacementGroup():
+
+class TestCreatePlacementGroup:
"""
Test Class for create_placement_group
"""
@@ -16596,11 +18055,13 @@ def test_create_placement_group_all_params(self):
# Set up mock
url = preprocess_url('/placement_groups')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -16616,7 +18077,7 @@ def test_create_placement_group_all_params(self):
strategy,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16645,11 +18106,13 @@ def test_create_placement_group_value_error(self):
# Set up mock
url = preprocess_url('/placement_groups')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -16665,7 +18128,7 @@ def test_create_placement_group_value_error(self):
"strategy": strategy,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_placement_group(**req_copy)
@@ -16678,7 +18141,8 @@ def test_create_placement_group_value_error_with_retries(self):
_service.disable_retries()
self.test_create_placement_group_value_error()
-class TestDeletePlacementGroup():
+
+class TestDeletePlacementGroup:
"""
Test Class for delete_placement_group
"""
@@ -16690,9 +18154,11 @@ def test_delete_placement_group_all_params(self):
"""
# Set up mock
url = preprocess_url('/placement_groups/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -16700,7 +18166,7 @@ def test_delete_placement_group_all_params(self):
# Invoke method
response = _service.delete_placement_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16723,9 +18189,11 @@ def test_delete_placement_group_value_error(self):
"""
# Set up mock
url = preprocess_url('/placement_groups/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -16735,7 +18203,7 @@ def test_delete_placement_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_placement_group(**req_copy)
@@ -16748,7 +18216,8 @@ def test_delete_placement_group_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_placement_group_value_error()
-class TestGetPlacementGroup():
+
+class TestGetPlacementGroup:
"""
Test Class for get_placement_group
"""
@@ -16761,11 +18230,13 @@ def test_get_placement_group_all_params(self):
# Set up mock
url = preprocess_url('/placement_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -16773,7 +18244,7 @@ def test_get_placement_group_all_params(self):
# Invoke method
response = _service.get_placement_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16797,11 +18268,13 @@ def test_get_placement_group_value_error(self):
# Set up mock
url = preprocess_url('/placement_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -16811,7 +18284,7 @@ def test_get_placement_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_placement_group(**req_copy)
@@ -16824,7 +18297,8 @@ def test_get_placement_group_value_error_with_retries(self):
_service.disable_retries()
self.test_get_placement_group_value_error()
-class TestUpdatePlacementGroup():
+
+class TestUpdatePlacementGroup:
"""
Test Class for update_placement_group
"""
@@ -16837,11 +18311,13 @@ def test_update_placement_group_all_params(self):
# Set up mock
url = preprocess_url('/placement_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a PlacementGroupPatch model
placement_group_patch_model = {}
@@ -16855,7 +18331,7 @@ def test_update_placement_group_all_params(self):
response = _service.update_placement_group(
id,
placement_group_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -16882,11 +18358,13 @@ def test_update_placement_group_value_error(self):
# Set up mock
url = preprocess_url('/placement_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::placement-group:r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "href": "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "id": "r018-418fe842-a3e9-47b9-a938-1aa5bd632871", "lifecycle_state": "stable", "name": "my-placement-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "placement_group", "strategy": "host_spread"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a PlacementGroupPatch model
placement_group_patch_model = {}
@@ -16902,7 +18380,7 @@ def test_update_placement_group_value_error(self):
"placement_group_patch": placement_group_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_placement_group(**req_copy)
@@ -16915,6 +18393,7 @@ def test_update_placement_group_value_error_with_retries(self):
_service.disable_retries()
self.test_update_placement_group_value_error()
+
# endregion
##############################################################################
# End of Service: PlacementGroups
@@ -16925,7 +18404,8 @@ def test_update_placement_group_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -16970,7 +18450,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListBareMetalServerProfiles():
+
+class TestListBareMetalServerProfiles:
"""
Test Class for list_bare_metal_server_profiles
"""
@@ -16982,12 +18463,14 @@ def test_list_bare_metal_server_profiles_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_server/profiles')
- mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "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", "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}], "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -16997,14 +18480,14 @@ def test_list_bare_metal_server_profiles_all_params(self):
response = _service.list_bare_metal_server_profiles(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -17025,17 +18508,18 @@ def test_list_bare_metal_server_profiles_required_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_server/profiles')
- mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "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", "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}], "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_bare_metal_server_profiles()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -17056,18 +18540,20 @@ def test_list_bare_metal_server_profiles_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_server/profiles')
- mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "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", "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"bandwidth": {"type": "fixed", "value": 20000}, "console_types": {"type": "enum", "values": ["serial"]}, "cpu_architecture": {"default": "amd64", "type": "fixed", "value": "amd64"}, "cpu_core_count": {"type": "fixed", "value": 80}, "cpu_socket_count": {"type": "fixed", "value": 4}, "disks": [{"quantity": {"type": "fixed", "value": 4}, "size": {"type": "fixed", "value": 100}, "supported_interface_types": {"default": "fcp", "type": "enum", "values": ["fcp"]}}], "family": "balanced", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768", "memory": {"type": "fixed", "value": 16}, "name": "bx2-metal-192x768", "network_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}], "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_bare_metal_server_profiles(**req_copy)
@@ -17087,18 +18573,22 @@ 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},"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","os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
- mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"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","os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
- 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)
+ 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_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
+ 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_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
+ 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 = []
@@ -17119,18 +18609,22 @@ 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},"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","os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
- mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"bandwidth":{"type":"fixed","value":20000},"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","os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
- 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)
+ 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_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
+ 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_interface_count":{"max":128,"min":1,"type":"range"},"os_architecture":{"default":"amd64","type":"enum","values":["amd64"]},"resource_type":"bare_metal_server_profile","supported_trusted_platform_module_modes":{"type":"enum","values":["disabled"]}}]}'
+ 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 = BareMetalServerProfilesPager(
@@ -17141,7 +18635,8 @@ def test_list_bare_metal_server_profiles_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetBareMetalServerProfile():
+
+class TestGetBareMetalServerProfile:
"""
Test Class for get_bare_metal_server_profile
"""
@@ -17153,12 +18648,14 @@ def test_get_bare_metal_server_profile_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_server/profiles/testString')
- mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "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", "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -17166,7 +18663,7 @@ def test_get_bare_metal_server_profile_all_params(self):
# Invoke method
response = _service.get_bare_metal_server_profile(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -17189,12 +18686,14 @@ def test_get_bare_metal_server_profile_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_server/profiles/testString')
- mock_response = '{"bandwidth": {"type": "fixed", "value": 20000}, "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", "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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_interface_count": {"max": 128, "min": 1, "type": "range"}, "os_architecture": {"default": "amd64", "type": "enum", "values": ["amd64"]}, "resource_type": "bare_metal_server_profile", "supported_trusted_platform_module_modes": {"type": "enum", "values": ["disabled"]}}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -17204,7 +18703,7 @@ def test_get_bare_metal_server_profile_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server_profile(**req_copy)
@@ -17217,7 +18716,8 @@ def test_get_bare_metal_server_profile_value_error_with_retries(self):
_service.disable_retries()
self.test_get_bare_metal_server_profile_value_error()
-class TestListBareMetalServers():
+
+class TestListBareMetalServers:
"""
Test Class for list_bare_metal_servers
"""
@@ -17229,12 +18729,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -17260,14 +18762,14 @@ def test_list_bare_metal_servers_all_params(self):
network_interfaces_subnet_id=network_interfaces_subnet_id,
network_interfaces_subnet_crn=network_interfaces_subnet_crn,
network_interfaces_subnet_name=network_interfaces_subnet_name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -17296,17 +18798,18 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_bare_metal_servers()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -17327,18 +18830,20 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_bare_metal_servers(**req_copy)
@@ -17358,18 +18863,22 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","memory":1536,"name":"my-bare-metal-server","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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","memory":1536,"name":"my-bare-metal-server","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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
+ 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 = []
@@ -17398,18 +18907,22 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","memory":1536,"name":"my-bare-metal-server","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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","memory":1536,"name":"my-bare-metal-server","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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a","disks":[{"created_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e","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,"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","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_interfaces":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}}],"primary_network_interface":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
+ 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 = BareMetalServersPager(
@@ -17428,7 +18941,8 @@ def test_list_bare_metal_servers_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateBareMetalServer():
+
+class TestCreateBareMetalServer:
"""
Test Class for create_bare_metal_server
"""
@@ -17440,12 +18954,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ImageIdentityById model
image_identity_model = {}
@@ -17540,7 +19056,7 @@ def test_create_bare_metal_server_all_params(self):
resource_group=resource_group,
trusted_platform_module=trusted_platform_module,
vpc=vpc,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -17575,12 +19091,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ImageIdentityById model
image_identity_model = {}
@@ -17671,7 +19189,7 @@ def test_create_bare_metal_server_value_error(self):
"zone": zone,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_bare_metal_server(**req_copy)
@@ -17684,7 +19202,8 @@ def test_create_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_create_bare_metal_server_value_error()
-class TestCreateBareMetalServerConsoleAccessToken():
+
+class TestCreateBareMetalServerConsoleAccessToken:
"""
Test Class for create_bare_metal_server_console_access_token
"""
@@ -17697,11 +19216,13 @@ def test_create_bare_metal_server_console_access_token_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/console_access_token')
mock_response = '{"access_token": "VGhpcyBJcyBhIHRva2Vu", "console_type": "serial", "created_at": "2020-07-27T21:50:14.000Z", "expires_at": "2020-07-27T21:51:14.000Z", "force": false, "href": "wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -17713,7 +19234,7 @@ def test_create_bare_metal_server_console_access_token_all_params(self):
bare_metal_server_id,
console_type,
force=force,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -17741,11 +19262,13 @@ def test_create_bare_metal_server_console_access_token_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/console_access_token')
mock_response = '{"access_token": "VGhpcyBJcyBhIHRva2Vu", "console_type": "serial", "created_at": "2020-07-27T21:50:14.000Z", "expires_at": "2020-07-27T21:51:14.000Z", "force": false, "href": "wss://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/console?access_token=VGhpcyBJcyBhIHRva2Vu"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -17758,7 +19281,7 @@ def test_create_bare_metal_server_console_access_token_value_error(self):
"console_type": console_type,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_bare_metal_server_console_access_token(**req_copy)
@@ -17771,7 +19294,8 @@ def test_create_bare_metal_server_console_access_token_value_error_with_retries(
_service.disable_retries()
self.test_create_bare_metal_server_console_access_token_value_error()
-class TestListBareMetalServerDisks():
+
+class TestListBareMetalServerDisks:
"""
Test Class for list_bare_metal_server_disks
"""
@@ -17784,11 +19308,13 @@ def test_list_bare_metal_server_disks_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/disks')
mock_response = '{"disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -17796,7 +19322,7 @@ def test_list_bare_metal_server_disks_all_params(self):
# Invoke method
response = _service.list_bare_metal_server_disks(
bare_metal_server_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -17820,11 +19346,13 @@ def test_list_bare_metal_server_disks_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/disks')
mock_response = '{"disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -17834,7 +19362,7 @@ def test_list_bare_metal_server_disks_value_error(self):
"bare_metal_server_id": bare_metal_server_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_bare_metal_server_disks(**req_copy)
@@ -17847,7 +19375,8 @@ def test_list_bare_metal_server_disks_value_error_with_retries(self):
_service.disable_retries()
self.test_list_bare_metal_server_disks_value_error()
-class TestGetBareMetalServerDisk():
+
+class TestGetBareMetalServerDisk:
"""
Test Class for get_bare_metal_server_disk
"""
@@ -17860,11 +19389,13 @@ def test_get_bare_metal_server_disk_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -17874,7 +19405,7 @@ def test_get_bare_metal_server_disk_all_params(self):
response = _service.get_bare_metal_server_disk(
bare_metal_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -17898,11 +19429,13 @@ def test_get_bare_metal_server_disk_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -17914,7 +19447,7 @@ def test_get_bare_metal_server_disk_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server_disk(**req_copy)
@@ -17927,7 +19460,8 @@ def test_get_bare_metal_server_disk_value_error_with_retries(self):
_service.disable_retries()
self.test_get_bare_metal_server_disk_value_error()
-class TestUpdateBareMetalServerDisk():
+
+class TestUpdateBareMetalServerDisk:
"""
Test Class for update_bare_metal_server_disk
"""
@@ -17940,11 +19474,13 @@ def test_update_bare_metal_server_disk_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BareMetalServerDiskPatch model
bare_metal_server_disk_patch_model = {}
@@ -17960,7 +19496,7 @@ def test_update_bare_metal_server_disk_all_params(self):
bare_metal_server_id,
id,
bare_metal_server_disk_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -17987,11 +19523,13 @@ def test_update_bare_metal_server_disk_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/disks/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "interface_type": "fcp", "name": "my-bare-metal-server-disk", "resource_type": "bare_metal_server_disk", "size": 100}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BareMetalServerDiskPatch model
bare_metal_server_disk_patch_model = {}
@@ -18009,7 +19547,7 @@ def test_update_bare_metal_server_disk_value_error(self):
"bare_metal_server_disk_patch": bare_metal_server_disk_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_bare_metal_server_disk(**req_copy)
@@ -18022,7 +19560,8 @@ def test_update_bare_metal_server_disk_value_error_with_retries(self):
_service.disable_retries()
self.test_update_bare_metal_server_disk_value_error()
-class TestListBareMetalServerNetworkInterfaces():
+
+class TestListBareMetalServerNetworkInterfaces:
"""
Test Class for list_bare_metal_server_network_interfaces
"""
@@ -18035,11 +19574,13 @@ def test_list_bare_metal_server_network_interfaces_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18051,14 +19592,14 @@ def test_list_bare_metal_server_network_interfaces_all_params(self):
bare_metal_server_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -18080,11 +19621,13 @@ def test_list_bare_metal_server_network_interfaces_required_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18092,7 +19635,7 @@ def test_list_bare_metal_server_network_interfaces_required_params(self):
# Invoke method
response = _service.list_bare_metal_server_network_interfaces(
bare_metal_server_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18116,11 +19659,13 @@ def test_list_bare_metal_server_network_interfaces_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18130,7 +19675,7 @@ def test_list_bare_metal_server_network_interfaces_value_error(self):
"bare_metal_server_id": bare_metal_server_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_bare_metal_server_network_interfaces(**req_copy)
@@ -18152,16 +19697,20 @@ def test_list_bare_metal_server_network_interfaces_with_pager_get_next(self):
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:0a:00:23:94","name":"my-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}'
mock_response2 = '{"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:0a:00:23:94","name":"my-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}'
- 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)
+ 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 = []
@@ -18185,16 +19734,20 @@ def test_list_bare_metal_server_network_interfaces_with_pager_get_all(self):
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:0a:00:23:94","name":"my-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}'
mock_response2 = '{"total_count":2,"limit":1,"network_interfaces":[{"allow_ip_spoofing":true,"created_at":"2019-01-01T12:00:00.000Z","enable_infrastructure_nat":true,"floating_ips":[{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"}],"href":"https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","mac_address":"02:00:0a:00:23:94","name":"my-network-interface","port_speed":1000,"primary_ip":{"address":"192.168.3.4","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"type":"primary","interface_type":"hipersocket"}]}'
- 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)
+ 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 = BareMetalServerNetworkInterfacesPager(
@@ -18206,7 +19759,8 @@ def test_list_bare_metal_server_network_interfaces_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateBareMetalServerNetworkInterface():
+
+class TestCreateBareMetalServerNetworkInterface:
"""
Test Class for create_bare_metal_server_network_interface
"""
@@ -18219,11 +19773,13 @@ def test_create_bare_metal_server_network_interface_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model
network_interface_ip_prototype_model = {}
@@ -18257,7 +19813,7 @@ def test_create_bare_metal_server_network_interface_all_params(self):
response = _service.create_bare_metal_server_network_interface(
bare_metal_server_id,
bare_metal_server_network_interface_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18284,11 +19840,13 @@ def test_create_bare_metal_server_network_interface_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext model
network_interface_ip_prototype_model = {}
@@ -18324,7 +19882,7 @@ def test_create_bare_metal_server_network_interface_value_error(self):
"bare_metal_server_network_interface_prototype": bare_metal_server_network_interface_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_bare_metal_server_network_interface(**req_copy)
@@ -18337,7 +19895,8 @@ def test_create_bare_metal_server_network_interface_value_error_with_retries(sel
_service.disable_retries()
self.test_create_bare_metal_server_network_interface_value_error()
-class TestDeleteBareMetalServerNetworkInterface():
+
+class TestDeleteBareMetalServerNetworkInterface:
"""
Test Class for delete_bare_metal_server_network_interface
"""
@@ -18349,9 +19908,11 @@ def test_delete_bare_metal_server_network_interface_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18361,7 +19922,7 @@ def test_delete_bare_metal_server_network_interface_all_params(self):
response = _service.delete_bare_metal_server_network_interface(
bare_metal_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18384,9 +19945,11 @@ def test_delete_bare_metal_server_network_interface_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18398,7 +19961,7 @@ def test_delete_bare_metal_server_network_interface_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_bare_metal_server_network_interface(**req_copy)
@@ -18411,7 +19974,8 @@ def test_delete_bare_metal_server_network_interface_value_error_with_retries(sel
_service.disable_retries()
self.test_delete_bare_metal_server_network_interface_value_error()
-class TestGetBareMetalServerNetworkInterface():
+
+class TestGetBareMetalServerNetworkInterface:
"""
Test Class for get_bare_metal_server_network_interface
"""
@@ -18424,11 +19988,13 @@ def test_get_bare_metal_server_network_interface_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18438,7 +20004,7 @@ def test_get_bare_metal_server_network_interface_all_params(self):
response = _service.get_bare_metal_server_network_interface(
bare_metal_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18462,11 +20028,13 @@ def test_get_bare_metal_server_network_interface_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18478,7 +20046,7 @@ def test_get_bare_metal_server_network_interface_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server_network_interface(**req_copy)
@@ -18491,7 +20059,8 @@ def test_get_bare_metal_server_network_interface_value_error_with_retries(self):
_service.disable_retries()
self.test_get_bare_metal_server_network_interface_value_error()
-class TestUpdateBareMetalServerNetworkInterface():
+
+class TestUpdateBareMetalServerNetworkInterface:
"""
Test Class for update_bare_metal_server_network_interface
"""
@@ -18504,11 +20073,13 @@ def test_update_bare_metal_server_network_interface_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BareMetalServerNetworkInterfacePatch model
bare_metal_server_network_interface_patch_model = {}
@@ -18527,7 +20098,7 @@ def test_update_bare_metal_server_network_interface_all_params(self):
bare_metal_server_id,
id,
bare_metal_server_network_interface_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18554,11 +20125,13 @@ def test_update_bare_metal_server_network_interface_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString')
mock_response = '{"allow_ip_spoofing": true, "created_at": "2019-01-01T12:00:00.000Z", "enable_infrastructure_nat": true, "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "mac_address": "02:00:0a:00:23:94", "name": "my-network-interface", "port_speed": 1000, "primary_ip": {"address": "192.168.3.4", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "type": "primary", "interface_type": "hipersocket"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BareMetalServerNetworkInterfacePatch model
bare_metal_server_network_interface_patch_model = {}
@@ -18579,7 +20152,7 @@ def test_update_bare_metal_server_network_interface_value_error(self):
"bare_metal_server_network_interface_patch": bare_metal_server_network_interface_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_bare_metal_server_network_interface(**req_copy)
@@ -18592,7 +20165,8 @@ def test_update_bare_metal_server_network_interface_value_error_with_retries(sel
_service.disable_retries()
self.test_update_bare_metal_server_network_interface_value_error()
-class TestListBareMetalServerNetworkInterfaceFloatingIps():
+
+class TestListBareMetalServerNetworkInterfaceFloatingIps:
"""
Test Class for list_bare_metal_server_network_interface_floating_ips
"""
@@ -18605,11 +20179,13 @@ def test_list_bare_metal_server_network_interface_floating_ips_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips')
mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18619,7 +20195,7 @@ def test_list_bare_metal_server_network_interface_floating_ips_all_params(self):
response = _service.list_bare_metal_server_network_interface_floating_ips(
bare_metal_server_id,
network_interface_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18643,11 +20219,13 @@ def test_list_bare_metal_server_network_interface_floating_ips_value_error(self)
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips')
mock_response = '{"floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18659,7 +20237,7 @@ def test_list_bare_metal_server_network_interface_floating_ips_value_error(self)
"network_interface_id": network_interface_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_bare_metal_server_network_interface_floating_ips(**req_copy)
@@ -18672,7 +20250,8 @@ def test_list_bare_metal_server_network_interface_floating_ips_value_error_with_
_service.disable_retries()
self.test_list_bare_metal_server_network_interface_floating_ips_value_error()
-class TestRemoveBareMetalServerNetworkInterfaceFloatingIp():
+
+class TestRemoveBareMetalServerNetworkInterfaceFloatingIp:
"""
Test Class for remove_bare_metal_server_network_interface_floating_ip
"""
@@ -18684,9 +20263,11 @@ def test_remove_bare_metal_server_network_interface_floating_ip_all_params(self)
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18698,7 +20279,7 @@ def test_remove_bare_metal_server_network_interface_floating_ip_all_params(self)
bare_metal_server_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18721,9 +20302,11 @@ def test_remove_bare_metal_server_network_interface_floating_ip_value_error(self
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18737,7 +20320,7 @@ def test_remove_bare_metal_server_network_interface_floating_ip_value_error(self
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.remove_bare_metal_server_network_interface_floating_ip(**req_copy)
@@ -18750,7 +20333,8 @@ def test_remove_bare_metal_server_network_interface_floating_ip_value_error_with
_service.disable_retries()
self.test_remove_bare_metal_server_network_interface_floating_ip_value_error()
-class TestGetBareMetalServerNetworkInterfaceFloatingIp():
+
+class TestGetBareMetalServerNetworkInterfaceFloatingIp:
"""
Test Class for get_bare_metal_server_network_interface_floating_ip
"""
@@ -18763,11 +20347,13 @@ def test_get_bare_metal_server_network_interface_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18779,7 +20365,7 @@ def test_get_bare_metal_server_network_interface_floating_ip_all_params(self):
bare_metal_server_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18803,11 +20389,13 @@ def test_get_bare_metal_server_network_interface_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18821,7 +20409,7 @@ def test_get_bare_metal_server_network_interface_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server_network_interface_floating_ip(**req_copy)
@@ -18834,7 +20422,8 @@ def test_get_bare_metal_server_network_interface_floating_ip_value_error_with_re
_service.disable_retries()
self.test_get_bare_metal_server_network_interface_floating_ip_value_error()
-class TestAddBareMetalServerNetworkInterfaceFloatingIp():
+
+class TestAddBareMetalServerNetworkInterfaceFloatingIp:
"""
Test Class for add_bare_metal_server_network_interface_floating_ip
"""
@@ -18847,11 +20436,13 @@ def test_add_bare_metal_server_network_interface_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18863,7 +20454,7 @@ def test_add_bare_metal_server_network_interface_floating_ip_all_params(self):
bare_metal_server_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18887,11 +20478,13 @@ def test_add_bare_metal_server_network_interface_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/network_interfaces/testString/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18905,7 +20498,7 @@ def test_add_bare_metal_server_network_interface_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.add_bare_metal_server_network_interface_floating_ip(**req_copy)
@@ -18918,7 +20511,8 @@ def test_add_bare_metal_server_network_interface_floating_ip_value_error_with_re
_service.disable_retries()
self.test_add_bare_metal_server_network_interface_floating_ip_value_error()
-class TestListBareMetalServerNetworkInterfaceIps():
+
+class TestListBareMetalServerNetworkInterfaceIps:
"""
Test Class for list_bare_metal_server_network_interface_ips
"""
@@ -18931,11 +20525,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18945,7 +20541,7 @@ def test_list_bare_metal_server_network_interface_ips_all_params(self):
response = _service.list_bare_metal_server_network_interface_ips(
bare_metal_server_id,
network_interface_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -18969,11 +20565,13 @@ 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": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -18985,7 +20583,7 @@ def test_list_bare_metal_server_network_interface_ips_value_error(self):
"network_interface_id": network_interface_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_bare_metal_server_network_interface_ips(**req_copy)
@@ -18998,7 +20596,8 @@ def test_list_bare_metal_server_network_interface_ips_value_error_with_retries(s
_service.disable_retries()
self.test_list_bare_metal_server_network_interface_ips_value_error()
-class TestGetBareMetalServerNetworkInterfaceIp():
+
+class TestGetBareMetalServerNetworkInterfaceIp:
"""
Test Class for get_bare_metal_server_network_interface_ip
"""
@@ -19011,11 +20610,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -19027,7 +20628,7 @@ def test_get_bare_metal_server_network_interface_ip_all_params(self):
bare_metal_server_id,
network_interface_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19051,11 +20652,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
bare_metal_server_id = 'testString'
@@ -19069,7 +20672,7 @@ def test_get_bare_metal_server_network_interface_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server_network_interface_ip(**req_copy)
@@ -19082,7 +20685,8 @@ def test_get_bare_metal_server_network_interface_ip_value_error_with_retries(sel
_service.disable_retries()
self.test_get_bare_metal_server_network_interface_ip_value_error()
-class TestDeleteBareMetalServer():
+
+class TestDeleteBareMetalServer:
"""
Test Class for delete_bare_metal_server
"""
@@ -19094,9 +20698,11 @@ def test_delete_bare_metal_server_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -19104,7 +20710,7 @@ def test_delete_bare_metal_server_all_params(self):
# Invoke method
response = _service.delete_bare_metal_server(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19127,9 +20733,11 @@ def test_delete_bare_metal_server_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -19139,7 +20747,7 @@ def test_delete_bare_metal_server_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_bare_metal_server(**req_copy)
@@ -19152,7 +20760,8 @@ def test_delete_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_bare_metal_server_value_error()
-class TestGetBareMetalServer():
+
+class TestGetBareMetalServer:
"""
Test Class for get_bare_metal_server
"""
@@ -19164,12 +20773,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -19177,7 +20788,7 @@ def test_get_bare_metal_server_all_params(self):
# Invoke method
response = _service.get_bare_metal_server(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19200,12 +20811,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -19215,7 +20828,7 @@ def test_get_bare_metal_server_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server(**req_copy)
@@ -19228,7 +20841,8 @@ def test_get_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_get_bare_metal_server_value_error()
-class TestUpdateBareMetalServer():
+
+class TestUpdateBareMetalServer:
"""
Test Class for update_bare_metal_server
"""
@@ -19240,12 +20854,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BareMetalServerTrustedPlatformModulePatch model
bare_metal_server_trusted_platform_module_patch_model = {}
@@ -19265,7 +20881,7 @@ def test_update_bare_metal_server_all_params(self):
response = _service.update_bare_metal_server(
id,
bare_metal_server_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19291,12 +20907,14 @@ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "memory": 1536, "name": "my-bare-metal-server", "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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ 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/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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/123456::bare-metal-server:1e09281b-f177-46fb-baf1-bc152b2e391a", "disks": [{"created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e", "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, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "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_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}}], "primary_network_interface": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a BareMetalServerTrustedPlatformModulePatch model
bare_metal_server_trusted_platform_module_patch_model = {}
@@ -19318,7 +20936,7 @@ def test_update_bare_metal_server_value_error(self):
"bare_metal_server_patch": bare_metal_server_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_bare_metal_server(**req_copy)
@@ -19331,7 +20949,8 @@ def test_update_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_update_bare_metal_server_value_error()
-class TestGetBareMetalServerInitialization():
+
+class TestGetBareMetalServerInitialization:
"""
Test Class for get_bare_metal_server_initialization
"""
@@ -19344,11 +20963,13 @@ def test_get_bare_metal_server_initialization_all_params(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/initialization')
mock_response = '{"image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "user_accounts": [{"encrypted_password": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "encryption_key": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}, "resource_type": "host_user_account", "username": "Administrator"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -19356,7 +20977,7 @@ def test_get_bare_metal_server_initialization_all_params(self):
# Invoke method
response = _service.get_bare_metal_server_initialization(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19380,11 +21001,13 @@ def test_get_bare_metal_server_initialization_value_error(self):
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/initialization')
mock_response = '{"image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "keys": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}], "user_accounts": [{"encrypted_password": "VGhpcyBpcyBhbiBlbmNvZGVkIGJ5dGUgYXJyYXku", "encryption_key": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "fingerprint": "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY", "href": "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803", "id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "name": "my-key"}, "resource_type": "host_user_account", "username": "Administrator"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -19394,7 +21017,7 @@ def test_get_bare_metal_server_initialization_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_bare_metal_server_initialization(**req_copy)
@@ -19407,7 +21030,8 @@ def test_get_bare_metal_server_initialization_value_error_with_retries(self):
_service.disable_retries()
self.test_get_bare_metal_server_initialization_value_error()
-class TestRestartBareMetalServer():
+
+class TestRestartBareMetalServer:
"""
Test Class for restart_bare_metal_server
"""
@@ -19419,9 +21043,11 @@ def test_restart_bare_metal_server_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/restart')
- responses.add(responses.POST,
- url,
- status=204)
+ responses.add(
+ responses.POST,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -19429,7 +21055,7 @@ def test_restart_bare_metal_server_all_params(self):
# Invoke method
response = _service.restart_bare_metal_server(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19452,9 +21078,11 @@ def test_restart_bare_metal_server_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/restart')
- responses.add(responses.POST,
- url,
- status=204)
+ responses.add(
+ responses.POST,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -19464,7 +21092,7 @@ def test_restart_bare_metal_server_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.restart_bare_metal_server(**req_copy)
@@ -19477,7 +21105,8 @@ def test_restart_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_restart_bare_metal_server_value_error()
-class TestStartBareMetalServer():
+
+class TestStartBareMetalServer:
"""
Test Class for start_bare_metal_server
"""
@@ -19489,9 +21118,11 @@ def test_start_bare_metal_server_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/start')
- responses.add(responses.POST,
- url,
- status=204)
+ responses.add(
+ responses.POST,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -19499,7 +21130,7 @@ def test_start_bare_metal_server_all_params(self):
# Invoke method
response = _service.start_bare_metal_server(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19522,9 +21153,11 @@ def test_start_bare_metal_server_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/start')
- responses.add(responses.POST,
- url,
- status=204)
+ responses.add(
+ responses.POST,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -19534,7 +21167,7 @@ def test_start_bare_metal_server_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.start_bare_metal_server(**req_copy)
@@ -19547,7 +21180,8 @@ def test_start_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_start_bare_metal_server_value_error()
-class TestStopBareMetalServer():
+
+class TestStopBareMetalServer:
"""
Test Class for stop_bare_metal_server
"""
@@ -19559,9 +21193,11 @@ def test_stop_bare_metal_server_all_params(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/stop')
- responses.add(responses.POST,
- url,
- status=204)
+ responses.add(
+ responses.POST,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -19571,7 +21207,7 @@ def test_stop_bare_metal_server_all_params(self):
response = _service.stop_bare_metal_server(
id,
type,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19597,9 +21233,11 @@ def test_stop_bare_metal_server_value_error(self):
"""
# Set up mock
url = preprocess_url('/bare_metal_servers/testString/stop')
- responses.add(responses.POST,
- url,
- status=204)
+ responses.add(
+ responses.POST,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -19611,7 +21249,7 @@ def test_stop_bare_metal_server_value_error(self):
"type": type,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.stop_bare_metal_server(**req_copy)
@@ -19624,6 +21262,7 @@ def test_stop_bare_metal_server_value_error_with_retries(self):
_service.disable_retries()
self.test_stop_bare_metal_server_value_error()
+
# endregion
##############################################################################
# End of Service: BareMetalServers
@@ -19634,7 +21273,8 @@ def test_stop_bare_metal_server_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -19679,7 +21319,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListVolumeProfiles():
+
+class TestListVolumeProfiles:
"""
Test Class for list_volume_profiles
"""
@@ -19692,11 +21333,13 @@ def test_list_volume_profiles_all_params(self):
# Set up mock
url = preprocess_url('/volume/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "tiered", "href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -19706,14 +21349,14 @@ def test_list_volume_profiles_all_params(self):
response = _service.list_volume_profiles(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -19735,16 +21378,17 @@ def test_list_volume_profiles_required_params(self):
# Set up mock
url = preprocess_url('/volume/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "tiered", "href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_volume_profiles()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -19766,17 +21410,19 @@ def test_list_volume_profiles_value_error(self):
# Set up mock
url = preprocess_url('/volume/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "tiered", "href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_volume_profiles(**req_copy)
@@ -19798,16 +21444,20 @@ def test_list_volume_profiles_with_pager_get_next(self):
url = preprocess_url('/volume/profiles')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"family":"tiered","href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"}]}'
mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"family":"tiered","href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"}]}'
- 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)
+ 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 = []
@@ -19830,16 +21480,20 @@ def test_list_volume_profiles_with_pager_get_all(self):
url = preprocess_url('/volume/profiles')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"family":"tiered","href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"}]}'
mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"family":"tiered","href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"}]}'
- 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)
+ 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 = VolumeProfilesPager(
@@ -19850,7 +21504,8 @@ def test_list_volume_profiles_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetVolumeProfile():
+
+class TestGetVolumeProfile:
"""
Test Class for get_volume_profile
"""
@@ -19863,11 +21518,13 @@ def test_get_volume_profile_all_params(self):
# Set up mock
url = preprocess_url('/volume/profiles/testString')
mock_response = '{"family": "tiered", "href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -19875,7 +21532,7 @@ def test_get_volume_profile_all_params(self):
# Invoke method
response = _service.get_volume_profile(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -19899,11 +21556,13 @@ def test_get_volume_profile_value_error(self):
# Set up mock
url = preprocess_url('/volume/profiles/testString')
mock_response = '{"family": "tiered", "href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -19913,7 +21572,7 @@ def test_get_volume_profile_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_volume_profile(**req_copy)
@@ -19926,7 +21585,8 @@ def test_get_volume_profile_value_error_with_retries(self):
_service.disable_retries()
self.test_get_volume_profile_value_error()
-class TestListVolumes():
+
+class TestListVolumes:
"""
Test Class for list_volumes
"""
@@ -19939,11 +21599,13 @@ def test_list_volumes_all_params(self):
# Set up mock
url = preprocess_url('/volumes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -19965,14 +21627,14 @@ def test_list_volumes_all_params(self):
operating_system_family=operating_system_family,
operating_system_architecture=operating_system_architecture,
zone_name=zone_name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -20000,16 +21662,17 @@ def test_list_volumes_required_params(self):
# Set up mock
url = preprocess_url('/volumes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_volumes()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -20031,17 +21694,19 @@ def test_list_volumes_value_error(self):
# Set up mock
url = preprocess_url('/volumes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "volumes": [{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_volumes(**req_copy)
@@ -20063,16 +21728,20 @@ def test_list_volumes_with_pager_get_next(self):
url = preprocess_url('/volumes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
mock_response2 = '{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -20101,16 +21770,20 @@ def test_list_volumes_with_pager_get_all(self):
url = preprocess_url('/volumes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
mock_response2 = '{"total_count":2,"limit":1,"volumes":[{"active":true,"attachment_state":"attached","bandwidth":1000,"busy":true,"capacity":1000,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5","encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","iops":10000,"name":"my-volume","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"profile":{"href":"https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose","name":"general-purpose"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_snapshot":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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","resource_type":"snapshot"},"status":"available","status_reasons":[{"code":"encryption_key_deleted","message":"message","more_info":"https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}],"user_tags":["user_tags"],"volume_attachments":[{"delete_volume_on_instance_delete":true,"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"device":{"id":"80b3e36e-41f4-40e9-bd56-beae81792a68"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a","id":"82cbf856-9cbb-45fb-b62f-d7bcef32399a","instance":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a","id":"1e09281b-f177-46fb-baf1-bc152b2e391a","name":"my-instance"},"name":"my-volume-attachment","type":"boot"}],"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = VolumesPager(
@@ -20127,7 +21800,8 @@ def test_list_volumes_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVolume():
+
+class TestCreateVolume:
"""
Test Class for create_volume
"""
@@ -20140,11 +21814,13 @@ def test_create_volume_all_params(self):
# Set up mock
url = preprocess_url('/volumes')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VolumeProfileIdentityByName model
volume_profile_identity_model = {}
@@ -20179,7 +21855,7 @@ def test_create_volume_all_params(self):
# Invoke method
response = _service.create_volume(
volume_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -20206,11 +21882,13 @@ def test_create_volume_value_error(self):
# Set up mock
url = preprocess_url('/volumes')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VolumeProfileIdentityByName model
volume_profile_identity_model = {}
@@ -20247,7 +21925,7 @@ def test_create_volume_value_error(self):
"volume_prototype": volume_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_volume(**req_copy)
@@ -20260,7 +21938,8 @@ def test_create_volume_value_error_with_retries(self):
_service.disable_retries()
self.test_create_volume_value_error()
-class TestDeleteVolume():
+
+class TestDeleteVolume:
"""
Test Class for delete_volume
"""
@@ -20272,9 +21951,11 @@ def test_delete_volume_all_params(self):
"""
# Set up mock
url = preprocess_url('/volumes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -20284,7 +21965,7 @@ def test_delete_volume_all_params(self):
response = _service.delete_volume(
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -20307,9 +21988,11 @@ def test_delete_volume_required_params(self):
"""
# Set up mock
url = preprocess_url('/volumes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -20317,7 +22000,7 @@ def test_delete_volume_required_params(self):
# Invoke method
response = _service.delete_volume(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -20340,9 +22023,11 @@ def test_delete_volume_value_error(self):
"""
# Set up mock
url = preprocess_url('/volumes/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -20352,7 +22037,7 @@ def test_delete_volume_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_volume(**req_copy)
@@ -20365,7 +22050,8 @@ def test_delete_volume_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_volume_value_error()
-class TestGetVolume():
+
+class TestGetVolume:
"""
Test Class for get_volume
"""
@@ -20378,11 +22064,13 @@ def test_get_volume_all_params(self):
# Set up mock
url = preprocess_url('/volumes/testString')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -20390,7 +22078,7 @@ def test_get_volume_all_params(self):
# Invoke method
response = _service.get_volume(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -20414,11 +22102,13 @@ def test_get_volume_value_error(self):
# Set up mock
url = preprocess_url('/volumes/testString')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -20428,7 +22118,7 @@ def test_get_volume_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_volume(**req_copy)
@@ -20441,7 +22131,8 @@ def test_get_volume_value_error_with_retries(self):
_service.disable_retries()
self.test_get_volume_value_error()
-class TestUpdateVolume():
+
+class TestUpdateVolume:
"""
Test Class for update_volume
"""
@@ -20454,11 +22145,13 @@ def test_update_volume_all_params(self):
# Set up mock
url = preprocess_url('/volumes/testString')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VolumeProfileIdentityByName model
volume_profile_identity_model = {}
@@ -20482,7 +22175,7 @@ def test_update_volume_all_params(self):
id,
volume_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -20509,11 +22202,13 @@ def test_update_volume_required_params(self):
# Set up mock
url = preprocess_url('/volumes/testString')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VolumeProfileIdentityByName model
volume_profile_identity_model = {}
@@ -20535,7 +22230,7 @@ def test_update_volume_required_params(self):
response = _service.update_volume(
id,
volume_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -20562,11 +22257,13 @@ def test_update_volume_value_error(self):
# Set up mock
url = preprocess_url('/volumes/testString')
mock_response = '{"active": true, "attachment_state": "attached", "bandwidth": 1000, "busy": true, "capacity": 1000, "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_snapshot": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::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", "resource_type": "snapshot"}, "status": "available", "status_reasons": [{"code": "encryption_key_deleted", "message": "message", "more_info": "https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys"}], "user_tags": ["user_tags"], "volume_attachments": [{"delete_volume_on_instance_delete": true, "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VolumeProfileIdentityByName model
volume_profile_identity_model = {}
@@ -20590,7 +22287,7 @@ def test_update_volume_value_error(self):
"volume_patch": volume_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_volume(**req_copy)
@@ -20603,6 +22300,7 @@ def test_update_volume_value_error_with_retries(self):
_service.disable_retries()
self.test_update_volume_value_error()
+
# endregion
##############################################################################
# End of Service: Volumes
@@ -20613,7 +22311,8 @@ def test_update_volume_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -20658,7 +22357,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestDeleteSnapshots():
+
+class TestDeleteSnapshots:
"""
Test Class for delete_snapshots
"""
@@ -20670,9 +22370,11 @@ def test_delete_snapshots_all_params(self):
"""
# Set up mock
url = preprocess_url('/snapshots')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
source_volume_id = 'testString'
@@ -20680,14 +22382,14 @@ def test_delete_snapshots_all_params(self):
# Invoke method
response = _service.delete_snapshots(
source_volume_id,
- headers={}
+ headers={},
)
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 204
# Validate query params
- query_string = responses.calls[0].request.url.split('?',1)[1]
+ query_string = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'source_volume.id={}'.format(source_volume_id) in query_string
@@ -20707,9 +22409,11 @@ def test_delete_snapshots_value_error(self):
"""
# Set up mock
url = preprocess_url('/snapshots')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
source_volume_id = 'testString'
@@ -20719,7 +22423,7 @@ def test_delete_snapshots_value_error(self):
"source_volume_id": source_volume_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_snapshots(**req_copy)
@@ -20732,7 +22436,8 @@ def test_delete_snapshots_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_snapshots_value_error()
-class TestListSnapshots():
+
+class TestListSnapshots:
"""
Test Class for list_snapshots
"""
@@ -20745,11 +22450,13 @@ def test_list_snapshots_all_params(self):
# Set up mock
url = preprocess_url('/snapshots')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -20779,14 +22486,14 @@ def test_list_snapshots_all_params(self):
sort=sort,
backup_policy_plan_id=backup_policy_plan_id,
clones_zone_name=clones_zone_name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -20818,16 +22525,17 @@ def test_list_snapshots_required_params(self):
# Set up mock
url = preprocess_url('/snapshots')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_snapshots()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -20849,17 +22557,19 @@ def test_list_snapshots_value_error(self):
# Set up mock
url = preprocess_url('/snapshots')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "snapshots": [{"backup_policy_plan": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "id": "r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178", "name": "my-policy-plan", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_snapshots(**req_copy)
@@ -20881,16 +22591,20 @@ def test_list_snapshots_with_pager_get_next(self):
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","resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-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","resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"user_tags":["user_tags"]}],"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)
+ 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 = []
@@ -20923,16 +22637,20 @@ def test_list_snapshots_with_pager_get_all(self):
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","resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-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","resource_type":"backup_policy_plan"},"bootable":true,"captured_at":"2019-01-01T12:00:00.000Z","clones":[{"available":false,"created_at":"2019-01-01T12:00:00.000Z","zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263","deletable":false,"encryption":"provider_managed","encryption_key":{"crn":"crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"},"href":"https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263","id":"r134-f6bfa329-0e36-433f-a3bb-0df632e79263","lifecycle_state":"stable","minimum_capacity":1,"name":"my-snapshot","operating_system":{"architecture":"amd64","dedicated_host_only":false,"display_name":"Ubuntu Server 16.04 LTS amd64","family":"Ubuntu Server","href":"https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64","name":"ubuntu-16-amd64","vendor":"Canonical","version":"16.04 LTS"},"resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"snapshot","service_tags":["service_tags"],"size":1,"source_image":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb8","name":"my-image"},"source_volume":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5","id":"1a6b7274-678d-4dfb-8981-c71dd9d4daa5","name":"my-volume"},"user_tags":["user_tags"]}],"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)
+ 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 = SnapshotsPager(
@@ -20953,7 +22671,8 @@ def test_list_snapshots_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateSnapshot():
+
+class TestCreateSnapshot:
"""
Test Class for create_snapshot
"""
@@ -20966,11 +22685,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -21002,7 +22723,7 @@ def test_create_snapshot_all_params(self):
# Invoke method
response = _service.create_snapshot(
snapshot_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21029,11 +22750,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ZoneIdentityByName model
zone_identity_model = {}
@@ -21067,7 +22790,7 @@ def test_create_snapshot_value_error(self):
"snapshot_prototype": snapshot_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_snapshot(**req_copy)
@@ -21080,7 +22803,8 @@ def test_create_snapshot_value_error_with_retries(self):
_service.disable_retries()
self.test_create_snapshot_value_error()
-class TestDeleteSnapshot():
+
+class TestDeleteSnapshot:
"""
Test Class for delete_snapshot
"""
@@ -21092,9 +22816,11 @@ def test_delete_snapshot_all_params(self):
"""
# Set up mock
url = preprocess_url('/snapshots/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -21104,7 +22830,7 @@ def test_delete_snapshot_all_params(self):
response = _service.delete_snapshot(
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21127,9 +22853,11 @@ def test_delete_snapshot_required_params(self):
"""
# Set up mock
url = preprocess_url('/snapshots/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -21137,7 +22865,7 @@ def test_delete_snapshot_required_params(self):
# Invoke method
response = _service.delete_snapshot(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21160,9 +22888,11 @@ def test_delete_snapshot_value_error(self):
"""
# Set up mock
url = preprocess_url('/snapshots/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -21172,7 +22902,7 @@ def test_delete_snapshot_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_snapshot(**req_copy)
@@ -21185,7 +22915,8 @@ def test_delete_snapshot_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_snapshot_value_error()
-class TestGetSnapshot():
+
+class TestGetSnapshot:
"""
Test Class for get_snapshot
"""
@@ -21198,11 +22929,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21210,7 +22943,7 @@ def test_get_snapshot_all_params(self):
# Invoke method
response = _service.get_snapshot(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21234,11 +22967,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21248,7 +22983,7 @@ def test_get_snapshot_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_snapshot(**req_copy)
@@ -21261,7 +22996,8 @@ def test_get_snapshot_value_error_with_retries(self):
_service.disable_retries()
self.test_get_snapshot_value_error()
-class TestUpdateSnapshot():
+
+class TestUpdateSnapshot:
"""
Test Class for update_snapshot
"""
@@ -21274,11 +23010,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SnapshotPatch model
snapshot_patch_model = {}
@@ -21295,7 +23033,7 @@ def test_update_snapshot_all_params(self):
id,
snapshot_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21322,11 +23060,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SnapshotPatch model
snapshot_patch_model = {}
@@ -21341,7 +23081,7 @@ def test_update_snapshot_required_params(self):
response = _service.update_snapshot(
id,
snapshot_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21368,11 +23108,13 @@ 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", "resource_type": "backup_policy_plan"}, "bootable": true, "captured_at": "2019-01-01T12:00:00.000Z", "clones": [{"available": false, "created_at": "2019-01-01T12:00:00.000Z", "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "deletable": false, "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "id": "r134-f6bfa329-0e36-433f-a3bb-0df632e79263", "lifecycle_state": "stable", "minimum_capacity": 1, "name": "my-snapshot", "operating_system": {"architecture": "amd64", "dedicated_host_only": false, "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "name": "ubuntu-16-amd64", "vendor": "Canonical", "version": "16.04 LTS"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "snapshot", "service_tags": ["service_tags"], "size": 1, "source_image": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::image: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/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image"}, "source_volume": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume: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/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "user_tags": ["user_tags"]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SnapshotPatch model
snapshot_patch_model = {}
@@ -21389,7 +23131,7 @@ def test_update_snapshot_value_error(self):
"snapshot_patch": snapshot_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_snapshot(**req_copy)
@@ -21402,7 +23144,8 @@ def test_update_snapshot_value_error_with_retries(self):
_service.disable_retries()
self.test_update_snapshot_value_error()
-class TestListSnapshotClones():
+
+class TestListSnapshotClones:
"""
Test Class for list_snapshot_clones
"""
@@ -21415,11 +23158,13 @@ def test_list_snapshot_clones_all_params(self):
# Set up mock
url = preprocess_url('/snapshots/testString/clones')
mock_response = '{"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"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21427,7 +23172,7 @@ def test_list_snapshot_clones_all_params(self):
# Invoke method
response = _service.list_snapshot_clones(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21451,11 +23196,13 @@ def test_list_snapshot_clones_value_error(self):
# Set up mock
url = preprocess_url('/snapshots/testString/clones')
mock_response = '{"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"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21465,7 +23212,7 @@ def test_list_snapshot_clones_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_snapshot_clones(**req_copy)
@@ -21478,7 +23225,8 @@ def test_list_snapshot_clones_value_error_with_retries(self):
_service.disable_retries()
self.test_list_snapshot_clones_value_error()
-class TestDeleteSnapshotClone():
+
+class TestDeleteSnapshotClone:
"""
Test Class for delete_snapshot_clone
"""
@@ -21490,9 +23238,11 @@ def test_delete_snapshot_clone_all_params(self):
"""
# Set up mock
url = preprocess_url('/snapshots/testString/clones/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -21502,7 +23252,7 @@ def test_delete_snapshot_clone_all_params(self):
response = _service.delete_snapshot_clone(
id,
zone_name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21525,9 +23275,11 @@ def test_delete_snapshot_clone_value_error(self):
"""
# Set up mock
url = preprocess_url('/snapshots/testString/clones/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -21539,7 +23291,7 @@ def test_delete_snapshot_clone_value_error(self):
"zone_name": zone_name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_snapshot_clone(**req_copy)
@@ -21552,7 +23304,8 @@ def test_delete_snapshot_clone_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_snapshot_clone_value_error()
-class TestGetSnapshotClone():
+
+class TestGetSnapshotClone:
"""
Test Class for get_snapshot_clone
"""
@@ -21565,11 +23318,13 @@ def test_get_snapshot_clone_all_params(self):
# Set up mock
url = preprocess_url('/snapshots/testString/clones/testString')
mock_response = '{"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"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21579,7 +23334,7 @@ def test_get_snapshot_clone_all_params(self):
response = _service.get_snapshot_clone(
id,
zone_name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21603,11 +23358,13 @@ def test_get_snapshot_clone_value_error(self):
# Set up mock
url = preprocess_url('/snapshots/testString/clones/testString')
mock_response = '{"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"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21619,7 +23376,7 @@ def test_get_snapshot_clone_value_error(self):
"zone_name": zone_name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_snapshot_clone(**req_copy)
@@ -21632,7 +23389,8 @@ def test_get_snapshot_clone_value_error_with_retries(self):
_service.disable_retries()
self.test_get_snapshot_clone_value_error()
-class TestCreateSnapshotClone():
+
+class TestCreateSnapshotClone:
"""
Test Class for create_snapshot_clone
"""
@@ -21645,11 +23403,13 @@ def test_create_snapshot_clone_all_params(self):
# Set up mock
url = preprocess_url('/snapshots/testString/clones/testString')
mock_response = '{"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"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21659,7 +23419,7 @@ def test_create_snapshot_clone_all_params(self):
response = _service.create_snapshot_clone(
id,
zone_name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21683,11 +23443,13 @@ def test_create_snapshot_clone_value_error(self):
# Set up mock
url = preprocess_url('/snapshots/testString/clones/testString')
mock_response = '{"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"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -21699,7 +23461,7 @@ def test_create_snapshot_clone_value_error(self):
"zone_name": zone_name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_snapshot_clone(**req_copy)
@@ -21712,6 +23474,7 @@ def test_create_snapshot_clone_value_error_with_retries(self):
_service.disable_retries()
self.test_create_snapshot_clone_value_error()
+
# endregion
##############################################################################
# End of Service: Snapshots
@@ -21722,7 +23485,8 @@ def test_create_snapshot_clone_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -21767,7 +23531,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListRegions():
+
+class TestListRegions:
"""
Test Class for list_regions
"""
@@ -21780,16 +23545,17 @@ def test_list_regions_all_params(self):
# Set up mock
url = preprocess_url('/regions')
mock_response = '{"regions": [{"endpoint": "endpoint", "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south", "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_regions()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -21811,17 +23577,19 @@ def test_list_regions_value_error(self):
# Set up mock
url = preprocess_url('/regions')
mock_response = '{"regions": [{"endpoint": "endpoint", "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south", "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_regions(**req_copy)
@@ -21834,7 +23602,8 @@ def test_list_regions_value_error_with_retries(self):
_service.disable_retries()
self.test_list_regions_value_error()
-class TestGetRegion():
+
+class TestGetRegion:
"""
Test Class for get_region
"""
@@ -21847,11 +23616,13 @@ def test_get_region_all_params(self):
# Set up mock
url = preprocess_url('/regions/testString')
mock_response = '{"endpoint": "endpoint", "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south", "status": "available"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -21859,7 +23630,7 @@ def test_get_region_all_params(self):
# Invoke method
response = _service.get_region(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21883,11 +23654,13 @@ def test_get_region_value_error(self):
# Set up mock
url = preprocess_url('/regions/testString')
mock_response = '{"endpoint": "endpoint", "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south", "status": "available"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -21897,7 +23670,7 @@ def test_get_region_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_region(**req_copy)
@@ -21910,7 +23683,8 @@ def test_get_region_value_error_with_retries(self):
_service.disable_retries()
self.test_get_region_value_error()
-class TestListRegionZones():
+
+class TestListRegionZones:
"""
Test Class for list_region_zones
"""
@@ -21923,11 +23697,13 @@ def test_list_region_zones_all_params(self):
# Set up mock
url = preprocess_url('/regions/testString/zones')
mock_response = '{"zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1", "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}, "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
region_name = 'testString'
@@ -21935,7 +23711,7 @@ def test_list_region_zones_all_params(self):
# Invoke method
response = _service.list_region_zones(
region_name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -21959,11 +23735,13 @@ def test_list_region_zones_value_error(self):
# Set up mock
url = preprocess_url('/regions/testString/zones')
mock_response = '{"zones": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1", "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}, "status": "available"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
region_name = 'testString'
@@ -21973,7 +23751,7 @@ def test_list_region_zones_value_error(self):
"region_name": region_name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_region_zones(**req_copy)
@@ -21986,7 +23764,8 @@ def test_list_region_zones_value_error_with_retries(self):
_service.disable_retries()
self.test_list_region_zones_value_error()
-class TestGetRegionZone():
+
+class TestGetRegionZone:
"""
Test Class for get_region_zone
"""
@@ -21999,11 +23778,13 @@ def test_get_region_zone_all_params(self):
# Set up mock
url = preprocess_url('/regions/testString/zones/testString')
mock_response = '{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1", "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}, "status": "available"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
region_name = 'testString'
@@ -22013,7 +23794,7 @@ def test_get_region_zone_all_params(self):
response = _service.get_region_zone(
region_name,
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -22037,11 +23818,13 @@ def test_get_region_zone_value_error(self):
# Set up mock
url = preprocess_url('/regions/testString/zones/testString')
mock_response = '{"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1", "region": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south", "name": "us-south"}, "status": "available"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
region_name = 'testString'
@@ -22053,7 +23836,7 @@ def test_get_region_zone_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_region_zone(**req_copy)
@@ -22066,6 +23849,7 @@ def test_get_region_zone_value_error_with_retries(self):
_service.disable_retries()
self.test_get_region_zone_value_error()
+
# endregion
##############################################################################
# End of Service: Geography
@@ -22076,7 +23860,8 @@ def test_get_region_zone_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -22121,7 +23906,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListPublicGateways():
+
+class TestListPublicGateways:
"""
Test Class for list_public_gateways
"""
@@ -22134,11 +23920,13 @@ def test_list_public_gateways_all_params(self):
# Set up mock
url = preprocess_url('/public_gateways')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -22150,14 +23938,14 @@ def test_list_public_gateways_all_params(self):
start=start,
limit=limit,
resource_group_id=resource_group_id,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -22180,16 +23968,17 @@ def test_list_public_gateways_required_params(self):
# Set up mock
url = preprocess_url('/public_gateways')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_public_gateways()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -22211,17 +24000,19 @@ def test_list_public_gateways_value_error(self):
# Set up mock
url = preprocess_url('/public_gateways')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "public_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_public_gateways(**req_copy)
@@ -22243,16 +24034,20 @@ def test_list_public_gateways_with_pager_get_next(self):
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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -22276,16 +24071,20 @@ def test_list_public_gateways_with_pager_get_all(self):
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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241","floating_ip":{"address":"203.0.113.1","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip"},"href":"https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = PublicGatewaysPager(
@@ -22297,7 +24096,8 @@ def test_list_public_gateways_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreatePublicGateway():
+
+class TestCreatePublicGateway:
"""
Test Class for create_public_gateway
"""
@@ -22310,11 +24110,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VPCIdentityById model
vpc_identity_model = {}
@@ -22346,7 +24148,7 @@ def test_create_public_gateway_all_params(self):
floating_ip=floating_ip,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -22377,11 +24179,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VPCIdentityById model
vpc_identity_model = {}
@@ -22412,7 +24216,7 @@ def test_create_public_gateway_value_error(self):
"zone": zone,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_public_gateway(**req_copy)
@@ -22425,7 +24229,8 @@ def test_create_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_create_public_gateway_value_error()
-class TestDeletePublicGateway():
+
+class TestDeletePublicGateway:
"""
Test Class for delete_public_gateway
"""
@@ -22437,9 +24242,11 @@ def test_delete_public_gateway_all_params(self):
"""
# Set up mock
url = preprocess_url('/public_gateways/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -22447,7 +24254,7 @@ def test_delete_public_gateway_all_params(self):
# Invoke method
response = _service.delete_public_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -22470,9 +24277,11 @@ def test_delete_public_gateway_value_error(self):
"""
# Set up mock
url = preprocess_url('/public_gateways/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -22482,7 +24291,7 @@ def test_delete_public_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_public_gateway(**req_copy)
@@ -22495,7 +24304,8 @@ def test_delete_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_public_gateway_value_error()
-class TestGetPublicGateway():
+
+class TestGetPublicGateway:
"""
Test Class for get_public_gateway
"""
@@ -22508,11 +24318,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -22520,7 +24332,7 @@ def test_get_public_gateway_all_params(self):
# Invoke method
response = _service.get_public_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -22544,11 +24356,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -22558,7 +24372,7 @@ def test_get_public_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_public_gateway(**req_copy)
@@ -22571,7 +24385,8 @@ def test_get_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_get_public_gateway_value_error()
-class TestUpdatePublicGateway():
+
+class TestUpdatePublicGateway:
"""
Test Class for update_public_gateway
"""
@@ -22584,11 +24399,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a PublicGatewayPatch model
public_gateway_patch_model = {}
@@ -22602,7 +24419,7 @@ def test_update_public_gateway_all_params(self):
response = _service.update_public_gateway(
id,
public_gateway_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -22629,11 +24446,13 @@ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241", "floating_ip": {"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/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/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "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,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a PublicGatewayPatch model
public_gateway_patch_model = {}
@@ -22649,7 +24468,7 @@ def test_update_public_gateway_value_error(self):
"public_gateway_patch": public_gateway_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_public_gateway(**req_copy)
@@ -22662,6 +24481,7 @@ def test_update_public_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_update_public_gateway_value_error()
+
# endregion
##############################################################################
# End of Service: PublicGateways
@@ -22672,7 +24492,8 @@ def test_update_public_gateway_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -22717,7 +24538,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListFloatingIps():
+
+class TestListFloatingIps:
"""
Test Class for list_floating_ips
"""
@@ -22730,11 +24552,13 @@ def test_list_floating_ips_all_params(self):
# Set up mock
url = preprocess_url('/floating_ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -22748,14 +24572,14 @@ def test_list_floating_ips_all_params(self):
limit=limit,
resource_group_id=resource_group_id,
sort=sort,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -22779,16 +24603,17 @@ def test_list_floating_ips_required_params(self):
# Set up mock
url = preprocess_url('/floating_ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_floating_ips()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -22810,17 +24635,19 @@ def test_list_floating_ips_value_error(self):
# Set up mock
url = preprocess_url('/floating_ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20"}, "floating_ips": [{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_floating_ips(**req_copy)
@@ -22842,16 +24669,20 @@ def test_list_floating_ips_with_pager_get_next(self):
url = preprocess_url('/floating_ips')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
mock_response2 = '{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -22876,16 +24707,20 @@ def test_list_floating_ips_with_pager_get_all(self):
url = preprocess_url('/floating_ips')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
mock_response2 = '{"total_count":2,"limit":1,"floating_ips":[{"address":"203.0.113.1","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689","href":"https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689","id":"39300233-9995-4806-89a5-3c1b6eb88689","name":"my-floating-ip","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"status":"available","target":{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"},"resource_type":"network_interface"},"zone":{"href":"https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1","name":"us-south-1"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = FloatingIpsPager(
@@ -22898,7 +24733,8 @@ def test_list_floating_ips_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateFloatingIp():
+
+class TestCreateFloatingIp:
"""
Test Class for create_floating_ip
"""
@@ -22911,11 +24747,13 @@ def test_create_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/floating_ips')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -22937,7 +24775,7 @@ def test_create_floating_ip_all_params(self):
# Invoke method
response = _service.create_floating_ip(
floating_ip_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -22964,11 +24802,13 @@ def test_create_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/floating_ips')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -22992,7 +24832,7 @@ def test_create_floating_ip_value_error(self):
"floating_ip_prototype": floating_ip_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_floating_ip(**req_copy)
@@ -23005,7 +24845,8 @@ def test_create_floating_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_create_floating_ip_value_error()
-class TestDeleteFloatingIp():
+
+class TestDeleteFloatingIp:
"""
Test Class for delete_floating_ip
"""
@@ -23017,9 +24858,11 @@ def test_delete_floating_ip_all_params(self):
"""
# Set up mock
url = preprocess_url('/floating_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -23027,7 +24870,7 @@ def test_delete_floating_ip_all_params(self):
# Invoke method
response = _service.delete_floating_ip(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23050,9 +24893,11 @@ def test_delete_floating_ip_value_error(self):
"""
# Set up mock
url = preprocess_url('/floating_ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -23062,7 +24907,7 @@ def test_delete_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_floating_ip(**req_copy)
@@ -23075,7 +24920,8 @@ def test_delete_floating_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_floating_ip_value_error()
-class TestGetFloatingIp():
+
+class TestGetFloatingIp:
"""
Test Class for get_floating_ip
"""
@@ -23088,11 +24934,13 @@ def test_get_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -23100,7 +24948,7 @@ def test_get_floating_ip_all_params(self):
# Invoke method
response = _service.get_floating_ip(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23124,11 +24972,13 @@ def test_get_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -23138,7 +24988,7 @@ def test_get_floating_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_floating_ip(**req_copy)
@@ -23151,7 +25001,8 @@ def test_get_floating_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_get_floating_ip_value_error()
-class TestUpdateFloatingIp():
+
+class TestUpdateFloatingIp:
"""
Test Class for update_floating_ip
"""
@@ -23164,13 +25015,15 @@ def test_update_floating_ip_all_params(self):
# Set up mock
url = preprocess_url('/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
- # Construct a dict representation of a FloatingIPTargetPatchNetworkInterfaceIdentityById model
+ # Construct a dict representation of a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById model
floating_ip_target_patch_model = {}
floating_ip_target_patch_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -23187,7 +25040,7 @@ def test_update_floating_ip_all_params(self):
response = _service.update_floating_ip(
id,
floating_ip_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23214,13 +25067,15 @@ def test_update_floating_ip_value_error(self):
# Set up mock
url = preprocess_url('/floating_ips/testString')
mock_response = '{"address": "203.0.113.1", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "target": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}, "resource_type": "network_interface"}, "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
- # Construct a dict representation of a FloatingIPTargetPatchNetworkInterfaceIdentityById model
+ # Construct a dict representation of a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById model
floating_ip_target_patch_model = {}
floating_ip_target_patch_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -23239,7 +25094,7 @@ def test_update_floating_ip_value_error(self):
"floating_ip_patch": floating_ip_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_floating_ip(**req_copy)
@@ -23252,6 +25107,7 @@ def test_update_floating_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_update_floating_ip_value_error()
+
# endregion
##############################################################################
# End of Service: FloatingIPs
@@ -23262,7 +25118,8 @@ def test_update_floating_ip_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -23307,7 +25164,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListNetworkAcls():
+
+class TestListNetworkAcls:
"""
Test Class for list_network_acls
"""
@@ -23320,11 +25178,13 @@ def test_list_network_acls_all_params(self):
# Set up mock
url = preprocess_url('/network_acls')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -23336,14 +25196,14 @@ def test_list_network_acls_all_params(self):
start=start,
limit=limit,
resource_group_id=resource_group_id,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -23366,16 +25226,17 @@ def test_list_network_acls_required_params(self):
# Set up mock
url = preprocess_url('/network_acls')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_network_acls()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -23397,17 +25258,19 @@ def test_list_network_acls_value_error(self):
# Set up mock
url = preprocess_url('/network_acls')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20"}, "limit": 20, "network_acls": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_network_acls(**req_copy)
@@ -23429,16 +25292,20 @@ def test_list_network_acls_with_pager_get_next(self):
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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = []
@@ -23462,16 +25329,20 @@ def test_list_network_acls_with_pager_get_all(self):
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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf","href":"https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf","id":"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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = NetworkAclsPager(
@@ -23483,7 +25354,8 @@ def test_list_network_acls_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateNetworkAcl():
+
+class TestCreateNetworkAcl:
"""
Test Class for create_network_acl
"""
@@ -23496,11 +25368,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -23536,8 +25410,8 @@ def test_create_network_acl_all_params(self):
# Invoke method
response = _service.create_network_acl(
- network_acl_prototype=network_acl_prototype,
- headers={}
+ network_acl_prototype,
+ headers={},
)
# Check for correct operation
@@ -23557,55 +25431,59 @@ def test_create_network_acl_all_params_with_retries(self):
self.test_create_network_acl_all_params()
@responses.activate
- def test_create_network_acl_required_params(self):
+ def test_create_network_acl_value_error(self):
"""
- test_create_network_acl_required_params()
+ test_create_network_acl_value_error()
"""
# 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
-
- # Invoke method
- response = _service.create_network_acl()
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
+ # Construct a dict representation of a ResourceGroupIdentityById model
+ resource_group_identity_model = {}
+ resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- # Check for correct operation
- assert len(responses.calls) == 1
- assert response.status_code == 201
+ # Construct a dict representation of a VPCIdentityById model
+ vpc_identity_model = {}
+ vpc_identity_model['id'] = 'f0aae929-7047-46d1-92e1-9102b07a7f6f'
- def test_create_network_acl_required_params_with_retries(self):
- # Enable retries and run test_create_network_acl_required_params.
- _service.enable_retries()
- self.test_create_network_acl_required_params()
+ # Construct a dict representation of a NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype model
+ network_acl_rule_prototype_network_acl_context_model = {}
+ network_acl_rule_prototype_network_acl_context_model['action'] = 'allow'
+ network_acl_rule_prototype_network_acl_context_model['destination'] = '192.168.3.2/32'
+ network_acl_rule_prototype_network_acl_context_model['direction'] = 'inbound'
+ network_acl_rule_prototype_network_acl_context_model['ip_version'] = 'ipv4'
+ network_acl_rule_prototype_network_acl_context_model['name'] = 'my-rule-2'
+ network_acl_rule_prototype_network_acl_context_model['source'] = '192.168.3.2/32'
+ network_acl_rule_prototype_network_acl_context_model['destination_port_max'] = 22
+ network_acl_rule_prototype_network_acl_context_model['destination_port_min'] = 22
+ network_acl_rule_prototype_network_acl_context_model['protocol'] = 'udp'
+ network_acl_rule_prototype_network_acl_context_model['source_port_max'] = 65535
+ network_acl_rule_prototype_network_acl_context_model['source_port_min'] = 49152
- # Disable retries and run test_create_network_acl_required_params.
- _service.disable_retries()
- self.test_create_network_acl_required_params()
+ # Construct a dict representation of a NetworkACLPrototypeNetworkACLByRules model
+ network_acl_prototype_model = {}
+ network_acl_prototype_model['name'] = 'my-network-acl'
+ network_acl_prototype_model['resource_group'] = resource_group_identity_model
+ network_acl_prototype_model['vpc'] = vpc_identity_model
+ network_acl_prototype_model['rules'] = [network_acl_rule_prototype_network_acl_context_model]
- @responses.activate
- def test_create_network_acl_value_error(self):
- """
- test_create_network_acl_value_error()
- """
- # 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ # Set up parameter values
+ network_acl_prototype = network_acl_prototype_model
# Pass in all but one required param and check for a ValueError
req_param_dict = {
+ "network_acl_prototype": network_acl_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_network_acl(**req_copy)
@@ -23618,7 +25496,8 @@ def test_create_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_create_network_acl_value_error()
-class TestDeleteNetworkAcl():
+
+class TestDeleteNetworkAcl:
"""
Test Class for delete_network_acl
"""
@@ -23630,9 +25509,11 @@ def test_delete_network_acl_all_params(self):
"""
# Set up mock
url = preprocess_url('/network_acls/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -23640,7 +25521,7 @@ def test_delete_network_acl_all_params(self):
# Invoke method
response = _service.delete_network_acl(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23663,9 +25544,11 @@ def test_delete_network_acl_value_error(self):
"""
# Set up mock
url = preprocess_url('/network_acls/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -23675,7 +25558,7 @@ def test_delete_network_acl_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_network_acl(**req_copy)
@@ -23688,7 +25571,8 @@ def test_delete_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_network_acl_value_error()
-class TestGetNetworkAcl():
+
+class TestGetNetworkAcl:
"""
Test Class for get_network_acl
"""
@@ -23701,11 +25585,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -23713,7 +25599,7 @@ def test_get_network_acl_all_params(self):
# Invoke method
response = _service.get_network_acl(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23737,11 +25623,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -23751,7 +25639,7 @@ def test_get_network_acl_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_network_acl(**req_copy)
@@ -23764,7 +25652,8 @@ def test_get_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_get_network_acl_value_error()
-class TestUpdateNetworkAcl():
+
+class TestUpdateNetworkAcl:
"""
Test Class for update_network_acl
"""
@@ -23777,11 +25666,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkACLPatch model
network_acl_patch_model = {}
@@ -23795,7 +25686,7 @@ def test_update_network_acl_all_params(self):
response = _service.update_network_acl(
id,
network_acl_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23822,11 +25713,13 @@ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf", "id": "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/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkACLPatch model
network_acl_patch_model = {}
@@ -23842,7 +25735,7 @@ def test_update_network_acl_value_error(self):
"network_acl_patch": network_acl_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_network_acl(**req_copy)
@@ -23855,7 +25748,8 @@ def test_update_network_acl_value_error_with_retries(self):
_service.disable_retries()
self.test_update_network_acl_value_error()
-class TestListNetworkAclRules():
+
+class TestListNetworkAclRules:
"""
Test Class for list_network_acl_rules
"""
@@ -23868,11 +25762,13 @@ def test_list_network_acl_rules_all_params(self):
# Set up mock
url = preprocess_url('/network_acls/testString/rules')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -23886,14 +25782,14 @@ def test_list_network_acl_rules_all_params(self):
start=start,
limit=limit,
direction=direction,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -23916,11 +25812,13 @@ def test_list_network_acl_rules_required_params(self):
# Set up mock
url = preprocess_url('/network_acls/testString/rules')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -23928,7 +25826,7 @@ def test_list_network_acl_rules_required_params(self):
# Invoke method
response = _service.list_network_acl_rules(
network_acl_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -23952,11 +25850,13 @@ def test_list_network_acl_rules_value_error(self):
# Set up mock
url = preprocess_url('/network_acls/testString/rules')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -23966,7 +25866,7 @@ def test_list_network_acl_rules_value_error(self):
"network_acl_id": network_acl_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_network_acl_rules(**req_copy)
@@ -23988,16 +25888,20 @@ def test_list_network_acl_rules_with_pager_get_next(self):
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}]}'
- 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)
+ 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 = []
@@ -24022,16 +25926,20 @@ def test_list_network_acl_rules_with_pager_get_all(self):
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}]}'
- 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)
+ 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 = NetworkAclRulesPager(
@@ -24044,7 +25952,8 @@ def test_list_network_acl_rules_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateNetworkAclRule():
+
+class TestCreateNetworkAclRule:
"""
Test Class for create_network_acl_rule
"""
@@ -24057,11 +25966,13 @@ 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}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model
network_acl_rule_before_prototype_model = {}
@@ -24090,7 +26001,7 @@ def test_create_network_acl_rule_all_params(self):
response = _service.create_network_acl_rule(
network_acl_id,
network_acl_rule_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24117,11 +26028,13 @@ 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}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById model
network_acl_rule_before_prototype_model = {}
@@ -24152,7 +26065,7 @@ def test_create_network_acl_rule_value_error(self):
"network_acl_rule_prototype": network_acl_rule_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_network_acl_rule(**req_copy)
@@ -24165,7 +26078,8 @@ def test_create_network_acl_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_create_network_acl_rule_value_error()
-class TestDeleteNetworkAclRule():
+
+class TestDeleteNetworkAclRule:
"""
Test Class for delete_network_acl_rule
"""
@@ -24177,9 +26091,11 @@ def test_delete_network_acl_rule_all_params(self):
"""
# Set up mock
url = preprocess_url('/network_acls/testString/rules/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -24189,7 +26105,7 @@ def test_delete_network_acl_rule_all_params(self):
response = _service.delete_network_acl_rule(
network_acl_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24212,9 +26128,11 @@ def test_delete_network_acl_rule_value_error(self):
"""
# Set up mock
url = preprocess_url('/network_acls/testString/rules/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -24226,7 +26144,7 @@ def test_delete_network_acl_rule_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_network_acl_rule(**req_copy)
@@ -24239,7 +26157,8 @@ def test_delete_network_acl_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_network_acl_rule_value_error()
-class TestGetNetworkAclRule():
+
+class TestGetNetworkAclRule:
"""
Test Class for get_network_acl_rule
"""
@@ -24252,11 +26171,13 @@ 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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -24266,7 +26187,7 @@ def test_get_network_acl_rule_all_params(self):
response = _service.get_network_acl_rule(
network_acl_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24290,11 +26211,13 @@ 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}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
network_acl_id = 'testString'
@@ -24306,7 +26229,7 @@ def test_get_network_acl_rule_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_network_acl_rule(**req_copy)
@@ -24319,7 +26242,8 @@ def test_get_network_acl_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_get_network_acl_rule_value_error()
-class TestUpdateNetworkAclRule():
+
+class TestUpdateNetworkAclRule:
"""
Test Class for update_network_acl_rule
"""
@@ -24332,11 +26256,13 @@ 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}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model
network_acl_rule_before_patch_model = {}
@@ -24368,7 +26294,7 @@ def test_update_network_acl_rule_all_params(self):
network_acl_id,
id,
network_acl_rule_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24395,11 +26321,13 @@ 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}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a NetworkACLRuleBeforePatchNetworkACLRuleIdentityById model
network_acl_rule_before_patch_model = {}
@@ -24433,7 +26361,7 @@ def test_update_network_acl_rule_value_error(self):
"network_acl_rule_patch": network_acl_rule_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_network_acl_rule(**req_copy)
@@ -24446,6 +26374,7 @@ def test_update_network_acl_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_update_network_acl_rule_value_error()
+
# endregion
##############################################################################
# End of Service: NetworkACLs
@@ -24456,7 +26385,8 @@ def test_update_network_acl_rule_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -24501,7 +26431,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListSecurityGroups():
+
+class TestListSecurityGroups:
"""
Test Class for list_security_groups
"""
@@ -24514,11 +26445,13 @@ def test_list_security_groups_all_params(self):
# Set up mock
url = preprocess_url('/security_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -24536,14 +26469,14 @@ def test_list_security_groups_all_params(self):
vpc_id=vpc_id,
vpc_crn=vpc_crn,
vpc_name=vpc_name,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -24569,16 +26502,17 @@ def test_list_security_groups_required_params(self):
# Set up mock
url = preprocess_url('/security_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_security_groups()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -24600,17 +26534,19 @@ def test_list_security_groups_value_error(self):
# Set up mock
url = preprocess_url('/security_groups')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_security_groups(**req_copy)
@@ -24632,16 +26568,20 @@ def test_list_security_groups_with_pager_get_next(self):
url = preprocess_url('/security_groups')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}'
mock_response2 = '{"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = []
@@ -24668,16 +26608,20 @@ def test_list_security_groups_with_pager_get_all(self):
url = preprocess_url('/security_groups')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}'
mock_response2 = '{"security_groups":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"rules":[{"direction":"inbound","href":"https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a","id":"6f2a6efe-21e2-401c-b237-620aa26ba16a","ip_version":"ipv4","remote":{"address":"192.168.3.4"},"protocol":"all"}],"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = SecurityGroupsPager(
@@ -24692,7 +26636,8 @@ def test_list_security_groups_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateSecurityGroup():
+
+class TestCreateSecurityGroup:
"""
Test Class for create_security_group
"""
@@ -24705,11 +26650,13 @@ def test_create_security_group_all_params(self):
# Set up mock
url = preprocess_url('/security_groups')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VPCIdentityById model
vpc_identity_model = {}
@@ -24742,7 +26689,7 @@ def test_create_security_group_all_params(self):
name=name,
resource_group=resource_group,
rules=rules,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24772,11 +26719,13 @@ def test_create_security_group_value_error(self):
# Set up mock
url = preprocess_url('/security_groups')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VPCIdentityById model
vpc_identity_model = {}
@@ -24808,7 +26757,7 @@ def test_create_security_group_value_error(self):
"vpc": vpc,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_security_group(**req_copy)
@@ -24821,7 +26770,8 @@ def test_create_security_group_value_error_with_retries(self):
_service.disable_retries()
self.test_create_security_group_value_error()
-class TestDeleteSecurityGroup():
+
+class TestDeleteSecurityGroup:
"""
Test Class for delete_security_group
"""
@@ -24833,9 +26783,11 @@ def test_delete_security_group_all_params(self):
"""
# Set up mock
url = preprocess_url('/security_groups/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -24843,7 +26795,7 @@ def test_delete_security_group_all_params(self):
# Invoke method
response = _service.delete_security_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24866,9 +26818,11 @@ def test_delete_security_group_value_error(self):
"""
# Set up mock
url = preprocess_url('/security_groups/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -24878,7 +26832,7 @@ def test_delete_security_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_security_group(**req_copy)
@@ -24891,7 +26845,8 @@ def test_delete_security_group_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_security_group_value_error()
-class TestGetSecurityGroup():
+
+class TestGetSecurityGroup:
"""
Test Class for get_security_group
"""
@@ -24904,11 +26859,13 @@ def test_get_security_group_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -24916,7 +26873,7 @@ def test_get_security_group_all_params(self):
# Invoke method
response = _service.get_security_group(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -24940,11 +26897,13 @@ def test_get_security_group_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -24954,7 +26913,7 @@ def test_get_security_group_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_security_group(**req_copy)
@@ -24967,7 +26926,8 @@ def test_get_security_group_value_error_with_retries(self):
_service.disable_retries()
self.test_get_security_group_value_error()
-class TestUpdateSecurityGroup():
+
+class TestUpdateSecurityGroup:
"""
Test Class for update_security_group
"""
@@ -24980,11 +26940,13 @@ def test_update_security_group_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SecurityGroupPatch model
security_group_patch_model = {}
@@ -24998,7 +26960,7 @@ def test_update_security_group_all_params(self):
response = _service.update_security_group(
id,
security_group_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25025,11 +26987,13 @@ def test_update_security_group_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SecurityGroupPatch model
security_group_patch_model = {}
@@ -25045,7 +27009,7 @@ def test_update_security_group_value_error(self):
"security_group_patch": security_group_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_security_group(**req_copy)
@@ -25058,7 +27022,8 @@ def test_update_security_group_value_error_with_retries(self):
_service.disable_retries()
self.test_update_security_group_value_error()
-class TestListSecurityGroupRules():
+
+class TestListSecurityGroupRules:
"""
Test Class for list_security_group_rules
"""
@@ -25071,11 +27036,13 @@ def test_list_security_group_rules_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules')
mock_response = '{"rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25083,7 +27050,7 @@ def test_list_security_group_rules_all_params(self):
# Invoke method
response = _service.list_security_group_rules(
security_group_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25107,11 +27074,13 @@ def test_list_security_group_rules_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules')
mock_response = '{"rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25121,7 +27090,7 @@ def test_list_security_group_rules_value_error(self):
"security_group_id": security_group_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_security_group_rules(**req_copy)
@@ -25134,7 +27103,8 @@ def test_list_security_group_rules_value_error_with_retries(self):
_service.disable_retries()
self.test_list_security_group_rules_value_error()
-class TestCreateSecurityGroupRule():
+
+class TestCreateSecurityGroupRule:
"""
Test Class for create_security_group_rule
"""
@@ -25147,11 +27117,13 @@ def test_create_security_group_rule_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules')
mock_response = '{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a SecurityGroupRuleRemotePrototypeIP model
security_group_rule_remote_prototype_model = {}
@@ -25172,7 +27144,7 @@ def test_create_security_group_rule_all_params(self):
response = _service.create_security_group_rule(
security_group_id,
security_group_rule_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25199,11 +27171,13 @@ def test_create_security_group_rule_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules')
mock_response = '{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a SecurityGroupRuleRemotePrototypeIP model
security_group_rule_remote_prototype_model = {}
@@ -25226,7 +27200,7 @@ def test_create_security_group_rule_value_error(self):
"security_group_rule_prototype": security_group_rule_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_security_group_rule(**req_copy)
@@ -25239,7 +27213,8 @@ def test_create_security_group_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_create_security_group_rule_value_error()
-class TestDeleteSecurityGroupRule():
+
+class TestDeleteSecurityGroupRule:
"""
Test Class for delete_security_group_rule
"""
@@ -25251,9 +27226,11 @@ def test_delete_security_group_rule_all_params(self):
"""
# Set up mock
url = preprocess_url('/security_groups/testString/rules/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25263,7 +27240,7 @@ def test_delete_security_group_rule_all_params(self):
response = _service.delete_security_group_rule(
security_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25286,9 +27263,11 @@ def test_delete_security_group_rule_value_error(self):
"""
# Set up mock
url = preprocess_url('/security_groups/testString/rules/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25300,7 +27279,7 @@ def test_delete_security_group_rule_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_security_group_rule(**req_copy)
@@ -25313,7 +27292,8 @@ def test_delete_security_group_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_security_group_rule_value_error()
-class TestGetSecurityGroupRule():
+
+class TestGetSecurityGroupRule:
"""
Test Class for get_security_group_rule
"""
@@ -25326,11 +27306,13 @@ def test_get_security_group_rule_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules/testString')
mock_response = '{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25340,7 +27322,7 @@ def test_get_security_group_rule_all_params(self):
response = _service.get_security_group_rule(
security_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25364,11 +27346,13 @@ def test_get_security_group_rule_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules/testString')
mock_response = '{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25380,7 +27364,7 @@ def test_get_security_group_rule_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_security_group_rule(**req_copy)
@@ -25393,7 +27377,8 @@ def test_get_security_group_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_get_security_group_rule_value_error()
-class TestUpdateSecurityGroupRule():
+
+class TestUpdateSecurityGroupRule:
"""
Test Class for update_security_group_rule
"""
@@ -25406,11 +27391,13 @@ def test_update_security_group_rule_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules/testString')
mock_response = '{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SecurityGroupRuleRemotePatchIP model
security_group_rule_remote_patch_model = {}
@@ -25436,7 +27423,7 @@ def test_update_security_group_rule_all_params(self):
security_group_id,
id,
security_group_rule_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25463,11 +27450,13 @@ def test_update_security_group_rule_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/rules/testString')
mock_response = '{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a SecurityGroupRuleRemotePatchIP model
security_group_rule_remote_patch_model = {}
@@ -25495,7 +27484,7 @@ def test_update_security_group_rule_value_error(self):
"security_group_rule_patch": security_group_rule_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_security_group_rule(**req_copy)
@@ -25508,7 +27497,8 @@ def test_update_security_group_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_update_security_group_rule_value_error()
-class TestListSecurityGroupTargets():
+
+class TestListSecurityGroupTargets:
"""
Test Class for list_security_group_targets
"""
@@ -25521,11 +27511,13 @@ def test_list_security_group_targets_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25537,14 +27529,14 @@ def test_list_security_group_targets_all_params(self):
security_group_id,
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -25566,11 +27558,13 @@ def test_list_security_group_targets_required_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25578,7 +27572,7 @@ def test_list_security_group_targets_required_params(self):
# Invoke method
response = _service.list_security_group_targets(
security_group_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25602,11 +27596,13 @@ def test_list_security_group_targets_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25616,7 +27612,7 @@ def test_list_security_group_targets_value_error(self):
"security_group_id": security_group_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_security_group_targets(**req_copy)
@@ -25638,16 +27634,20 @@ def test_list_security_group_targets_with_pager_get_next(self):
url = preprocess_url('/security_groups/testString/targets')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}]}'
mock_response2 = '{"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}]}'
- 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)
+ 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 = []
@@ -25671,16 +27671,20 @@ def test_list_security_group_targets_with_pager_get_all(self):
url = preprocess_url('/security_groups/testString/targets')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}]}'
mock_response2 = '{"total_count":2,"limit":1,"targets":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"}]}'
- 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)
+ 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 = SecurityGroupTargetsPager(
@@ -25692,7 +27696,8 @@ def test_list_security_group_targets_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestDeleteSecurityGroupTargetBinding():
+
+class TestDeleteSecurityGroupTargetBinding:
"""
Test Class for delete_security_group_target_binding
"""
@@ -25704,9 +27709,11 @@ def test_delete_security_group_target_binding_all_params(self):
"""
# Set up mock
url = preprocess_url('/security_groups/testString/targets/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25716,7 +27723,7 @@ def test_delete_security_group_target_binding_all_params(self):
response = _service.delete_security_group_target_binding(
security_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25739,9 +27746,11 @@ def test_delete_security_group_target_binding_value_error(self):
"""
# Set up mock
url = preprocess_url('/security_groups/testString/targets/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25753,7 +27762,7 @@ def test_delete_security_group_target_binding_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_security_group_target_binding(**req_copy)
@@ -25766,7 +27775,8 @@ def test_delete_security_group_target_binding_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_security_group_target_binding_value_error()
-class TestGetSecurityGroupTarget():
+
+class TestGetSecurityGroupTarget:
"""
Test Class for get_security_group_target
"""
@@ -25779,11 +27789,13 @@ def test_get_security_group_target_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets/testString')
mock_response = '{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25793,7 +27805,7 @@ def test_get_security_group_target_all_params(self):
response = _service.get_security_group_target(
security_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25817,11 +27829,13 @@ def test_get_security_group_target_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets/testString')
mock_response = '{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25833,7 +27847,7 @@ def test_get_security_group_target_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_security_group_target(**req_copy)
@@ -25846,7 +27860,8 @@ def test_get_security_group_target_value_error_with_retries(self):
_service.disable_retries()
self.test_get_security_group_target_value_error()
-class TestCreateSecurityGroupTargetBinding():
+
+class TestCreateSecurityGroupTargetBinding:
"""
Test Class for create_security_group_target_binding
"""
@@ -25859,11 +27874,13 @@ def test_create_security_group_target_binding_all_params(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets/testString')
mock_response = '{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25873,7 +27890,7 @@ def test_create_security_group_target_binding_all_params(self):
response = _service.create_security_group_target_binding(
security_group_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -25897,11 +27914,13 @@ def test_create_security_group_target_binding_value_error(self):
# Set up mock
url = preprocess_url('/security_groups/testString/targets/testString')
mock_response = '{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
security_group_id = 'testString'
@@ -25913,7 +27932,7 @@ def test_create_security_group_target_binding_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_security_group_target_binding(**req_copy)
@@ -25926,6 +27945,7 @@ def test_create_security_group_target_binding_value_error_with_retries(self):
_service.disable_retries()
self.test_create_security_group_target_binding_value_error()
+
# endregion
##############################################################################
# End of Service: SecurityGroups
@@ -25936,7 +27956,8 @@ def test_create_security_group_target_binding_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -25981,7 +28002,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListIkePolicies():
+
+class TestListIkePolicies:
"""
Test Class for list_ike_policies
"""
@@ -25994,11 +28016,13 @@ def test_list_ike_policies_all_params(self):
# Set up mock
url = preprocess_url('/ike_policies')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20"}, "ike_policies": [{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -26008,14 +28032,14 @@ def test_list_ike_policies_all_params(self):
response = _service.list_ike_policies(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -26037,16 +28061,17 @@ def test_list_ike_policies_required_params(self):
# Set up mock
url = preprocess_url('/ike_policies')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20"}, "ike_policies": [{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_ike_policies()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -26068,17 +28093,19 @@ def test_list_ike_policies_value_error(self):
# Set up mock
url = preprocess_url('/ike_policies')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20"}, "ike_policies": [{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_ike_policies(**req_copy)
@@ -26100,16 +28127,20 @@ def test_list_ike_policies_with_pager_get_next(self):
url = preprocess_url('/ike_policies')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"ike_policies":[{"authentication_algorithm":"md5","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","dh_group":14,"encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","ike_version":1,"key_lifetime":28800,"name":"my-ike-policy","negotiation_mode":"main","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ike_policy"}],"limit":1}'
mock_response2 = '{"total_count":2,"ike_policies":[{"authentication_algorithm":"md5","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","dh_group":14,"encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","ike_version":1,"key_lifetime":28800,"name":"my-ike-policy","negotiation_mode":"main","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ike_policy"}],"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)
+ 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 = []
@@ -26132,16 +28163,20 @@ def test_list_ike_policies_with_pager_get_all(self):
url = preprocess_url('/ike_policies')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"ike_policies":[{"authentication_algorithm":"md5","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","dh_group":14,"encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","ike_version":1,"key_lifetime":28800,"name":"my-ike-policy","negotiation_mode":"main","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ike_policy"}],"limit":1}'
mock_response2 = '{"total_count":2,"ike_policies":[{"authentication_algorithm":"md5","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","dh_group":14,"encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","ike_version":1,"key_lifetime":28800,"name":"my-ike-policy","negotiation_mode":"main","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ike_policy"}],"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)
+ 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 = IkePoliciesPager(
@@ -26152,7 +28187,8 @@ def test_list_ike_policies_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateIkePolicy():
+
+class TestCreateIkePolicy:
"""
Test Class for create_ike_policy
"""
@@ -26165,11 +28201,13 @@ def test_create_ike_policy_all_params(self):
# Set up mock
url = preprocess_url('/ike_policies')
mock_response = '{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -26193,7 +28231,7 @@ def test_create_ike_policy_all_params(self):
key_lifetime=key_lifetime,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26226,11 +28264,13 @@ def test_create_ike_policy_value_error(self):
# Set up mock
url = preprocess_url('/ike_policies')
mock_response = '{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -26253,7 +28293,7 @@ def test_create_ike_policy_value_error(self):
"ike_version": ike_version,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_ike_policy(**req_copy)
@@ -26266,7 +28306,8 @@ def test_create_ike_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_create_ike_policy_value_error()
-class TestDeleteIkePolicy():
+
+class TestDeleteIkePolicy:
"""
Test Class for delete_ike_policy
"""
@@ -26278,9 +28319,11 @@ def test_delete_ike_policy_all_params(self):
"""
# Set up mock
url = preprocess_url('/ike_policies/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -26288,7 +28331,7 @@ def test_delete_ike_policy_all_params(self):
# Invoke method
response = _service.delete_ike_policy(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26311,9 +28354,11 @@ def test_delete_ike_policy_value_error(self):
"""
# Set up mock
url = preprocess_url('/ike_policies/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -26323,7 +28368,7 @@ def test_delete_ike_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_ike_policy(**req_copy)
@@ -26336,7 +28381,8 @@ def test_delete_ike_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_ike_policy_value_error()
-class TestGetIkePolicy():
+
+class TestGetIkePolicy:
"""
Test Class for get_ike_policy
"""
@@ -26349,11 +28395,13 @@ def test_get_ike_policy_all_params(self):
# Set up mock
url = preprocess_url('/ike_policies/testString')
mock_response = '{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -26361,7 +28409,7 @@ def test_get_ike_policy_all_params(self):
# Invoke method
response = _service.get_ike_policy(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26385,11 +28433,13 @@ def test_get_ike_policy_value_error(self):
# Set up mock
url = preprocess_url('/ike_policies/testString')
mock_response = '{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -26399,7 +28449,7 @@ def test_get_ike_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_ike_policy(**req_copy)
@@ -26412,7 +28462,8 @@ def test_get_ike_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_get_ike_policy_value_error()
-class TestUpdateIkePolicy():
+
+class TestUpdateIkePolicy:
"""
Test Class for update_ike_policy
"""
@@ -26425,11 +28476,13 @@ def test_update_ike_policy_all_params(self):
# Set up mock
url = preprocess_url('/ike_policies/testString')
mock_response = '{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a IKEPolicyPatch model
ike_policy_patch_model = {}
@@ -26448,7 +28501,7 @@ def test_update_ike_policy_all_params(self):
response = _service.update_ike_policy(
id,
ike_policy_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26475,11 +28528,13 @@ def test_update_ike_policy_value_error(self):
# Set up mock
url = preprocess_url('/ike_policies/testString')
mock_response = '{"authentication_algorithm": "md5", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "dh_group": 14, "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "ike_version": 1, "key_lifetime": 28800, "name": "my-ike-policy", "negotiation_mode": "main", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ike_policy"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a IKEPolicyPatch model
ike_policy_patch_model = {}
@@ -26500,7 +28555,7 @@ def test_update_ike_policy_value_error(self):
"ike_policy_patch": ike_policy_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_ike_policy(**req_copy)
@@ -26513,7 +28568,8 @@ def test_update_ike_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_update_ike_policy_value_error()
-class TestListIkePolicyConnections():
+
+class TestListIkePolicyConnections:
"""
Test Class for list_ike_policy_connections
"""
@@ -26526,11 +28582,13 @@ def test_list_ike_policy_connections_all_params(self):
# Set up mock
url = preprocess_url('/ike_policies/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -26538,7 +28596,7 @@ def test_list_ike_policy_connections_all_params(self):
# Invoke method
response = _service.list_ike_policy_connections(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26562,11 +28620,13 @@ def test_list_ike_policy_connections_value_error(self):
# Set up mock
url = preprocess_url('/ike_policies/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -26576,7 +28636,7 @@ def test_list_ike_policy_connections_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_ike_policy_connections(**req_copy)
@@ -26589,7 +28649,8 @@ def test_list_ike_policy_connections_value_error_with_retries(self):
_service.disable_retries()
self.test_list_ike_policy_connections_value_error()
-class TestListIpsecPolicies():
+
+class TestListIpsecPolicies:
"""
Test Class for list_ipsec_policies
"""
@@ -26602,11 +28663,13 @@ def test_list_ipsec_policies_all_params(self):
# Set up mock
url = preprocess_url('/ipsec_policies')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20"}, "ipsec_policies": [{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -26616,14 +28679,14 @@ def test_list_ipsec_policies_all_params(self):
response = _service.list_ipsec_policies(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -26645,16 +28708,17 @@ def test_list_ipsec_policies_required_params(self):
# Set up mock
url = preprocess_url('/ipsec_policies')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20"}, "ipsec_policies": [{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_ipsec_policies()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -26676,17 +28740,19 @@ def test_list_ipsec_policies_value_error(self):
# Set up mock
url = preprocess_url('/ipsec_policies')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20"}, "ipsec_policies": [{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_ipsec_policies(**req_copy)
@@ -26708,16 +28774,20 @@ def test_list_ipsec_policies_with_pager_get_next(self):
url = preprocess_url('/ipsec_policies')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"ipsec_policies":[{"authentication_algorithm":"disabled","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","encapsulation_mode":"tunnel","encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","key_lifetime":3600,"name":"my-ipsec-policy","pfs":"disabled","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ipsec_policy","transform_protocol":"esp"}],"total_count":2,"limit":1}'
mock_response2 = '{"ipsec_policies":[{"authentication_algorithm":"disabled","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","encapsulation_mode":"tunnel","encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","key_lifetime":3600,"name":"my-ipsec-policy","pfs":"disabled","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ipsec_policy","transform_protocol":"esp"}],"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)
+ 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 = []
@@ -26740,16 +28810,20 @@ def test_list_ipsec_policies_with_pager_get_all(self):
url = preprocess_url('/ipsec_policies')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"ipsec_policies":[{"authentication_algorithm":"disabled","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","encapsulation_mode":"tunnel","encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","key_lifetime":3600,"name":"my-ipsec-policy","pfs":"disabled","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ipsec_policy","transform_protocol":"esp"}],"total_count":2,"limit":1}'
mock_response2 = '{"ipsec_policies":[{"authentication_algorithm":"disabled","connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","encapsulation_mode":"tunnel","encryption_algorithm":"aes128","href":"https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","key_lifetime":3600,"name":"my-ipsec-policy","pfs":"disabled","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"ipsec_policy","transform_protocol":"esp"}],"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)
+ 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 = IpsecPoliciesPager(
@@ -26760,7 +28834,8 @@ def test_list_ipsec_policies_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateIpsecPolicy():
+
+class TestCreateIpsecPolicy:
"""
Test Class for create_ipsec_policy
"""
@@ -26773,11 +28848,13 @@ def test_create_ipsec_policy_all_params(self):
# Set up mock
url = preprocess_url('/ipsec_policies')
mock_response = '{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -26799,7 +28876,7 @@ def test_create_ipsec_policy_all_params(self):
key_lifetime=key_lifetime,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26831,11 +28908,13 @@ def test_create_ipsec_policy_value_error(self):
# Set up mock
url = preprocess_url('/ipsec_policies')
mock_response = '{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -26856,7 +28935,7 @@ def test_create_ipsec_policy_value_error(self):
"pfs": pfs,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_ipsec_policy(**req_copy)
@@ -26869,7 +28948,8 @@ def test_create_ipsec_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_create_ipsec_policy_value_error()
-class TestDeleteIpsecPolicy():
+
+class TestDeleteIpsecPolicy:
"""
Test Class for delete_ipsec_policy
"""
@@ -26881,9 +28961,11 @@ def test_delete_ipsec_policy_all_params(self):
"""
# Set up mock
url = preprocess_url('/ipsec_policies/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -26891,7 +28973,7 @@ def test_delete_ipsec_policy_all_params(self):
# Invoke method
response = _service.delete_ipsec_policy(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26914,9 +28996,11 @@ def test_delete_ipsec_policy_value_error(self):
"""
# Set up mock
url = preprocess_url('/ipsec_policies/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -26926,7 +29010,7 @@ def test_delete_ipsec_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_ipsec_policy(**req_copy)
@@ -26939,7 +29023,8 @@ def test_delete_ipsec_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_ipsec_policy_value_error()
-class TestGetIpsecPolicy():
+
+class TestGetIpsecPolicy:
"""
Test Class for get_ipsec_policy
"""
@@ -26952,11 +29037,13 @@ def test_get_ipsec_policy_all_params(self):
# Set up mock
url = preprocess_url('/ipsec_policies/testString')
mock_response = '{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -26964,7 +29051,7 @@ def test_get_ipsec_policy_all_params(self):
# Invoke method
response = _service.get_ipsec_policy(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -26988,11 +29075,13 @@ def test_get_ipsec_policy_value_error(self):
# Set up mock
url = preprocess_url('/ipsec_policies/testString')
mock_response = '{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -27002,7 +29091,7 @@ def test_get_ipsec_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_ipsec_policy(**req_copy)
@@ -27015,7 +29104,8 @@ def test_get_ipsec_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_get_ipsec_policy_value_error()
-class TestUpdateIpsecPolicy():
+
+class TestUpdateIpsecPolicy:
"""
Test Class for update_ipsec_policy
"""
@@ -27028,11 +29118,13 @@ def test_update_ipsec_policy_all_params(self):
# Set up mock
url = preprocess_url('/ipsec_policies/testString')
mock_response = '{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a IPsecPolicyPatch model
i_psec_policy_patch_model = {}
@@ -27050,7 +29142,7 @@ def test_update_ipsec_policy_all_params(self):
response = _service.update_ipsec_policy(
id,
i_psec_policy_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27077,11 +29169,13 @@ def test_update_ipsec_policy_value_error(self):
# Set up mock
url = preprocess_url('/ipsec_policies/testString')
mock_response = '{"authentication_algorithm": "disabled", "connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "encapsulation_mode": "tunnel", "encryption_algorithm": "aes128", "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "key_lifetime": 3600, "name": "my-ipsec-policy", "pfs": "disabled", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "ipsec_policy", "transform_protocol": "esp"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a IPsecPolicyPatch model
i_psec_policy_patch_model = {}
@@ -27101,7 +29195,7 @@ def test_update_ipsec_policy_value_error(self):
"i_psec_policy_patch": i_psec_policy_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_ipsec_policy(**req_copy)
@@ -27114,7 +29208,8 @@ def test_update_ipsec_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_update_ipsec_policy_value_error()
-class TestListIpsecPolicyConnections():
+
+class TestListIpsecPolicyConnections:
"""
Test Class for list_ipsec_policy_connections
"""
@@ -27127,11 +29222,13 @@ def test_list_ipsec_policy_connections_all_params(self):
# Set up mock
url = preprocess_url('/ipsec_policies/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -27139,7 +29236,7 @@ def test_list_ipsec_policy_connections_all_params(self):
# Invoke method
response = _service.list_ipsec_policy_connections(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27163,11 +29260,13 @@ def test_list_ipsec_policy_connections_value_error(self):
# Set up mock
url = preprocess_url('/ipsec_policies/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -27177,7 +29276,7 @@ def test_list_ipsec_policy_connections_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_ipsec_policy_connections(**req_copy)
@@ -27190,7 +29289,8 @@ def test_list_ipsec_policy_connections_value_error_with_retries(self):
_service.disable_retries()
self.test_list_ipsec_policy_connections_value_error()
-class TestListVpnGateways():
+
+class TestListVpnGateways:
"""
Test Class for list_vpn_gateways
"""
@@ -27203,11 +29303,13 @@ def test_list_vpn_gateways_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -27223,14 +29325,14 @@ def test_list_vpn_gateways_all_params(self):
resource_group_id=resource_group_id,
sort=sort,
mode=mode,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -27255,16 +29357,17 @@ def test_list_vpn_gateways_required_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_vpn_gateways()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -27286,17 +29389,19 @@ def test_list_vpn_gateways_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_gateways(**req_copy)
@@ -27318,16 +29423,20 @@ def test_list_vpn_gateways_with_pager_get_next(self):
url = preprocess_url('/vpn_gateways')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","members":[{"private_ip":{"address":"192.168.3.4"},"public_ip":{"address":"192.168.3.4"},"role":"active","status":"available"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}'
mock_response2 = '{"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","members":[{"private_ip":{"address":"192.168.3.4"},"public_ip":{"address":"192.168.3.4"},"role":"active","status":"available"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}'
- 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)
+ 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 = []
@@ -27353,16 +29462,20 @@ def test_list_vpn_gateways_with_pager_get_all(self):
url = preprocess_url('/vpn_gateways')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","members":[{"private_ip":{"address":"192.168.3.4"},"public_ip":{"address":"192.168.3.4"},"role":"active","status":"available"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}'
mock_response2 = '{"total_count":2,"limit":1,"vpn_gateways":[{"connections":[{"deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b","id":"a10a5771-dc23-442c-8460-c3601d8542f7","name":"my-vpn-connection","resource_type":"vpn_gateway_connection"}],"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b","id":"ddf51bec-3424-11e8-b467-0ed5f89f718b","members":[{"private_ip":{"address":"192.168.3.4"},"public_ip":{"address":"192.168.3.4"},"role":"active","status":"available"}],"name":"my-vpn-gateway","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_gateway","status":"available","subnet":{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"},"mode":"route"}]}'
- 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)
+ 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 = VpnGatewaysPager(
@@ -27376,7 +29489,8 @@ def test_list_vpn_gateways_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpnGateway():
+
+class TestCreateVpnGateway:
"""
Test Class for create_vpn_gateway
"""
@@ -27389,11 +29503,13 @@ def test_create_vpn_gateway_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways')
mock_response = '{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -27416,7 +29532,7 @@ def test_create_vpn_gateway_all_params(self):
# Invoke method
response = _service.create_vpn_gateway(
vpn_gateway_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27443,11 +29559,13 @@ def test_create_vpn_gateway_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways')
mock_response = '{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a ResourceGroupIdentityById model
resource_group_identity_model = {}
@@ -27472,7 +29590,7 @@ def test_create_vpn_gateway_value_error(self):
"vpn_gateway_prototype": vpn_gateway_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpn_gateway(**req_copy)
@@ -27485,7 +29603,8 @@ def test_create_vpn_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpn_gateway_value_error()
-class TestDeleteVpnGateway():
+
+class TestDeleteVpnGateway:
"""
Test Class for delete_vpn_gateway
"""
@@ -27497,9 +29616,11 @@ def test_delete_vpn_gateway_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -27507,7 +29628,7 @@ def test_delete_vpn_gateway_all_params(self):
# Invoke method
response = _service.delete_vpn_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27530,9 +29651,11 @@ def test_delete_vpn_gateway_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -27542,7 +29665,7 @@ def test_delete_vpn_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpn_gateway(**req_copy)
@@ -27555,7 +29678,8 @@ def test_delete_vpn_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpn_gateway_value_error()
-class TestGetVpnGateway():
+
+class TestGetVpnGateway:
"""
Test Class for get_vpn_gateway
"""
@@ -27568,11 +29692,13 @@ def test_get_vpn_gateway_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString')
mock_response = '{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -27580,7 +29706,7 @@ def test_get_vpn_gateway_all_params(self):
# Invoke method
response = _service.get_vpn_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27604,11 +29730,13 @@ def test_get_vpn_gateway_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString')
mock_response = '{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -27618,7 +29746,7 @@ def test_get_vpn_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpn_gateway(**req_copy)
@@ -27631,7 +29759,8 @@ def test_get_vpn_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpn_gateway_value_error()
-class TestUpdateVpnGateway():
+
+class TestUpdateVpnGateway:
"""
Test Class for update_vpn_gateway
"""
@@ -27644,11 +29773,13 @@ def test_update_vpn_gateway_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString')
mock_response = '{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPNGatewayPatch model
vpn_gateway_patch_model = {}
@@ -27662,7 +29793,7 @@ def test_update_vpn_gateway_all_params(self):
response = _service.update_vpn_gateway(
id,
vpn_gateway_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27689,11 +29820,13 @@ def test_update_vpn_gateway_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString')
mock_response = '{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}, "mode": "route"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPNGatewayPatch model
vpn_gateway_patch_model = {}
@@ -27709,7 +29842,7 @@ def test_update_vpn_gateway_value_error(self):
"vpn_gateway_patch": vpn_gateway_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpn_gateway(**req_copy)
@@ -27722,7 +29855,8 @@ def test_update_vpn_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpn_gateway_value_error()
-class TestListVpnGatewayConnections():
+
+class TestListVpnGatewayConnections:
"""
Test Class for list_vpn_gateway_connections
"""
@@ -27735,11 +29869,13 @@ def test_list_vpn_gateway_connections_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -27749,14 +29885,14 @@ def test_list_vpn_gateway_connections_all_params(self):
response = _service.list_vpn_gateway_connections(
vpn_gateway_id,
status=status,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'status={}'.format(status) in query_string
@@ -27777,11 +29913,13 @@ def test_list_vpn_gateway_connections_required_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -27789,7 +29927,7 @@ def test_list_vpn_gateway_connections_required_params(self):
# Invoke method
response = _service.list_vpn_gateway_connections(
vpn_gateway_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27813,11 +29951,13 @@ def test_list_vpn_gateway_connections_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections')
mock_response = '{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -27827,7 +29967,7 @@ def test_list_vpn_gateway_connections_value_error(self):
"vpn_gateway_id": vpn_gateway_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_gateway_connections(**req_copy)
@@ -27840,7 +29980,8 @@ def test_list_vpn_gateway_connections_value_error_with_retries(self):
_service.disable_retries()
self.test_list_vpn_gateway_connections_value_error()
-class TestCreateVpnGatewayConnection():
+
+class TestCreateVpnGatewayConnection:
"""
Test Class for create_vpn_gateway_connection
"""
@@ -27853,11 +29994,13 @@ def test_create_vpn_gateway_connection_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections')
mock_response = '{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VPNGatewayConnectionDPDPrototype model
vpn_gateway_connection_dpd_prototype_model = {}
@@ -27892,7 +30035,7 @@ def test_create_vpn_gateway_connection_all_params(self):
response = _service.create_vpn_gateway_connection(
vpn_gateway_id,
vpn_gateway_connection_prototype,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -27919,11 +30062,13 @@ def test_create_vpn_gateway_connection_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections')
mock_response = '{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a VPNGatewayConnectionDPDPrototype model
vpn_gateway_connection_dpd_prototype_model = {}
@@ -27960,7 +30105,7 @@ def test_create_vpn_gateway_connection_value_error(self):
"vpn_gateway_connection_prototype": vpn_gateway_connection_prototype,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpn_gateway_connection(**req_copy)
@@ -27973,7 +30118,8 @@ def test_create_vpn_gateway_connection_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpn_gateway_connection_value_error()
-class TestDeleteVpnGatewayConnection():
+
+class TestDeleteVpnGatewayConnection:
"""
Test Class for delete_vpn_gateway_connection
"""
@@ -27985,9 +30131,11 @@ def test_delete_vpn_gateway_connection_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -27997,7 +30145,7 @@ def test_delete_vpn_gateway_connection_all_params(self):
response = _service.delete_vpn_gateway_connection(
vpn_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28020,9 +30168,11 @@ def test_delete_vpn_gateway_connection_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28034,7 +30184,7 @@ def test_delete_vpn_gateway_connection_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpn_gateway_connection(**req_copy)
@@ -28047,7 +30197,8 @@ def test_delete_vpn_gateway_connection_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpn_gateway_connection_value_error()
-class TestGetVpnGatewayConnection():
+
+class TestGetVpnGatewayConnection:
"""
Test Class for get_vpn_gateway_connection
"""
@@ -28060,11 +30211,13 @@ def test_get_vpn_gateway_connection_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString')
mock_response = '{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28074,7 +30227,7 @@ def test_get_vpn_gateway_connection_all_params(self):
response = _service.get_vpn_gateway_connection(
vpn_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28098,11 +30251,13 @@ def test_get_vpn_gateway_connection_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString')
mock_response = '{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28114,7 +30269,7 @@ def test_get_vpn_gateway_connection_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpn_gateway_connection(**req_copy)
@@ -28127,7 +30282,8 @@ def test_get_vpn_gateway_connection_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpn_gateway_connection_value_error()
-class TestUpdateVpnGatewayConnection():
+
+class TestUpdateVpnGatewayConnection:
"""
Test Class for update_vpn_gateway_connection
"""
@@ -28140,11 +30296,13 @@ def test_update_vpn_gateway_connection_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString')
mock_response = '{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPNGatewayConnectionDPDPatch model
vpn_gateway_connection_dpd_patch_model = {}
@@ -28181,7 +30339,7 @@ def test_update_vpn_gateway_connection_all_params(self):
vpn_gateway_id,
id,
vpn_gateway_connection_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28208,11 +30366,13 @@ def test_update_vpn_gateway_connection_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString')
mock_response = '{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00.000Z", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy", "resource_type": "ike_policy"}, "ipsec_policy": {"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy", "resource_type": "ipsec_policy"}, "mode": "route", "name": "my-vpn-connection", "peer_address": "169.21.50.5", "psk": "lkj14b1oi0alcniejkso", "resource_type": "vpn_gateway_connection", "status": "down", "routing_protocol": "none", "tunnels": [{"public_ip": {"address": "192.168.3.4"}, "status": "down"}]}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPNGatewayConnectionDPDPatch model
vpn_gateway_connection_dpd_patch_model = {}
@@ -28251,7 +30411,7 @@ def test_update_vpn_gateway_connection_value_error(self):
"vpn_gateway_connection_patch": vpn_gateway_connection_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpn_gateway_connection(**req_copy)
@@ -28264,7 +30424,8 @@ def test_update_vpn_gateway_connection_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpn_gateway_connection_value_error()
-class TestListVpnGatewayConnectionLocalCidrs():
+
+class TestListVpnGatewayConnectionLocalCidrs:
"""
Test Class for list_vpn_gateway_connection_local_cidrs
"""
@@ -28277,11 +30438,13 @@ def test_list_vpn_gateway_connection_local_cidrs_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs')
mock_response = '{"local_cidrs": ["192.168.1.0/24"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28291,7 +30454,7 @@ def test_list_vpn_gateway_connection_local_cidrs_all_params(self):
response = _service.list_vpn_gateway_connection_local_cidrs(
vpn_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28315,11 +30478,13 @@ def test_list_vpn_gateway_connection_local_cidrs_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs')
mock_response = '{"local_cidrs": ["192.168.1.0/24"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28331,7 +30496,7 @@ def test_list_vpn_gateway_connection_local_cidrs_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_gateway_connection_local_cidrs(**req_copy)
@@ -28344,7 +30509,8 @@ def test_list_vpn_gateway_connection_local_cidrs_value_error_with_retries(self):
_service.disable_retries()
self.test_list_vpn_gateway_connection_local_cidrs_value_error()
-class TestRemoveVpnGatewayConnectionLocalCidr():
+
+class TestRemoveVpnGatewayConnectionLocalCidr:
"""
Test Class for remove_vpn_gateway_connection_local_cidr
"""
@@ -28356,9 +30522,11 @@ def test_remove_vpn_gateway_connection_local_cidr_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28372,7 +30540,7 @@ def test_remove_vpn_gateway_connection_local_cidr_all_params(self):
id,
cidr_prefix,
prefix_length,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28395,9 +30563,11 @@ def test_remove_vpn_gateway_connection_local_cidr_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28413,7 +30583,7 @@ def test_remove_vpn_gateway_connection_local_cidr_value_error(self):
"prefix_length": prefix_length,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.remove_vpn_gateway_connection_local_cidr(**req_copy)
@@ -28426,7 +30596,8 @@ def test_remove_vpn_gateway_connection_local_cidr_value_error_with_retries(self)
_service.disable_retries()
self.test_remove_vpn_gateway_connection_local_cidr_value_error()
-class TestCheckVpnGatewayConnectionLocalCidr():
+
+class TestCheckVpnGatewayConnectionLocalCidr:
"""
Test Class for check_vpn_gateway_connection_local_cidr
"""
@@ -28438,9 +30609,11 @@ def test_check_vpn_gateway_connection_local_cidr_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString')
- responses.add(responses.GET,
- url,
- status=204)
+ responses.add(
+ responses.GET,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28454,7 +30627,7 @@ def test_check_vpn_gateway_connection_local_cidr_all_params(self):
id,
cidr_prefix,
prefix_length,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28477,9 +30650,11 @@ def test_check_vpn_gateway_connection_local_cidr_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString')
- responses.add(responses.GET,
- url,
- status=204)
+ responses.add(
+ responses.GET,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28495,7 +30670,7 @@ def test_check_vpn_gateway_connection_local_cidr_value_error(self):
"prefix_length": prefix_length,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.check_vpn_gateway_connection_local_cidr(**req_copy)
@@ -28508,7 +30683,8 @@ def test_check_vpn_gateway_connection_local_cidr_value_error_with_retries(self):
_service.disable_retries()
self.test_check_vpn_gateway_connection_local_cidr_value_error()
-class TestAddVpnGatewayConnectionLocalCidr():
+
+class TestAddVpnGatewayConnectionLocalCidr:
"""
Test Class for add_vpn_gateway_connection_local_cidr
"""
@@ -28520,9 +30696,11 @@ def test_add_vpn_gateway_connection_local_cidr_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString')
- responses.add(responses.PUT,
- url,
- status=204)
+ responses.add(
+ responses.PUT,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28536,7 +30714,7 @@ def test_add_vpn_gateway_connection_local_cidr_all_params(self):
id,
cidr_prefix,
prefix_length,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28559,9 +30737,11 @@ def test_add_vpn_gateway_connection_local_cidr_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/local_cidrs/testString/testString')
- responses.add(responses.PUT,
- url,
- status=204)
+ responses.add(
+ responses.PUT,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28577,7 +30757,7 @@ def test_add_vpn_gateway_connection_local_cidr_value_error(self):
"prefix_length": prefix_length,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.add_vpn_gateway_connection_local_cidr(**req_copy)
@@ -28590,7 +30770,8 @@ def test_add_vpn_gateway_connection_local_cidr_value_error_with_retries(self):
_service.disable_retries()
self.test_add_vpn_gateway_connection_local_cidr_value_error()
-class TestListVpnGatewayConnectionPeerCidrs():
+
+class TestListVpnGatewayConnectionPeerCidrs:
"""
Test Class for list_vpn_gateway_connection_peer_cidrs
"""
@@ -28603,11 +30784,13 @@ def test_list_vpn_gateway_connection_peer_cidrs_all_params(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs')
mock_response = '{"peer_cidrs": ["10.45.1.0/24"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28617,7 +30800,7 @@ def test_list_vpn_gateway_connection_peer_cidrs_all_params(self):
response = _service.list_vpn_gateway_connection_peer_cidrs(
vpn_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28641,11 +30824,13 @@ def test_list_vpn_gateway_connection_peer_cidrs_value_error(self):
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs')
mock_response = '{"peer_cidrs": ["10.45.1.0/24"]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28657,7 +30842,7 @@ def test_list_vpn_gateway_connection_peer_cidrs_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_gateway_connection_peer_cidrs(**req_copy)
@@ -28670,7 +30855,8 @@ def test_list_vpn_gateway_connection_peer_cidrs_value_error_with_retries(self):
_service.disable_retries()
self.test_list_vpn_gateway_connection_peer_cidrs_value_error()
-class TestRemoveVpnGatewayConnectionPeerCidr():
+
+class TestRemoveVpnGatewayConnectionPeerCidr:
"""
Test Class for remove_vpn_gateway_connection_peer_cidr
"""
@@ -28682,9 +30868,11 @@ def test_remove_vpn_gateway_connection_peer_cidr_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28698,7 +30886,7 @@ def test_remove_vpn_gateway_connection_peer_cidr_all_params(self):
id,
cidr_prefix,
prefix_length,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28721,9 +30909,11 @@ def test_remove_vpn_gateway_connection_peer_cidr_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28739,7 +30929,7 @@ def test_remove_vpn_gateway_connection_peer_cidr_value_error(self):
"prefix_length": prefix_length,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.remove_vpn_gateway_connection_peer_cidr(**req_copy)
@@ -28752,7 +30942,8 @@ def test_remove_vpn_gateway_connection_peer_cidr_value_error_with_retries(self):
_service.disable_retries()
self.test_remove_vpn_gateway_connection_peer_cidr_value_error()
-class TestCheckVpnGatewayConnectionPeerCidr():
+
+class TestCheckVpnGatewayConnectionPeerCidr:
"""
Test Class for check_vpn_gateway_connection_peer_cidr
"""
@@ -28764,9 +30955,11 @@ def test_check_vpn_gateway_connection_peer_cidr_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString')
- responses.add(responses.GET,
- url,
- status=204)
+ responses.add(
+ responses.GET,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28780,7 +30973,7 @@ def test_check_vpn_gateway_connection_peer_cidr_all_params(self):
id,
cidr_prefix,
prefix_length,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28803,9 +30996,11 @@ def test_check_vpn_gateway_connection_peer_cidr_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString')
- responses.add(responses.GET,
- url,
- status=204)
+ responses.add(
+ responses.GET,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28821,7 +31016,7 @@ def test_check_vpn_gateway_connection_peer_cidr_value_error(self):
"prefix_length": prefix_length,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.check_vpn_gateway_connection_peer_cidr(**req_copy)
@@ -28834,7 +31029,8 @@ def test_check_vpn_gateway_connection_peer_cidr_value_error_with_retries(self):
_service.disable_retries()
self.test_check_vpn_gateway_connection_peer_cidr_value_error()
-class TestAddVpnGatewayConnectionPeerCidr():
+
+class TestAddVpnGatewayConnectionPeerCidr:
"""
Test Class for add_vpn_gateway_connection_peer_cidr
"""
@@ -28846,9 +31042,11 @@ def test_add_vpn_gateway_connection_peer_cidr_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString')
- responses.add(responses.PUT,
- url,
- status=204)
+ responses.add(
+ responses.PUT,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28862,7 +31060,7 @@ def test_add_vpn_gateway_connection_peer_cidr_all_params(self):
id,
cidr_prefix,
prefix_length,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -28885,9 +31083,11 @@ def test_add_vpn_gateway_connection_peer_cidr_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_gateways/testString/connections/testString/peer_cidrs/testString/testString')
- responses.add(responses.PUT,
- url,
- status=204)
+ responses.add(
+ responses.PUT,
+ url,
+ status=204,
+ )
# Set up parameter values
vpn_gateway_id = 'testString'
@@ -28903,7 +31103,7 @@ def test_add_vpn_gateway_connection_peer_cidr_value_error(self):
"prefix_length": prefix_length,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.add_vpn_gateway_connection_peer_cidr(**req_copy)
@@ -28916,6 +31116,7 @@ def test_add_vpn_gateway_connection_peer_cidr_value_error_with_retries(self):
_service.disable_retries()
self.test_add_vpn_gateway_connection_peer_cidr_value_error()
+
# endregion
##############################################################################
# End of Service: VPNGateways
@@ -28926,7 +31127,8 @@ def test_add_vpn_gateway_connection_peer_cidr_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -28971,7 +31173,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListVpnServers():
+
+class TestListVpnServers:
"""
Test Class for list_vpn_servers
"""
@@ -28984,11 +31187,13 @@ def test_list_vpn_servers_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -29004,14 +31209,14 @@ def test_list_vpn_servers_all_params(self):
limit=limit,
resource_group_id=resource_group_id,
sort=sort,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'name={}'.format(name) in query_string
assert 'start={}'.format(start) in query_string
@@ -29036,16 +31241,17 @@ def test_list_vpn_servers_required_params(self):
# Set up mock
url = preprocess_url('/vpn_servers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_vpn_servers()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -29067,17 +31273,19 @@ def test_list_vpn_servers_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132, "vpn_servers": [{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_servers(**req_copy)
@@ -29099,16 +31307,20 @@ def test_list_vpn_servers_with_pager_get_next(self):
url = preprocess_url('/vpn_servers')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_state":"stable","name":"my-vpn-server","port":443,"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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}'
mock_response2 = '{"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_state":"stable","name":"my-vpn-server","port":443,"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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = []
@@ -29134,16 +31346,20 @@ def test_list_vpn_servers_with_pager_get_all(self):
url = preprocess_url('/vpn_servers')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_state":"stable","name":"my-vpn-server","port":443,"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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}'
mock_response2 = '{"vpn_servers":[{"certificate":{"crn":"crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"},"client_authentication":[{"method":"certificate","identity_provider":{"provider_type":"iam"}}],"client_auto_delete":true,"client_auto_delete_timeout":1,"client_dns_server_ips":[{"address":"192.168.3.4"}],"client_idle_timeout":600,"client_ip_pool":"172.16.0.0/16","created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","enable_split_tunneling":true,"health_state":"ok","hostname":"a8506291.us-south.vpn-server.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5","lifecycle_state":"stable","name":"my-vpn-server","port":443,"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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"protocol":"udp","resource_group":{"href":"https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345","id":"fee82deba12e4c0fb69c3b09d1f12345","name":"my-resource-group"},"resource_type":"vpn_server","security_groups":[{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = VpnServersPager(
@@ -29157,7 +31373,8 @@ def test_list_vpn_servers_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpnServer():
+
+class TestCreateVpnServer:
"""
Test Class for create_vpn_server
"""
@@ -29170,11 +31387,13 @@ def test_create_vpn_server_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -29233,7 +31452,7 @@ def test_create_vpn_server_all_params(self):
protocol=protocol,
resource_group=resource_group,
security_groups=security_groups,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29271,11 +31490,13 @@ def test_create_vpn_server_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -29328,7 +31549,7 @@ def test_create_vpn_server_value_error(self):
"subnets": subnets,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpn_server(**req_copy)
@@ -29341,7 +31562,8 @@ def test_create_vpn_server_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpn_server_value_error()
-class TestDeleteVpnServer():
+
+class TestDeleteVpnServer:
"""
Test Class for delete_vpn_server
"""
@@ -29353,9 +31575,11 @@ def test_delete_vpn_server_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -29365,7 +31589,7 @@ def test_delete_vpn_server_all_params(self):
response = _service.delete_vpn_server(
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29388,9 +31612,11 @@ def test_delete_vpn_server_required_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -29398,7 +31624,7 @@ def test_delete_vpn_server_required_params(self):
# Invoke method
response = _service.delete_vpn_server(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29421,9 +31647,11 @@ def test_delete_vpn_server_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -29433,7 +31661,7 @@ def test_delete_vpn_server_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpn_server(**req_copy)
@@ -29446,7 +31674,8 @@ def test_delete_vpn_server_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpn_server_value_error()
-class TestGetVpnServer():
+
+class TestGetVpnServer:
"""
Test Class for get_vpn_server
"""
@@ -29459,11 +31688,13 @@ def test_get_vpn_server_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -29471,7 +31702,7 @@ def test_get_vpn_server_all_params(self):
# Invoke method
response = _service.get_vpn_server(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29495,11 +31726,13 @@ def test_get_vpn_server_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -29509,7 +31742,7 @@ def test_get_vpn_server_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpn_server(**req_copy)
@@ -29522,7 +31755,8 @@ def test_get_vpn_server_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpn_server_value_error()
-class TestUpdateVpnServer():
+
+class TestUpdateVpnServer:
"""
Test Class for update_vpn_server
"""
@@ -29535,11 +31769,13 @@ def test_update_vpn_server_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -29585,7 +31821,7 @@ def test_update_vpn_server_all_params(self):
id,
vpn_server_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29612,11 +31848,13 @@ def test_update_vpn_server_required_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -29660,7 +31898,7 @@ def test_update_vpn_server_required_params(self):
response = _service.update_vpn_server(
id,
vpn_server_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29687,11 +31925,13 @@ def test_update_vpn_server_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString')
mock_response = '{"certificate": {"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5"}, "client_authentication": [{"method": "certificate", "identity_provider": {"provider_type": "iam"}}], "client_auto_delete": true, "client_auto_delete_timeout": 1, "client_dns_server_ips": [{"address": "192.168.3.4"}], "client_idle_timeout": 600, "client_ip_pool": "172.16.0.0/16", "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn-server:r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "enable_split_tunneling": true, "health_state": "ok", "hostname": "a8506291.us-south.vpn-server.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r006-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "lifecycle_state": "stable", "name": "my-vpn-server", "port": 443, "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "protocol": "udp", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_server", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -29737,7 +31977,7 @@ def test_update_vpn_server_value_error(self):
"vpn_server_patch": vpn_server_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpn_server(**req_copy)
@@ -29750,7 +31990,8 @@ def test_update_vpn_server_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpn_server_value_error()
-class TestGetVpnServerClientConfiguration():
+
+class TestGetVpnServerClientConfiguration:
"""
Test Class for get_vpn_server_client_configuration
"""
@@ -29763,11 +32004,13 @@ def test_get_vpn_server_client_configuration_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/client_configuration')
mock_response = '"client\nproto udp\nremote a8506291.us-south.vpn-server.appdomain.cloud\nport 443\n\ndev tun\nnobind\n\n-----BEGIN CERTIFICATE-----\nxxxxxx\n-----END CERTIFICATE-----\n"'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='text/plain',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='text/plain',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -29775,7 +32018,7 @@ def test_get_vpn_server_client_configuration_all_params(self):
# Invoke method
response = _service.get_vpn_server_client_configuration(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29799,11 +32042,13 @@ def test_get_vpn_server_client_configuration_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/client_configuration')
mock_response = '"client\nproto udp\nremote a8506291.us-south.vpn-server.appdomain.cloud\nport 443\n\ndev tun\nnobind\n\n-----BEGIN CERTIFICATE-----\nxxxxxx\n-----END CERTIFICATE-----\n"'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='text/plain',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='text/plain',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -29813,7 +32058,7 @@ def test_get_vpn_server_client_configuration_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpn_server_client_configuration(**req_copy)
@@ -29826,7 +32071,8 @@ def test_get_vpn_server_client_configuration_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpn_server_client_configuration_value_error()
-class TestListVpnServerClients():
+
+class TestListVpnServerClients:
"""
Test Class for list_vpn_server_clients
"""
@@ -29839,11 +32085,13 @@ def test_list_vpn_server_clients_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients')
mock_response = '{"clients": [{"client_ip": {"address": "192.168.3.4"}, "common_name": "common_name", "created_at": "2019-01-01T12:00:00.000Z", "disconnected_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "remote_ip": {"address": "192.168.3.4"}, "remote_port": 22, "resource_type": "vpn_server_client", "status": "connected", "username": "username"}], "first": {"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"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -29857,14 +32105,14 @@ def test_list_vpn_server_clients_all_params(self):
start=start,
limit=limit,
sort=sort,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -29887,11 +32135,13 @@ def test_list_vpn_server_clients_required_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients')
mock_response = '{"clients": [{"client_ip": {"address": "192.168.3.4"}, "common_name": "common_name", "created_at": "2019-01-01T12:00:00.000Z", "disconnected_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "remote_ip": {"address": "192.168.3.4"}, "remote_port": 22, "resource_type": "vpn_server_client", "status": "connected", "username": "username"}], "first": {"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"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -29899,7 +32149,7 @@ def test_list_vpn_server_clients_required_params(self):
# Invoke method
response = _service.list_vpn_server_clients(
vpn_server_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -29923,11 +32173,13 @@ def test_list_vpn_server_clients_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients')
mock_response = '{"clients": [{"client_ip": {"address": "192.168.3.4"}, "common_name": "common_name", "created_at": "2019-01-01T12:00:00.000Z", "disconnected_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "remote_ip": {"address": "192.168.3.4"}, "remote_port": 22, "resource_type": "vpn_server_client", "status": "connected", "username": "username"}], "first": {"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"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -29937,7 +32189,7 @@ def test_list_vpn_server_clients_value_error(self):
"vpn_server_id": vpn_server_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_server_clients(**req_copy)
@@ -29959,16 +32211,20 @@ def test_list_vpn_server_clients_with_pager_get_next(self):
url = preprocess_url('/vpn_servers/testString/clients')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"clients":[{"client_ip":{"address":"192.168.3.4"},"common_name":"common_name","created_at":"2019-01-01T12:00:00.000Z","disconnected_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","remote_ip":{"address":"192.168.3.4"},"remote_port":22,"resource_type":"vpn_server_client","status":"connected","username":"username"}],"total_count":2,"limit":1}'
mock_response2 = '{"clients":[{"client_ip":{"address":"192.168.3.4"},"common_name":"common_name","created_at":"2019-01-01T12:00:00.000Z","disconnected_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","remote_ip":{"address":"192.168.3.4"},"remote_port":22,"resource_type":"vpn_server_client","status":"connected","username":"username"}],"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)
+ 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 = []
@@ -29993,16 +32249,20 @@ def test_list_vpn_server_clients_with_pager_get_all(self):
url = preprocess_url('/vpn_servers/testString/clients')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"clients":[{"client_ip":{"address":"192.168.3.4"},"common_name":"common_name","created_at":"2019-01-01T12:00:00.000Z","disconnected_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","remote_ip":{"address":"192.168.3.4"},"remote_port":22,"resource_type":"vpn_server_client","status":"connected","username":"username"}],"total_count":2,"limit":1}'
mock_response2 = '{"clients":[{"client_ip":{"address":"192.168.3.4"},"common_name":"common_name","created_at":"2019-01-01T12:00:00.000Z","disconnected_at":"2019-01-01T12:00:00.000Z","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","remote_ip":{"address":"192.168.3.4"},"remote_port":22,"resource_type":"vpn_server_client","status":"connected","username":"username"}],"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)
+ 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 = VpnServerClientsPager(
@@ -30015,7 +32275,8 @@ def test_list_vpn_server_clients_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestDeleteVpnServerClient():
+
+class TestDeleteVpnServerClient:
"""
Test Class for delete_vpn_server_client
"""
@@ -30027,9 +32288,11 @@ def test_delete_vpn_server_client_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30039,7 +32302,7 @@ def test_delete_vpn_server_client_all_params(self):
response = _service.delete_vpn_server_client(
vpn_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30062,9 +32325,11 @@ def test_delete_vpn_server_client_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30076,7 +32341,7 @@ def test_delete_vpn_server_client_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpn_server_client(**req_copy)
@@ -30089,7 +32354,8 @@ def test_delete_vpn_server_client_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpn_server_client_value_error()
-class TestGetVpnServerClient():
+
+class TestGetVpnServerClient:
"""
Test Class for get_vpn_server_client
"""
@@ -30102,11 +32368,13 @@ def test_get_vpn_server_client_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients/testString')
mock_response = '{"client_ip": {"address": "192.168.3.4"}, "common_name": "common_name", "created_at": "2019-01-01T12:00:00.000Z", "disconnected_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "remote_ip": {"address": "192.168.3.4"}, "remote_port": 22, "resource_type": "vpn_server_client", "status": "connected", "username": "username"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30116,7 +32384,7 @@ def test_get_vpn_server_client_all_params(self):
response = _service.get_vpn_server_client(
vpn_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30140,11 +32408,13 @@ def test_get_vpn_server_client_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients/testString')
mock_response = '{"client_ip": {"address": "192.168.3.4"}, "common_name": "common_name", "created_at": "2019-01-01T12:00:00.000Z", "disconnected_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/8e454ead-0db7-48ac-9a8b-2698d8c470a7/clients/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "remote_ip": {"address": "192.168.3.4"}, "remote_port": 22, "resource_type": "vpn_server_client", "status": "connected", "username": "username"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30156,7 +32426,7 @@ def test_get_vpn_server_client_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpn_server_client(**req_copy)
@@ -30169,7 +32439,8 @@ def test_get_vpn_server_client_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpn_server_client_value_error()
-class TestDisconnectVpnClient():
+
+class TestDisconnectVpnClient:
"""
Test Class for disconnect_vpn_client
"""
@@ -30181,9 +32452,11 @@ def test_disconnect_vpn_client_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients/testString/disconnect')
- responses.add(responses.POST,
- url,
- status=202)
+ responses.add(
+ responses.POST,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30193,7 +32466,7 @@ def test_disconnect_vpn_client_all_params(self):
response = _service.disconnect_vpn_client(
vpn_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30216,9 +32489,11 @@ def test_disconnect_vpn_client_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString/clients/testString/disconnect')
- responses.add(responses.POST,
- url,
- status=202)
+ responses.add(
+ responses.POST,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30230,7 +32505,7 @@ def test_disconnect_vpn_client_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.disconnect_vpn_client(**req_copy)
@@ -30243,7 +32518,8 @@ def test_disconnect_vpn_client_value_error_with_retries(self):
_service.disable_retries()
self.test_disconnect_vpn_client_value_error()
-class TestListVpnServerRoutes():
+
+class TestListVpnServerRoutes:
"""
Test Class for list_vpn_server_routes
"""
@@ -30256,11 +32532,13 @@ def test_list_vpn_server_routes_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30274,14 +32552,14 @@ def test_list_vpn_server_routes_all_params(self):
start=start,
limit=limit,
sort=sort,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -30304,11 +32582,13 @@ def test_list_vpn_server_routes_required_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30316,7 +32596,7 @@ def test_list_vpn_server_routes_required_params(self):
# Invoke method
response = _service.list_vpn_server_routes(
vpn_server_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30340,11 +32620,13 @@ def test_list_vpn_server_routes_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20"}, "routes": [{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30354,7 +32636,7 @@ def test_list_vpn_server_routes_value_error(self):
"vpn_server_id": vpn_server_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_vpn_server_routes(**req_copy)
@@ -30376,16 +32658,20 @@ def test_list_vpn_server_routes_with_pager_get_next(self):
url = preprocess_url('/vpn_servers/testString/routes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}'
mock_response2 = '{"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"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)
+ 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 = []
@@ -30410,16 +32696,20 @@ def test_list_vpn_server_routes_with_pager_get_all(self):
url = preprocess_url('/vpn_servers/testString/routes')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"total_count":2,"limit":1}'
mock_response2 = '{"routes":[{"action":"deliver","created_at":"2019-01-01T12:00:00.000Z","destination":"192.168.3.0/24","href":"https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","id":"r006-1a15dca5-7e33-45e1-b7c5-bc690e569531","lifecycle_state":"stable","name":"my-vpn-route-1","resource_type":"vpn_server_route"}],"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)
+ 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 = VpnServerRoutesPager(
@@ -30432,7 +32722,8 @@ def test_list_vpn_server_routes_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateVpnServerRoute():
+
+class TestCreateVpnServerRoute:
"""
Test Class for create_vpn_server_route
"""
@@ -30445,11 +32736,13 @@ def test_create_vpn_server_route_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes')
mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30463,7 +32756,7 @@ def test_create_vpn_server_route_all_params(self):
destination,
action=action,
name=name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30492,11 +32785,13 @@ def test_create_vpn_server_route_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes')
mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30510,7 +32805,7 @@ def test_create_vpn_server_route_value_error(self):
"destination": destination,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_vpn_server_route(**req_copy)
@@ -30523,7 +32818,8 @@ def test_create_vpn_server_route_value_error_with_retries(self):
_service.disable_retries()
self.test_create_vpn_server_route_value_error()
-class TestDeleteVpnServerRoute():
+
+class TestDeleteVpnServerRoute:
"""
Test Class for delete_vpn_server_route
"""
@@ -30535,9 +32831,11 @@ def test_delete_vpn_server_route_all_params(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30547,7 +32845,7 @@ def test_delete_vpn_server_route_all_params(self):
response = _service.delete_vpn_server_route(
vpn_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30570,9 +32868,11 @@ def test_delete_vpn_server_route_value_error(self):
"""
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30584,7 +32884,7 @@ def test_delete_vpn_server_route_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_vpn_server_route(**req_copy)
@@ -30597,7 +32897,8 @@ def test_delete_vpn_server_route_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_vpn_server_route_value_error()
-class TestGetVpnServerRoute():
+
+class TestGetVpnServerRoute:
"""
Test Class for get_vpn_server_route
"""
@@ -30610,11 +32911,13 @@ def test_get_vpn_server_route_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes/testString')
mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30624,7 +32927,7 @@ def test_get_vpn_server_route_all_params(self):
response = _service.get_vpn_server_route(
vpn_server_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30648,11 +32951,13 @@ def test_get_vpn_server_route_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes/testString')
mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
vpn_server_id = 'testString'
@@ -30664,7 +32969,7 @@ def test_get_vpn_server_route_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_vpn_server_route(**req_copy)
@@ -30677,7 +32982,8 @@ def test_get_vpn_server_route_value_error_with_retries(self):
_service.disable_retries()
self.test_get_vpn_server_route_value_error()
-class TestUpdateVpnServerRoute():
+
+class TestUpdateVpnServerRoute:
"""
Test Class for update_vpn_server_route
"""
@@ -30690,11 +32996,13 @@ def test_update_vpn_server_route_all_params(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes/testString')
mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPNServerRoutePatch model
vpn_server_route_patch_model = {}
@@ -30710,7 +33018,7 @@ def test_update_vpn_server_route_all_params(self):
vpn_server_id,
id,
vpn_server_route_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -30737,11 +33045,13 @@ def test_update_vpn_server_route_value_error(self):
# Set up mock
url = preprocess_url('/vpn_servers/testString/routes/testString')
mock_response = '{"action": "deliver", "created_at": "2019-01-01T12:00:00.000Z", "destination": "192.168.3.0/24", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "id": "r006-1a15dca5-7e33-45e1-b7c5-bc690e569531", "lifecycle_state": "stable", "name": "my-vpn-route-1", "resource_type": "vpn_server_route"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a VPNServerRoutePatch model
vpn_server_route_patch_model = {}
@@ -30759,7 +33069,7 @@ def test_update_vpn_server_route_value_error(self):
"vpn_server_route_patch": vpn_server_route_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_vpn_server_route(**req_copy)
@@ -30772,6 +33082,7 @@ def test_update_vpn_server_route_value_error_with_retries(self):
_service.disable_retries()
self.test_update_vpn_server_route_value_error()
+
# endregion
##############################################################################
# End of Service: VPNServers
@@ -30782,7 +33093,8 @@ def test_update_vpn_server_route_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -30827,7 +33139,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListLoadBalancerProfiles():
+
+class TestListLoadBalancerProfiles:
"""
Test Class for list_load_balancer_profiles
"""
@@ -30840,11 +33153,13 @@ def test_list_load_balancer_profiles_all_params(self):
# Set up mock
url = preprocess_url('/load_balancer/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -30854,14 +33169,14 @@ def test_list_load_balancer_profiles_all_params(self):
response = _service.list_load_balancer_profiles(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -30883,16 +33198,17 @@ def test_list_load_balancer_profiles_required_params(self):
# Set up mock
url = preprocess_url('/load_balancer/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_load_balancer_profiles()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -30914,17 +33230,19 @@ def test_list_load_balancer_profiles_value_error(self):
# Set up mock
url = preprocess_url('/load_balancer/profiles')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}], "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancer_profiles(**req_copy)
@@ -30946,16 +33264,20 @@ def test_list_load_balancer_profiles_with_pager_get_next(self):
url = preprocess_url('/load_balancer/profiles')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}'
mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}'
- 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)
+ 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 = []
@@ -30978,16 +33300,20 @@ def test_list_load_balancer_profiles_with_pager_get_all(self):
url = preprocess_url('/load_balancer/profiles')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"profiles":[{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}'
mock_response2 = '{"total_count":2,"limit":1,"profiles":[{"family":"network","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed","logging_supported":{"type":"fixed","value":["datapath"]},"name":"network-fixed","route_mode_supported":{"type":"fixed","value":true},"security_groups_supported":{"type":"fixed","value":true},"udp_supported":{"type":"fixed","value":true}}]}'
- 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)
+ 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 = LoadBalancerProfilesPager(
@@ -30998,7 +33324,8 @@ def test_list_load_balancer_profiles_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestGetLoadBalancerProfile():
+
+class TestGetLoadBalancerProfile:
"""
Test Class for get_load_balancer_profile
"""
@@ -31011,11 +33338,13 @@ def test_get_load_balancer_profile_all_params(self):
# Set up mock
url = preprocess_url('/load_balancer/profiles/testString')
mock_response = '{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -31023,7 +33352,7 @@ def test_get_load_balancer_profile_all_params(self):
# Invoke method
response = _service.get_load_balancer_profile(
name,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31047,11 +33376,13 @@ def test_get_load_balancer_profile_value_error(self):
# Set up mock
url = preprocess_url('/load_balancer/profiles/testString')
mock_response = '{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "route_mode_supported": {"type": "fixed", "value": true}, "security_groups_supported": {"type": "fixed", "value": true}, "udp_supported": {"type": "fixed", "value": true}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -31061,7 +33392,7 @@ def test_get_load_balancer_profile_value_error(self):
"name": name,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_profile(**req_copy)
@@ -31074,7 +33405,8 @@ def test_get_load_balancer_profile_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_profile_value_error()
-class TestListLoadBalancers():
+
+class TestListLoadBalancers:
"""
Test Class for list_load_balancers
"""
@@ -31087,11 +33419,13 @@ def test_list_load_balancers_all_params(self):
# Set up mock
url = preprocess_url('/load_balancers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -31101,14 +33435,14 @@ def test_list_load_balancers_all_params(self):
response = _service.list_load_balancers(
start=start,
limit=limit,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -31130,16 +33464,17 @@ def test_list_load_balancers_required_params(self):
# Set up mock
url = preprocess_url('/load_balancers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_load_balancers()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -31161,17 +33496,19 @@ def test_list_load_balancers_value_error(self):
# Set up mock
url = preprocess_url('/load_balancers')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20"}, "limit": 20, "load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancers(**req_copy)
@@ -31193,16 +33530,20 @@ def test_list_load_balancers_with_pager_get_next(self):
url = preprocess_url('/load_balancers')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}'
mock_response2 = '{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}'
- 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)
+ 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 = []
@@ -31225,16 +33566,20 @@ def test_list_load_balancers_with_pager_get_all(self):
url = preprocess_url('/load_balancers')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}'
mock_response2 = '{"total_count":2,"limit":1,"load_balancers":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727","dns":{"instance":{"crn":"crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"},"zone":{"id":"d66662cc-aa23-4fe1-9987-858487a61f45"}},"hostname":"6b88d615-us-south.lb.appdomain.cloud","href":"https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727","id":"dd754295-e9e0-4c9d-bf6c-58fbc59e5727","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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"be5df5ca-12a0-494b-907e-aa6ec2bfa271","name":"my-security-group"}],"security_groups_supported":false,"subnets":[{"crn":"crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e","id":"7ec86020-1c6e-4889-b3f0-a15f2e50f87e","name":"my-subnet","resource_type":"subnet"}],"udp_supported":true}]}'
- 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)
+ 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 = LoadBalancersPager(
@@ -31245,7 +33590,8 @@ def test_list_load_balancers_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateLoadBalancer():
+
+class TestCreateLoadBalancer:
"""
Test Class for create_load_balancer
"""
@@ -31258,11 +33604,13 @@ def test_create_load_balancer_all_params(self):
# Set up mock
url = preprocess_url('/load_balancers')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a SubnetIdentityById model
subnet_identity_model = {}
@@ -31394,7 +33742,7 @@ def test_create_load_balancer_all_params(self):
resource_group=resource_group,
route_mode=route_mode,
security_groups=security_groups,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31432,11 +33780,13 @@ def test_create_load_balancer_value_error(self):
# Set up mock
url = preprocess_url('/load_balancers')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a SubnetIdentityById model
subnet_identity_model = {}
@@ -31560,7 +33910,7 @@ def test_create_load_balancer_value_error(self):
"subnets": subnets,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_load_balancer(**req_copy)
@@ -31573,7 +33923,8 @@ def test_create_load_balancer_value_error_with_retries(self):
_service.disable_retries()
self.test_create_load_balancer_value_error()
-class TestDeleteLoadBalancer():
+
+class TestDeleteLoadBalancer:
"""
Test Class for delete_load_balancer
"""
@@ -31585,9 +33936,11 @@ def test_delete_load_balancer_all_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -31597,7 +33950,7 @@ def test_delete_load_balancer_all_params(self):
response = _service.delete_load_balancer(
id,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31620,9 +33973,11 @@ def test_delete_load_balancer_required_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -31630,7 +33985,7 @@ def test_delete_load_balancer_required_params(self):
# Invoke method
response = _service.delete_load_balancer(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31653,9 +34008,11 @@ def test_delete_load_balancer_value_error(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
id = 'testString'
@@ -31665,7 +34022,7 @@ def test_delete_load_balancer_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_load_balancer(**req_copy)
@@ -31678,7 +34035,8 @@ def test_delete_load_balancer_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_load_balancer_value_error()
-class TestGetLoadBalancer():
+
+class TestGetLoadBalancer:
"""
Test Class for get_load_balancer
"""
@@ -31691,11 +34049,13 @@ def test_get_load_balancer_all_params(self):
# Set up mock
url = preprocess_url('/load_balancers/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -31703,7 +34063,7 @@ def test_get_load_balancer_all_params(self):
# Invoke method
response = _service.get_load_balancer(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31727,11 +34087,13 @@ def test_get_load_balancer_value_error(self):
# Set up mock
url = preprocess_url('/load_balancers/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -31741,7 +34103,7 @@ def test_get_load_balancer_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer(**req_copy)
@@ -31754,7 +34116,8 @@ def test_get_load_balancer_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_value_error()
-class TestUpdateLoadBalancer():
+
+class TestUpdateLoadBalancer:
"""
Test Class for update_load_balancer
"""
@@ -31767,11 +34130,13 @@ def test_update_load_balancer_all_params(self):
# Set up mock
url = preprocess_url('/load_balancers/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DNSInstanceIdentityByCRN model
dns_instance_identity_model = {}
@@ -31815,7 +34180,7 @@ def test_update_load_balancer_all_params(self):
id,
load_balancer_patch,
if_match=if_match,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31842,11 +34207,13 @@ def test_update_load_balancer_required_params(self):
# Set up mock
url = preprocess_url('/load_balancers/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DNSInstanceIdentityByCRN model
dns_instance_identity_model = {}
@@ -31888,7 +34255,7 @@ def test_update_load_balancer_required_params(self):
response = _service.update_load_balancer(
id,
load_balancer_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -31915,11 +34282,13 @@ def test_update_load_balancer_value_error(self):
# Set up mock
url = preprocess_url('/load_balancers/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "dns": {"instance": {"crn": "crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e"}, "zone": {"id": "d66662cc-aa23-4fe1-9987-858487a61f45"}}, "hostname": "6b88d615-us-south.lb.appdomain.cloud", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet", "resource_type": "subnet"}], "udp_supported": true}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a DNSInstanceIdentityByCRN model
dns_instance_identity_model = {}
@@ -31963,7 +34332,7 @@ def test_update_load_balancer_value_error(self):
"load_balancer_patch": load_balancer_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_load_balancer(**req_copy)
@@ -31976,7 +34345,8 @@ def test_update_load_balancer_value_error_with_retries(self):
_service.disable_retries()
self.test_update_load_balancer_value_error()
-class TestGetLoadBalancerStatistics():
+
+class TestGetLoadBalancerStatistics:
"""
Test Class for get_load_balancer_statistics
"""
@@ -31989,11 +34359,13 @@ def test_get_load_balancer_statistics_all_params(self):
# Set up mock
url = preprocess_url('/load_balancers/testString/statistics')
mock_response = '{"active_connections": 797, "connection_rate": 91.121, "data_processed_this_month": 10093173145, "throughput": 167.278}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -32001,7 +34373,7 @@ def test_get_load_balancer_statistics_all_params(self):
# Invoke method
response = _service.get_load_balancer_statistics(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32025,11 +34397,13 @@ def test_get_load_balancer_statistics_value_error(self):
# Set up mock
url = preprocess_url('/load_balancers/testString/statistics')
mock_response = '{"active_connections": 797, "connection_rate": 91.121, "data_processed_this_month": 10093173145, "throughput": 167.278}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -32039,7 +34413,7 @@ def test_get_load_balancer_statistics_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_statistics(**req_copy)
@@ -32052,7 +34426,8 @@ def test_get_load_balancer_statistics_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_statistics_value_error()
-class TestListLoadBalancerListeners():
+
+class TestListLoadBalancerListeners:
"""
Test Class for list_load_balancer_listeners
"""
@@ -32065,11 +34440,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32077,7 +34454,7 @@ def test_list_load_balancer_listeners_all_params(self):
# Invoke method
response = _service.list_load_balancer_listeners(
load_balancer_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32101,11 +34478,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32115,7 +34494,7 @@ def test_list_load_balancer_listeners_value_error(self):
"load_balancer_id": load_balancer_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancer_listeners(**req_copy)
@@ -32128,7 +34507,8 @@ def test_list_load_balancer_listeners_value_error_with_retries(self):
_service.disable_retries()
self.test_list_load_balancer_listeners_value_error()
-class TestCreateLoadBalancerListener():
+
+class TestCreateLoadBalancerListener:
"""
Test Class for create_load_balancer_listener
"""
@@ -32141,11 +34521,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -32212,7 +34594,7 @@ def test_create_load_balancer_listener_all_params(self):
port=port,
port_max=port_max,
port_min=port_min,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32249,11 +34631,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -32312,7 +34696,7 @@ def test_create_load_balancer_listener_value_error(self):
"protocol": protocol,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_load_balancer_listener(**req_copy)
@@ -32325,7 +34709,8 @@ def test_create_load_balancer_listener_value_error_with_retries(self):
_service.disable_retries()
self.test_create_load_balancer_listener_value_error()
-class TestDeleteLoadBalancerListener():
+
+class TestDeleteLoadBalancerListener:
"""
Test Class for delete_load_balancer_listener
"""
@@ -32337,9 +34722,11 @@ def test_delete_load_balancer_listener_all_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/listeners/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32349,7 +34736,7 @@ def test_delete_load_balancer_listener_all_params(self):
response = _service.delete_load_balancer_listener(
load_balancer_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32372,9 +34759,11 @@ def test_delete_load_balancer_listener_value_error(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/listeners/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32386,7 +34775,7 @@ def test_delete_load_balancer_listener_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_load_balancer_listener(**req_copy)
@@ -32399,7 +34788,8 @@ def test_delete_load_balancer_listener_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_load_balancer_listener_value_error()
-class TestGetLoadBalancerListener():
+
+class TestGetLoadBalancerListener:
"""
Test Class for get_load_balancer_listener
"""
@@ -32412,11 +34802,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32426,7 +34818,7 @@ def test_get_load_balancer_listener_all_params(self):
response = _service.get_load_balancer_listener(
load_balancer_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32450,11 +34842,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32466,7 +34860,7 @@ def test_get_load_balancer_listener_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_listener(**req_copy)
@@ -32479,7 +34873,8 @@ def test_get_load_balancer_listener_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_listener_value_error()
-class TestUpdateLoadBalancerListener():
+
+class TestUpdateLoadBalancerListener:
"""
Test Class for update_load_balancer_listener
"""
@@ -32492,11 +34887,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -32539,7 +34936,7 @@ def test_update_load_balancer_listener_all_params(self):
load_balancer_id,
id,
load_balancer_listener_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32566,11 +34963,13 @@ 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/123456: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": "anyValue"}], "port": 443, "port_max": 499, "port_min": 443, "protocol": "http", "provisioning_status": "active"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a CertificateInstanceIdentityByCRN model
certificate_instance_identity_model = {}
@@ -32615,7 +35014,7 @@ def test_update_load_balancer_listener_value_error(self):
"load_balancer_listener_patch": load_balancer_listener_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_load_balancer_listener(**req_copy)
@@ -32628,7 +35027,8 @@ def test_update_load_balancer_listener_value_error_with_retries(self):
_service.disable_retries()
self.test_update_load_balancer_listener_value_error()
-class TestListLoadBalancerListenerPolicies():
+
+class TestListLoadBalancerListenerPolicies:
"""
Test Class for list_load_balancer_listener_policies
"""
@@ -32641,11 +35041,13 @@ 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"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32655,7 +35057,7 @@ def test_list_load_balancer_listener_policies_all_params(self):
response = _service.list_load_balancer_listener_policies(
load_balancer_id,
listener_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32679,11 +35081,13 @@ 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"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32695,7 +35099,7 @@ def test_list_load_balancer_listener_policies_value_error(self):
"listener_id": listener_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancer_listener_policies(**req_copy)
@@ -32708,7 +35112,8 @@ def test_list_load_balancer_listener_policies_value_error_with_retries(self):
_service.disable_retries()
self.test_list_load_balancer_listener_policies_value_error()
-class TestCreateLoadBalancerListenerPolicy():
+
+class TestCreateLoadBalancerListenerPolicy:
"""
Test Class for create_load_balancer_listener_policy
"""
@@ -32721,11 +35126,13 @@ 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"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LoadBalancerListenerPolicyRulePrototype model
load_balancer_listener_policy_rule_prototype_model = {}
@@ -32756,7 +35163,7 @@ def test_create_load_balancer_listener_policy_all_params(self):
name=name,
rules=rules,
target=target,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32787,11 +35194,13 @@ 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"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LoadBalancerListenerPolicyRulePrototype model
load_balancer_listener_policy_rule_prototype_model = {}
@@ -32821,7 +35230,7 @@ def test_create_load_balancer_listener_policy_value_error(self):
"priority": priority,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_load_balancer_listener_policy(**req_copy)
@@ -32834,7 +35243,8 @@ def test_create_load_balancer_listener_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_create_load_balancer_listener_policy_value_error()
-class TestDeleteLoadBalancerListenerPolicy():
+
+class TestDeleteLoadBalancerListenerPolicy:
"""
Test Class for delete_load_balancer_listener_policy
"""
@@ -32846,9 +35256,11 @@ def test_delete_load_balancer_listener_policy_all_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32860,7 +35272,7 @@ def test_delete_load_balancer_listener_policy_all_params(self):
load_balancer_id,
listener_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32883,9 +35295,11 @@ def test_delete_load_balancer_listener_policy_value_error(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32899,7 +35313,7 @@ def test_delete_load_balancer_listener_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_load_balancer_listener_policy(**req_copy)
@@ -32912,7 +35326,8 @@ def test_delete_load_balancer_listener_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_load_balancer_listener_policy_value_error()
-class TestGetLoadBalancerListenerPolicy():
+
+class TestGetLoadBalancerListenerPolicy:
"""
Test Class for get_load_balancer_listener_policy
"""
@@ -32925,11 +35340,13 @@ 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"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32941,7 +35358,7 @@ def test_get_load_balancer_listener_policy_all_params(self):
load_balancer_id,
listener_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -32965,11 +35382,13 @@ 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"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -32983,7 +35402,7 @@ def test_get_load_balancer_listener_policy_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_listener_policy(**req_copy)
@@ -32996,7 +35415,8 @@ def test_get_load_balancer_listener_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_listener_policy_value_error()
-class TestUpdateLoadBalancerListenerPolicy():
+
+class TestUpdateLoadBalancerListenerPolicy:
"""
Test Class for update_load_balancer_listener_policy
"""
@@ -33009,11 +35429,13 @@ 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"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model
load_balancer_listener_policy_target_patch_model = {}
@@ -33037,7 +35459,7 @@ def test_update_load_balancer_listener_policy_all_params(self):
listener_id,
id,
load_balancer_listener_policy_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33064,11 +35486,13 @@ 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"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById model
load_balancer_listener_policy_target_patch_model = {}
@@ -33094,7 +35518,7 @@ def test_update_load_balancer_listener_policy_value_error(self):
"load_balancer_listener_policy_patch": load_balancer_listener_policy_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_load_balancer_listener_policy(**req_copy)
@@ -33107,7 +35531,8 @@ def test_update_load_balancer_listener_policy_value_error_with_retries(self):
_service.disable_retries()
self.test_update_load_balancer_listener_policy_value_error()
-class TestListLoadBalancerListenerPolicyRules():
+
+class TestListLoadBalancerListenerPolicyRules:
"""
Test Class for list_load_balancer_listener_policy_rules
"""
@@ -33120,11 +35545,13 @@ 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"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33136,7 +35563,7 @@ def test_list_load_balancer_listener_policy_rules_all_params(self):
load_balancer_id,
listener_id,
policy_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33160,11 +35587,13 @@ 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"}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33178,7 +35607,7 @@ def test_list_load_balancer_listener_policy_rules_value_error(self):
"policy_id": policy_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancer_listener_policy_rules(**req_copy)
@@ -33191,7 +35620,8 @@ def test_list_load_balancer_listener_policy_rules_value_error_with_retries(self)
_service.disable_retries()
self.test_list_load_balancer_listener_policy_rules_value_error()
-class TestCreateLoadBalancerListenerPolicyRule():
+
+class TestCreateLoadBalancerListenerPolicyRule:
"""
Test Class for create_load_balancer_listener_policy_rule
"""
@@ -33204,11 +35634,13 @@ 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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33228,7 +35660,7 @@ def test_create_load_balancer_listener_policy_rule_all_params(self):
type,
value,
field=field,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33258,11 +35690,13 @@ 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"}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33283,7 +35717,7 @@ def test_create_load_balancer_listener_policy_rule_value_error(self):
"value": value,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_load_balancer_listener_policy_rule(**req_copy)
@@ -33296,7 +35730,8 @@ def test_create_load_balancer_listener_policy_rule_value_error_with_retries(self
_service.disable_retries()
self.test_create_load_balancer_listener_policy_rule_value_error()
-class TestDeleteLoadBalancerListenerPolicyRule():
+
+class TestDeleteLoadBalancerListenerPolicyRule:
"""
Test Class for delete_load_balancer_listener_policy_rule
"""
@@ -33308,9 +35743,11 @@ def test_delete_load_balancer_listener_policy_rule_all_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33324,7 +35761,7 @@ def test_delete_load_balancer_listener_policy_rule_all_params(self):
listener_id,
policy_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33347,9 +35784,11 @@ def test_delete_load_balancer_listener_policy_rule_value_error(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/listeners/testString/policies/testString/rules/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33365,7 +35804,7 @@ def test_delete_load_balancer_listener_policy_rule_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_load_balancer_listener_policy_rule(**req_copy)
@@ -33378,7 +35817,8 @@ def test_delete_load_balancer_listener_policy_rule_value_error_with_retries(self
_service.disable_retries()
self.test_delete_load_balancer_listener_policy_rule_value_error()
-class TestGetLoadBalancerListenerPolicyRule():
+
+class TestGetLoadBalancerListenerPolicyRule:
"""
Test Class for get_load_balancer_listener_policy_rule
"""
@@ -33391,11 +35831,13 @@ 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"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33409,7 +35851,7 @@ def test_get_load_balancer_listener_policy_rule_all_params(self):
listener_id,
policy_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33433,11 +35875,13 @@ 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"}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33453,7 +35897,7 @@ def test_get_load_balancer_listener_policy_rule_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_listener_policy_rule(**req_copy)
@@ -33466,7 +35910,8 @@ def test_get_load_balancer_listener_policy_rule_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_listener_policy_rule_value_error()
-class TestUpdateLoadBalancerListenerPolicyRule():
+
+class TestUpdateLoadBalancerListenerPolicyRule:
"""
Test Class for update_load_balancer_listener_policy_rule
"""
@@ -33479,11 +35924,13 @@ 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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerListenerPolicyRulePatch model
load_balancer_listener_policy_rule_patch_model = {}
@@ -33506,7 +35953,7 @@ def test_update_load_balancer_listener_policy_rule_all_params(self):
policy_id,
id,
load_balancer_listener_policy_rule_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33533,11 +35980,13 @@ 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"}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerListenerPolicyRulePatch model
load_balancer_listener_policy_rule_patch_model = {}
@@ -33562,7 +36011,7 @@ def test_update_load_balancer_listener_policy_rule_value_error(self):
"load_balancer_listener_policy_rule_patch": load_balancer_listener_policy_rule_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_load_balancer_listener_policy_rule(**req_copy)
@@ -33575,7 +36024,8 @@ def test_update_load_balancer_listener_policy_rule_value_error_with_retries(self
_service.disable_retries()
self.test_update_load_balancer_listener_policy_rule_value_error()
-class TestListLoadBalancerPools():
+
+class TestListLoadBalancerPools:
"""
Test Class for list_load_balancer_pools
"""
@@ -33588,11 +36038,13 @@ 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/123456::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"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33600,7 +36052,7 @@ def test_list_load_balancer_pools_all_params(self):
# Invoke method
response = _service.list_load_balancer_pools(
load_balancer_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33624,11 +36076,13 @@ 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/123456::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"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33638,7 +36092,7 @@ def test_list_load_balancer_pools_value_error(self):
"load_balancer_id": load_balancer_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancer_pools(**req_copy)
@@ -33651,7 +36105,8 @@ def test_list_load_balancer_pools_value_error_with_retries(self):
_service.disable_retries()
self.test_list_load_balancer_pools_value_error()
-class TestCreateLoadBalancerPool():
+
+class TestCreateLoadBalancerPool:
"""
Test Class for create_load_balancer_pool
"""
@@ -33664,11 +36119,13 @@ 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/123456::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"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LoadBalancerPoolHealthMonitorPrototype model
load_balancer_pool_health_monitor_prototype_model = {}
@@ -33714,7 +36171,7 @@ def test_create_load_balancer_pool_all_params(self):
name=name,
proxy_protocol=proxy_protocol,
session_persistence=session_persistence,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33747,11 +36204,13 @@ 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/123456::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"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LoadBalancerPoolHealthMonitorPrototype model
load_balancer_pool_health_monitor_prototype_model = {}
@@ -33795,7 +36254,7 @@ def test_create_load_balancer_pool_value_error(self):
"protocol": protocol,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_load_balancer_pool(**req_copy)
@@ -33808,7 +36267,8 @@ def test_create_load_balancer_pool_value_error_with_retries(self):
_service.disable_retries()
self.test_create_load_balancer_pool_value_error()
-class TestDeleteLoadBalancerPool():
+
+class TestDeleteLoadBalancerPool:
"""
Test Class for delete_load_balancer_pool
"""
@@ -33820,9 +36280,11 @@ def test_delete_load_balancer_pool_all_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/pools/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33832,7 +36294,7 @@ def test_delete_load_balancer_pool_all_params(self):
response = _service.delete_load_balancer_pool(
load_balancer_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33855,9 +36317,11 @@ def test_delete_load_balancer_pool_value_error(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/pools/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33869,7 +36333,7 @@ def test_delete_load_balancer_pool_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_load_balancer_pool(**req_copy)
@@ -33882,7 +36346,8 @@ def test_delete_load_balancer_pool_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_load_balancer_pool_value_error()
-class TestGetLoadBalancerPool():
+
+class TestGetLoadBalancerPool:
"""
Test Class for get_load_balancer_pool
"""
@@ -33895,11 +36360,13 @@ 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/123456::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"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33909,7 +36376,7 @@ def test_get_load_balancer_pool_all_params(self):
response = _service.get_load_balancer_pool(
load_balancer_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -33933,11 +36400,13 @@ 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/123456::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"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -33949,7 +36418,7 @@ def test_get_load_balancer_pool_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_pool(**req_copy)
@@ -33962,7 +36431,8 @@ def test_get_load_balancer_pool_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_pool_value_error()
-class TestUpdateLoadBalancerPool():
+
+class TestUpdateLoadBalancerPool:
"""
Test Class for update_load_balancer_pool
"""
@@ -33975,11 +36445,13 @@ 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/123456::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"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerPoolHealthMonitorPatch model
load_balancer_pool_health_monitor_patch_model = {}
@@ -34014,7 +36486,7 @@ def test_update_load_balancer_pool_all_params(self):
load_balancer_id,
id,
load_balancer_pool_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34041,11 +36513,13 @@ 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/123456::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"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerPoolHealthMonitorPatch model
load_balancer_pool_health_monitor_patch_model = {}
@@ -34082,7 +36556,7 @@ def test_update_load_balancer_pool_value_error(self):
"load_balancer_pool_patch": load_balancer_pool_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_load_balancer_pool(**req_copy)
@@ -34095,7 +36569,8 @@ def test_update_load_balancer_pool_value_error_with_retries(self):
_service.disable_retries()
self.test_update_load_balancer_pool_value_error()
-class TestListLoadBalancerPoolMembers():
+
+class TestListLoadBalancerPoolMembers:
"""
Test Class for list_load_balancer_pool_members
"""
@@ -34108,11 +36583,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -34122,7 +36599,7 @@ def test_list_load_balancer_pool_members_all_params(self):
response = _service.list_load_balancer_pool_members(
load_balancer_id,
pool_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34146,11 +36623,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -34162,7 +36641,7 @@ def test_list_load_balancer_pool_members_value_error(self):
"pool_id": pool_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_load_balancer_pool_members(**req_copy)
@@ -34175,7 +36654,8 @@ def test_list_load_balancer_pool_members_value_error_with_retries(self):
_service.disable_retries()
self.test_list_load_balancer_pool_members_value_error()
-class TestCreateLoadBalancerPoolMember():
+
+class TestCreateLoadBalancerPoolMember:
"""
Test Class for create_load_balancer_pool_member
"""
@@ -34188,11 +36668,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model
load_balancer_pool_member_target_prototype_model = {}
@@ -34212,7 +36694,7 @@ def test_create_load_balancer_pool_member_all_params(self):
port,
target,
weight=weight,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34241,11 +36723,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model
load_balancer_pool_member_target_prototype_model = {}
@@ -34266,7 +36750,7 @@ def test_create_load_balancer_pool_member_value_error(self):
"target": target,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_load_balancer_pool_member(**req_copy)
@@ -34279,7 +36763,8 @@ def test_create_load_balancer_pool_member_value_error_with_retries(self):
_service.disable_retries()
self.test_create_load_balancer_pool_member_value_error()
-class TestReplaceLoadBalancerPoolMembers():
+
+class TestReplaceLoadBalancerPoolMembers:
"""
Test Class for replace_load_balancer_pool_members
"""
@@ -34292,11 +36777,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model
load_balancer_pool_member_target_prototype_model = {}
@@ -34318,7 +36805,7 @@ def test_replace_load_balancer_pool_members_all_params(self):
load_balancer_id,
pool_id,
members,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34345,11 +36832,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}]}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=202)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=202,
+ )
# Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model
load_balancer_pool_member_target_prototype_model = {}
@@ -34373,7 +36862,7 @@ def test_replace_load_balancer_pool_members_value_error(self):
"members": members,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.replace_load_balancer_pool_members(**req_copy)
@@ -34386,7 +36875,8 @@ def test_replace_load_balancer_pool_members_value_error_with_retries(self):
_service.disable_retries()
self.test_replace_load_balancer_pool_members_value_error()
-class TestDeleteLoadBalancerPoolMember():
+
+class TestDeleteLoadBalancerPoolMember:
"""
Test Class for delete_load_balancer_pool_member
"""
@@ -34398,9 +36888,11 @@ def test_delete_load_balancer_pool_member_all_params(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/pools/testString/members/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -34412,7 +36904,7 @@ def test_delete_load_balancer_pool_member_all_params(self):
load_balancer_id,
pool_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34435,9 +36927,11 @@ def test_delete_load_balancer_pool_member_value_error(self):
"""
# Set up mock
url = preprocess_url('/load_balancers/testString/pools/testString/members/testString')
- responses.add(responses.DELETE,
- url,
- status=202)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=202,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -34451,7 +36945,7 @@ def test_delete_load_balancer_pool_member_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_load_balancer_pool_member(**req_copy)
@@ -34464,7 +36958,8 @@ def test_delete_load_balancer_pool_member_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_load_balancer_pool_member_value_error()
-class TestGetLoadBalancerPoolMember():
+
+class TestGetLoadBalancerPoolMember:
"""
Test Class for get_load_balancer_pool_member
"""
@@ -34477,11 +36972,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -34493,7 +36990,7 @@ def test_get_load_balancer_pool_member_all_params(self):
load_balancer_id,
pool_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34517,11 +37014,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
load_balancer_id = 'testString'
@@ -34535,7 +37034,7 @@ def test_get_load_balancer_pool_member_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_load_balancer_pool_member(**req_copy)
@@ -34548,7 +37047,8 @@ def test_get_load_balancer_pool_member_value_error_with_retries(self):
_service.disable_retries()
self.test_get_load_balancer_pool_member_value_error()
-class TestUpdateLoadBalancerPoolMember():
+
+class TestUpdateLoadBalancerPoolMember:
"""
Test Class for update_load_balancer_pool_member
"""
@@ -34561,11 +37061,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model
load_balancer_pool_member_target_prototype_model = {}
@@ -34589,7 +37091,7 @@ def test_update_load_balancer_pool_member_all_params(self):
pool_id,
id,
load_balancer_pool_member_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34616,11 +37118,13 @@ 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/123456::instance: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/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "weight": 50}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById model
load_balancer_pool_member_target_prototype_model = {}
@@ -34646,7 +37150,7 @@ def test_update_load_balancer_pool_member_value_error(self):
"load_balancer_pool_member_patch": load_balancer_pool_member_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_load_balancer_pool_member(**req_copy)
@@ -34659,6 +37163,7 @@ def test_update_load_balancer_pool_member_value_error_with_retries(self):
_service.disable_retries()
self.test_update_load_balancer_pool_member_value_error()
+
# endregion
##############################################################################
# End of Service: LoadBalancers
@@ -34669,7 +37174,8 @@ def test_update_load_balancer_pool_member_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -34714,7 +37220,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListEndpointGateways():
+
+class TestListEndpointGateways:
"""
Test Class for list_endpoint_gateways
"""
@@ -34727,11 +37234,13 @@ def test_list_endpoint_gateways_all_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways')
mock_response = '{"endpoint_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
name = 'testString'
@@ -34745,14 +37254,14 @@ def test_list_endpoint_gateways_all_params(self):
start=start,
limit=limit,
resource_group_id=resource_group_id,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'name={}'.format(name) in query_string
assert 'start={}'.format(start) in query_string
@@ -34776,16 +37285,17 @@ def test_list_endpoint_gateways_required_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways')
mock_response = '{"endpoint_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_endpoint_gateways()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -34807,17 +37317,19 @@ def test_list_endpoint_gateways_value_error(self):
# Set up mock
url = preprocess_url('/endpoint_gateways')
mock_response = '{"endpoint_gateways": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_endpoint_gateways(**req_copy)
@@ -34839,16 +37351,20 @@ def test_list_endpoint_gateways_with_pager_get_next(self):
url = preprocess_url('/endpoint_gateways')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}'
mock_response2 = '{"endpoint_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = []
@@ -34873,16 +37389,20 @@ def test_list_endpoint_gateways_with_pager_get_all(self):
url = preprocess_url('/endpoint_gateways')
mock_response1 = '{"next":{"href":"https://myhost.com/somePath?start=1"},"endpoint_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"total_count":2,"limit":1}'
mock_response2 = '{"endpoint_gateways":[{"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","name":"my-reserved-ip","resource_type":"subnet_reserved_ip"}],"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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271","id":"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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::","resource_type":"provider_cloud_service"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}],"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)
+ 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 = EndpointGatewaysPager(
@@ -34895,7 +37415,8 @@ def test_list_endpoint_gateways_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateEndpointGateway():
+
+class TestCreateEndpointGateway:
"""
Test Class for create_endpoint_gateway
"""
@@ -34908,11 +37429,13 @@ def test_create_endpoint_gateway_all_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN model
endpoint_gateway_target_prototype_model = {}
@@ -34951,7 +37474,7 @@ def test_create_endpoint_gateway_all_params(self):
name=name,
resource_group=resource_group,
security_groups=security_groups,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -34983,11 +37506,13 @@ def test_create_endpoint_gateway_value_error(self):
# Set up mock
url = preprocess_url('/endpoint_gateways')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN model
endpoint_gateway_target_prototype_model = {}
@@ -35024,7 +37549,7 @@ def test_create_endpoint_gateway_value_error(self):
"vpc": vpc,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_endpoint_gateway(**req_copy)
@@ -35037,7 +37562,8 @@ def test_create_endpoint_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_create_endpoint_gateway_value_error()
-class TestListEndpointGatewayIps():
+
+class TestListEndpointGatewayIps:
"""
Test Class for list_endpoint_gateway_ips
"""
@@ -35050,11 +37576,13 @@ def test_list_endpoint_gateway_ips_all_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString/ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35068,14 +37596,14 @@ def test_list_endpoint_gateway_ips_all_params(self):
start=start,
limit=limit,
sort=sort,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -35098,11 +37626,13 @@ def test_list_endpoint_gateway_ips_required_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString/ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35110,7 +37640,7 @@ def test_list_endpoint_gateway_ips_required_params(self):
# Invoke method
response = _service.list_endpoint_gateway_ips(
endpoint_gateway_id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35134,11 +37664,13 @@ def test_list_endpoint_gateway_ips_value_error(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString/ips')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20"}, "ips": [{"address": "192.168.3.4", "auto_delete": false, "created_at": "2019-01-01T12:00:00.000Z", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35148,7 +37680,7 @@ def test_list_endpoint_gateway_ips_value_error(self):
"endpoint_gateway_id": endpoint_gateway_id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_endpoint_gateway_ips(**req_copy)
@@ -35170,16 +37702,20 @@ def test_list_endpoint_gateway_ips_with_pager_get_next(self):
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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = []
@@ -35204,16 +37740,20 @@ def test_list_endpoint_gateway_ips_with_pager_get_all(self):
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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb","id":"6d353a0f-aeb1-4ae1-832e-1110d10981bb","lifecycle_state":"stable","name":"my-reserved-ip","owner":"user","resource_type":"subnet_reserved_ip","target":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","id":"r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5","name":"my-endpoint-gateway","resource_type":"endpoint_gateway"}}]}'
- responses.add(responses.GET,
- url,
- body=mock_response1,
- content_type='application/json',
- status=200)
- responses.add(responses.GET,
- url,
- body=mock_response2,
- content_type='application/json',
- status=200)
+ 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 = EndpointGatewayIpsPager(
@@ -35226,7 +37766,8 @@ def test_list_endpoint_gateway_ips_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestRemoveEndpointGatewayIp():
+
+class TestRemoveEndpointGatewayIp:
"""
Test Class for remove_endpoint_gateway_ip
"""
@@ -35238,9 +37779,11 @@ def test_remove_endpoint_gateway_ip_all_params(self):
"""
# Set up mock
url = preprocess_url('/endpoint_gateways/testString/ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35250,7 +37793,7 @@ def test_remove_endpoint_gateway_ip_all_params(self):
response = _service.remove_endpoint_gateway_ip(
endpoint_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35273,9 +37816,11 @@ def test_remove_endpoint_gateway_ip_value_error(self):
"""
# Set up mock
url = preprocess_url('/endpoint_gateways/testString/ips/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35287,7 +37832,7 @@ def test_remove_endpoint_gateway_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.remove_endpoint_gateway_ip(**req_copy)
@@ -35300,7 +37845,8 @@ def test_remove_endpoint_gateway_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_remove_endpoint_gateway_ip_value_error()
-class TestGetEndpointGatewayIp():
+
+class TestGetEndpointGatewayIp:
"""
Test Class for get_endpoint_gateway_ip
"""
@@ -35313,11 +37859,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35327,7 +37875,7 @@ def test_get_endpoint_gateway_ip_all_params(self):
response = _service.get_endpoint_gateway_ip(
endpoint_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35351,11 +37899,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35367,7 +37917,7 @@ def test_get_endpoint_gateway_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_endpoint_gateway_ip(**req_copy)
@@ -35380,7 +37930,8 @@ def test_get_endpoint_gateway_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_get_endpoint_gateway_ip_value_error()
-class TestAddEndpointGatewayIp():
+
+class TestAddEndpointGatewayIp:
"""
Test Class for add_endpoint_gateway_ip
"""
@@ -35393,11 +37944,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35407,7 +37960,7 @@ def test_add_endpoint_gateway_ip_all_params(self):
response = _service.add_endpoint_gateway_ip(
endpoint_gateway_id,
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35431,11 +37984,13 @@ 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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "lifecycle_state": "stable", "name": "my-reserved-ip", "owner": "user", "resource_type": "subnet_reserved_ip", "target": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "id": "r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5", "name": "my-endpoint-gateway", "resource_type": "endpoint_gateway"}}'
- responses.add(responses.PUT,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.PUT,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Set up parameter values
endpoint_gateway_id = 'testString'
@@ -35447,7 +38002,7 @@ def test_add_endpoint_gateway_ip_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.add_endpoint_gateway_ip(**req_copy)
@@ -35460,7 +38015,8 @@ def test_add_endpoint_gateway_ip_value_error_with_retries(self):
_service.disable_retries()
self.test_add_endpoint_gateway_ip_value_error()
-class TestDeleteEndpointGateway():
+
+class TestDeleteEndpointGateway:
"""
Test Class for delete_endpoint_gateway
"""
@@ -35472,9 +38028,11 @@ def test_delete_endpoint_gateway_all_params(self):
"""
# Set up mock
url = preprocess_url('/endpoint_gateways/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -35482,7 +38040,7 @@ def test_delete_endpoint_gateway_all_params(self):
# Invoke method
response = _service.delete_endpoint_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35505,9 +38063,11 @@ def test_delete_endpoint_gateway_value_error(self):
"""
# Set up mock
url = preprocess_url('/endpoint_gateways/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -35517,7 +38077,7 @@ def test_delete_endpoint_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_endpoint_gateway(**req_copy)
@@ -35530,7 +38090,8 @@ def test_delete_endpoint_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_endpoint_gateway_value_error()
-class TestGetEndpointGateway():
+
+class TestGetEndpointGateway:
"""
Test Class for get_endpoint_gateway
"""
@@ -35543,11 +38104,13 @@ def test_get_endpoint_gateway_all_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -35555,7 +38118,7 @@ def test_get_endpoint_gateway_all_params(self):
# Invoke method
response = _service.get_endpoint_gateway(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35579,11 +38142,13 @@ def test_get_endpoint_gateway_value_error(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -35593,7 +38158,7 @@ def test_get_endpoint_gateway_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_endpoint_gateway(**req_copy)
@@ -35606,7 +38171,8 @@ def test_get_endpoint_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_get_endpoint_gateway_value_error()
-class TestUpdateEndpointGateway():
+
+class TestUpdateEndpointGateway:
"""
Test Class for update_endpoint_gateway
"""
@@ -35619,11 +38185,13 @@ def test_update_endpoint_gateway_all_params(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a EndpointGatewayPatch model
endpoint_gateway_patch_model = {}
@@ -35637,7 +38205,7 @@ def test_update_endpoint_gateway_all_params(self):
response = _service.update_endpoint_gateway(
id,
endpoint_gateway_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -35664,11 +38232,13 @@ def test_update_endpoint_gateway_value_error(self):
# Set up mock
url = preprocess_url('/endpoint_gateways/testString')
mock_response = '{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::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/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb", "id": "6d353a0f-aeb1-4ae1-832e-1110d10981bb", "name": "my-reserved-ip", "resource_type": "subnet_reserved_ip"}], "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/123456::security-group: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/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "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:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::", "resource_type": "provider_cloud_service"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a EndpointGatewayPatch model
endpoint_gateway_patch_model = {}
@@ -35684,7 +38254,7 @@ def test_update_endpoint_gateway_value_error(self):
"endpoint_gateway_patch": endpoint_gateway_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_endpoint_gateway(**req_copy)
@@ -35697,6 +38267,7 @@ def test_update_endpoint_gateway_value_error_with_retries(self):
_service.disable_retries()
self.test_update_endpoint_gateway_value_error()
+
# endregion
##############################################################################
# End of Service: EndpointGateways
@@ -35707,7 +38278,8 @@ def test_update_endpoint_gateway_value_error_with_retries(self):
##############################################################################
# region
-class TestNewInstance():
+
+class TestNewInstance:
"""
Test Class for new_instance
"""
@@ -35745,7 +38317,8 @@ def test_new_instance_required_param_none(self):
version=None,
)
-class TestListFlowLogCollectors():
+
+class TestListFlowLogCollectors:
"""
Test Class for list_flow_log_collectors
"""
@@ -35758,11 +38331,13 @@ def test_list_flow_log_collectors_all_params(self):
# Set up mock
url = preprocess_url('/flow_log_collectors')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
start = 'testString'
@@ -35786,14 +38361,14 @@ def test_list_flow_log_collectors_all_params(self):
vpc_name=vpc_name,
target_id=target_id,
target_resource_type=target_resource_type,
- headers={}
+ 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 = responses.calls[0].request.url.split('?', 1)[1]
query_string = urllib.parse.unquote_plus(query_string)
assert 'start={}'.format(start) in query_string
assert 'limit={}'.format(limit) in query_string
@@ -35822,16 +38397,17 @@ def test_list_flow_log_collectors_required_params(self):
# Set up mock
url = preprocess_url('/flow_log_collectors')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Invoke method
response = _service.list_flow_log_collectors()
-
# Check for correct operation
assert len(responses.calls) == 1
assert response.status_code == 200
@@ -35853,17 +38429,19 @@ def test_list_flow_log_collectors_value_error(self):
# Set up mock
url = preprocess_url('/flow_log_collectors')
mock_response = '{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Pass in all but one required param and check for a ValueError
req_param_dict = {
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.list_flow_log_collectors(**req_copy)
@@ -35885,16 +38463,20 @@ def test_list_flow_log_collectors_with_pager_get_next(self):
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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}'
- 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)
+ 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 = []
@@ -35924,16 +38506,20 @@ def test_list_flow_log_collectors_with_pager_get_all(self):
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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e","id":"10c02d81-0ecb-4dc5-897d-28392913b81e","name":"my-network-interface","resource_type":"network_interface"},"vpc":{"crn":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","deleted":{"more_info":"https://cloud.ibm.com/apidocs/vpc#deleted-resources"},"href":"https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b","id":"4727d842-f94f-4a2d-824a-9bc9b02c523b","name":"my-vpc","resource_type":"vpc"}}]}'
- 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)
+ 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 = FlowLogCollectorsPager(
@@ -35951,7 +38537,8 @@ def test_list_flow_log_collectors_with_pager_get_all(self):
assert all_results is not None
assert len(all_results) == 2
-class TestCreateFlowLogCollector():
+
+class TestCreateFlowLogCollector:
"""
Test Class for create_flow_log_collector
"""
@@ -35964,17 +38551,19 @@ 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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model
legacy_cloud_object_storage_bucket_identity_model = {}
legacy_cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue'
- # Construct a dict representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById model
+ # Construct a dict representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model
flow_log_collector_target_prototype_model = {}
flow_log_collector_target_prototype_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -35996,7 +38585,7 @@ def test_create_flow_log_collector_all_params(self):
active=active,
name=name,
resource_group=resource_group,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -36027,17 +38616,19 @@ 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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.POST,
- url,
- body=mock_response,
- content_type='application/json',
- status=201)
+ responses.add(
+ responses.POST,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=201,
+ )
# Construct a dict representation of a LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model
legacy_cloud_object_storage_bucket_identity_model = {}
legacy_cloud_object_storage_bucket_identity_model['name'] = 'bucket-27200-lwx4cfvcue'
- # Construct a dict representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById model
+ # Construct a dict representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById model
flow_log_collector_target_prototype_model = {}
flow_log_collector_target_prototype_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -36058,7 +38649,7 @@ def test_create_flow_log_collector_value_error(self):
"target": target,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.create_flow_log_collector(**req_copy)
@@ -36071,7 +38662,8 @@ def test_create_flow_log_collector_value_error_with_retries(self):
_service.disable_retries()
self.test_create_flow_log_collector_value_error()
-class TestDeleteFlowLogCollector():
+
+class TestDeleteFlowLogCollector:
"""
Test Class for delete_flow_log_collector
"""
@@ -36083,9 +38675,11 @@ def test_delete_flow_log_collector_all_params(self):
"""
# Set up mock
url = preprocess_url('/flow_log_collectors/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -36093,7 +38687,7 @@ def test_delete_flow_log_collector_all_params(self):
# Invoke method
response = _service.delete_flow_log_collector(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -36116,9 +38710,11 @@ def test_delete_flow_log_collector_value_error(self):
"""
# Set up mock
url = preprocess_url('/flow_log_collectors/testString')
- responses.add(responses.DELETE,
- url,
- status=204)
+ responses.add(
+ responses.DELETE,
+ url,
+ status=204,
+ )
# Set up parameter values
id = 'testString'
@@ -36128,7 +38724,7 @@ def test_delete_flow_log_collector_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.delete_flow_log_collector(**req_copy)
@@ -36141,7 +38737,8 @@ def test_delete_flow_log_collector_value_error_with_retries(self):
_service.disable_retries()
self.test_delete_flow_log_collector_value_error()
-class TestGetFlowLogCollector():
+
+class TestGetFlowLogCollector:
"""
Test Class for get_flow_log_collector
"""
@@ -36154,11 +38751,13 @@ 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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -36166,7 +38765,7 @@ def test_get_flow_log_collector_all_params(self):
# Invoke method
response = _service.get_flow_log_collector(
id,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -36190,11 +38789,13 @@ 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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.GET,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.GET,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Set up parameter values
id = 'testString'
@@ -36204,7 +38805,7 @@ def test_get_flow_log_collector_value_error(self):
"id": id,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.get_flow_log_collector(**req_copy)
@@ -36217,7 +38818,8 @@ def test_get_flow_log_collector_value_error_with_retries(self):
_service.disable_retries()
self.test_get_flow_log_collector_value_error()
-class TestUpdateFlowLogCollector():
+
+class TestUpdateFlowLogCollector:
"""
Test Class for update_flow_log_collector
"""
@@ -36230,11 +38832,13 @@ 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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a FlowLogCollectorPatch model
flow_log_collector_patch_model = {}
@@ -36249,7 +38853,7 @@ def test_update_flow_log_collector_all_params(self):
response = _service.update_flow_log_collector(
id,
flow_log_collector_patch,
- headers={}
+ headers={},
)
# Check for correct operation
@@ -36276,11 +38880,13 @@ 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/123456::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/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc", "resource_type": "vpc"}}'
- responses.add(responses.PATCH,
- url,
- body=mock_response,
- content_type='application/json',
- status=200)
+ responses.add(
+ responses.PATCH,
+ url,
+ body=mock_response,
+ content_type='application/json',
+ status=200,
+ )
# Construct a dict representation of a FlowLogCollectorPatch model
flow_log_collector_patch_model = {}
@@ -36297,7 +38903,7 @@ def test_update_flow_log_collector_value_error(self):
"flow_log_collector_patch": flow_log_collector_patch,
}
for param in req_param_dict.keys():
- req_copy = {key:val if key is not param else None for (key,val) in req_param_dict.items()}
+ req_copy = {key: val if key is not param else None for (key, val) in req_param_dict.items()}
with pytest.raises(ValueError):
_service.update_flow_log_collector(**req_copy)
@@ -36310,6 +38916,7 @@ def test_update_flow_log_collector_value_error_with_retries(self):
_service.disable_retries()
self.test_update_flow_log_collector_value_error()
+
# endregion
##############################################################################
# End of Service: FlowLogCollectors
@@ -36320,7 +38927,9 @@ def test_update_flow_log_collector_value_error_with_retries(self):
# Start of Model Tests
##############################################################################
# region
-class TestModel_AddressPrefix():
+
+
+class TestModel_AddressPrefix:
"""
Test Class for AddressPrefix
"""
@@ -36332,7 +38941,7 @@ def test_address_prefix_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
@@ -36362,7 +38971,8 @@ def test_address_prefix_serialization(self):
address_prefix_model_json2 = address_prefix_model.to_dict()
assert address_prefix_model_json2 == address_prefix_model_json
-class TestModel_AddressPrefixCollection():
+
+class TestModel_AddressPrefixCollection:
"""
Test Class for AddressPrefixCollection
"""
@@ -36374,11 +38984,11 @@ def test_address_prefix_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
- address_prefix_model = {} # AddressPrefix
+ address_prefix_model = {} # AddressPrefix
address_prefix_model['cidr'] = '192.168.3.0/24'
address_prefix_model['created_at'] = '2019-01-01T12:00:00Z'
address_prefix_model['has_subnets'] = True
@@ -36388,10 +38998,10 @@ def test_address_prefix_collection_serialization(self):
address_prefix_model['name'] = 'my-address-prefix-1'
address_prefix_model['zone'] = zone_reference_model
- address_prefix_collection_first_model = {} # AddressPrefixCollectionFirst
+ address_prefix_collection_first_model = {} # AddressPrefixCollectionFirst
address_prefix_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?limit=20'
- address_prefix_collection_next_model = {} # AddressPrefixCollectionNext
+ address_prefix_collection_next_model = {} # AddressPrefixCollectionNext
address_prefix_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/a4e28308-8ee7-46ab-8108-9f881f22bdbf/address_prefixes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a AddressPrefixCollection model
@@ -36417,7 +39027,8 @@ def test_address_prefix_collection_serialization(self):
address_prefix_collection_model_json2 = address_prefix_collection_model.to_dict()
assert address_prefix_collection_model_json2 == address_prefix_collection_model_json
-class TestModel_AddressPrefixCollectionFirst():
+
+class TestModel_AddressPrefixCollectionFirst:
"""
Test Class for AddressPrefixCollectionFirst
"""
@@ -36446,7 +39057,8 @@ def test_address_prefix_collection_first_serialization(self):
address_prefix_collection_first_model_json2 = address_prefix_collection_first_model.to_dict()
assert address_prefix_collection_first_model_json2 == address_prefix_collection_first_model_json
-class TestModel_AddressPrefixCollectionNext():
+
+class TestModel_AddressPrefixCollectionNext:
"""
Test Class for AddressPrefixCollectionNext
"""
@@ -36475,7 +39087,8 @@ def test_address_prefix_collection_next_serialization(self):
address_prefix_collection_next_model_json2 = address_prefix_collection_next_model.to_dict()
assert address_prefix_collection_next_model_json2 == address_prefix_collection_next_model_json
-class TestModel_AddressPrefixPatch():
+
+class TestModel_AddressPrefixPatch:
"""
Test Class for AddressPrefixPatch
"""
@@ -36505,7 +39118,8 @@ def test_address_prefix_patch_serialization(self):
address_prefix_patch_model_json2 = address_prefix_patch_model.to_dict()
assert address_prefix_patch_model_json2 == address_prefix_patch_model_json
-class TestModel_BackupPolicy():
+
+class TestModel_BackupPolicy:
"""
Test Class for BackupPolicy
"""
@@ -36517,17 +39131,17 @@ def test_backup_policy_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
+ backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model
backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['name'] = 'my-policy-plan'
backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
@@ -36562,7 +39176,8 @@ def test_backup_policy_serialization(self):
backup_policy_model_json2 = backup_policy_model.to_dict()
assert backup_policy_model_json2 == backup_policy_model_json
-class TestModel_BackupPolicyCollection():
+
+class TestModel_BackupPolicyCollection:
"""
Test Class for BackupPolicyCollection
"""
@@ -36574,22 +39189,22 @@ def test_backup_policy_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
+ backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model
backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['name'] = 'my-policy-plan'
backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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_model = {} # BackupPolicy
+ backup_policy_model = {} # BackupPolicy
backup_policy_model['created_at'] = '2019-01-01T12:00:00Z'
backup_policy_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::backup-policy:r134-076191ba-49c2-4763-94fd-c70de73ee2e6'
backup_policy_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6'
@@ -36603,10 +39218,10 @@ def test_backup_policy_collection_serialization(self):
backup_policy_model['resource_group'] = resource_group_reference_model
backup_policy_model['resource_type'] = 'backup_policy'
- backup_policy_collection_first_model = {} # BackupPolicyCollectionFirst
+ backup_policy_collection_first_model = {} # BackupPolicyCollectionFirst
backup_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?limit=20'
- backup_policy_collection_next_model = {} # BackupPolicyCollectionNext
+ backup_policy_collection_next_model = {} # BackupPolicyCollectionNext
backup_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a BackupPolicyCollection model
@@ -36632,7 +39247,8 @@ def test_backup_policy_collection_serialization(self):
backup_policy_collection_model_json2 = backup_policy_collection_model.to_dict()
assert backup_policy_collection_model_json2 == backup_policy_collection_model_json
-class TestModel_BackupPolicyCollectionFirst():
+
+class TestModel_BackupPolicyCollectionFirst:
"""
Test Class for BackupPolicyCollectionFirst
"""
@@ -36661,7 +39277,8 @@ def test_backup_policy_collection_first_serialization(self):
backup_policy_collection_first_model_json2 = backup_policy_collection_first_model.to_dict()
assert backup_policy_collection_first_model_json2 == backup_policy_collection_first_model_json
-class TestModel_BackupPolicyCollectionNext():
+
+class TestModel_BackupPolicyCollectionNext:
"""
Test Class for BackupPolicyCollectionNext
"""
@@ -36690,7 +39307,8 @@ def test_backup_policy_collection_next_serialization(self):
backup_policy_collection_next_model_json2 = backup_policy_collection_next_model.to_dict()
assert backup_policy_collection_next_model_json2 == backup_policy_collection_next_model_json
-class TestModel_BackupPolicyJob():
+
+class TestModel_BackupPolicyJob:
"""
Test Class for BackupPolicyJob
"""
@@ -36702,35 +39320,35 @@ def test_backup_policy_job_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
+ backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model
backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['name'] = 'my-policy-plan'
backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan'
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_job_source_model = {} # BackupPolicyJobSourceVolumeReference
+ backup_policy_job_source_model = {} # BackupPolicyJobSourceVolumeReference
backup_policy_job_source_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
backup_policy_job_source_model['deleted'] = volume_reference_deleted_model
backup_policy_job_source_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
backup_policy_job_source_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
backup_policy_job_source_model['name'] = 'my-volume'
- backup_policy_job_status_reason_model = {} # BackupPolicyJobStatusReason
+ backup_policy_job_status_reason_model = {} # BackupPolicyJobStatusReason
backup_policy_job_status_reason_model['code'] = 'source_volume_busy'
backup_policy_job_status_reason_model['message'] = 'testString'
backup_policy_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc'
- snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
+ snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- snapshot_reference_model = {} # SnapshotReference
+ snapshot_reference_model = {} # SnapshotReference
snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
snapshot_reference_model['deleted'] = snapshot_reference_deleted_model
snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
@@ -36769,7 +39387,8 @@ def test_backup_policy_job_serialization(self):
backup_policy_job_model_json2 = backup_policy_job_model.to_dict()
assert backup_policy_job_model_json2 == backup_policy_job_model_json
-class TestModel_BackupPolicyJobCollection():
+
+class TestModel_BackupPolicyJobCollection:
"""
Test Class for BackupPolicyJobCollection
"""
@@ -36781,38 +39400,38 @@ def test_backup_policy_job_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- backup_policy_job_collection_first_model = {} # BackupPolicyJobCollectionFirst
+ backup_policy_job_collection_first_model = {} # BackupPolicyJobCollectionFirst
backup_policy_job_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobs?limit=20'
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
+ backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model
backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['name'] = 'my-policy-plan'
backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan'
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_job_source_model = {} # BackupPolicyJobSourceVolumeReference
+ backup_policy_job_source_model = {} # BackupPolicyJobSourceVolumeReference
backup_policy_job_source_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
backup_policy_job_source_model['deleted'] = volume_reference_deleted_model
backup_policy_job_source_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
backup_policy_job_source_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
backup_policy_job_source_model['name'] = 'my-volume'
- backup_policy_job_status_reason_model = {} # BackupPolicyJobStatusReason
+ backup_policy_job_status_reason_model = {} # BackupPolicyJobStatusReason
backup_policy_job_status_reason_model['code'] = 'source_volume_busy'
backup_policy_job_status_reason_model['message'] = 'testString'
backup_policy_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-troubleshooting-backup-for-vpc'
- snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
+ snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- snapshot_reference_model = {} # SnapshotReference
+ snapshot_reference_model = {} # SnapshotReference
snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
snapshot_reference_model['deleted'] = snapshot_reference_deleted_model
snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
@@ -36820,7 +39439,7 @@ def test_backup_policy_job_collection_serialization(self):
snapshot_reference_model['name'] = 'my-snapshot'
snapshot_reference_model['resource_type'] = 'snapshot'
- backup_policy_job_model = {} # BackupPolicyJob
+ backup_policy_job_model = {} # BackupPolicyJob
backup_policy_job_model['auto_delete'] = True
backup_policy_job_model['auto_delete_after'] = 90
backup_policy_job_model['backup_policy_plan'] = backup_policy_plan_reference_model
@@ -36835,7 +39454,7 @@ def test_backup_policy_job_collection_serialization(self):
backup_policy_job_model['status_reasons'] = [backup_policy_job_status_reason_model]
backup_policy_job_model['target_snapshots'] = [snapshot_reference_model]
- backup_policy_job_collection_next_model = {} # BackupPolicyJobCollectionNext
+ backup_policy_job_collection_next_model = {} # BackupPolicyJobCollectionNext
backup_policy_job_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/7241e2a8-601f-11ea-8503-000c29475bed/jobss?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a BackupPolicyJobCollection model
@@ -36861,7 +39480,8 @@ def test_backup_policy_job_collection_serialization(self):
backup_policy_job_collection_model_json2 = backup_policy_job_collection_model.to_dict()
assert backup_policy_job_collection_model_json2 == backup_policy_job_collection_model_json
-class TestModel_BackupPolicyJobCollectionFirst():
+
+class TestModel_BackupPolicyJobCollectionFirst:
"""
Test Class for BackupPolicyJobCollectionFirst
"""
@@ -36890,7 +39510,8 @@ def test_backup_policy_job_collection_first_serialization(self):
backup_policy_job_collection_first_model_json2 = backup_policy_job_collection_first_model.to_dict()
assert backup_policy_job_collection_first_model_json2 == backup_policy_job_collection_first_model_json
-class TestModel_BackupPolicyJobCollectionNext():
+
+class TestModel_BackupPolicyJobCollectionNext:
"""
Test Class for BackupPolicyJobCollectionNext
"""
@@ -36919,7 +39540,8 @@ def test_backup_policy_job_collection_next_serialization(self):
backup_policy_job_collection_next_model_json2 = backup_policy_job_collection_next_model.to_dict()
assert backup_policy_job_collection_next_model_json2 == backup_policy_job_collection_next_model_json
-class TestModel_BackupPolicyJobStatusReason():
+
+class TestModel_BackupPolicyJobStatusReason:
"""
Test Class for BackupPolicyJobStatusReason
"""
@@ -36950,7 +39572,8 @@ def test_backup_policy_job_status_reason_serialization(self):
backup_policy_job_status_reason_model_json2 = backup_policy_job_status_reason_model.to_dict()
assert backup_policy_job_status_reason_model_json2 == backup_policy_job_status_reason_model_json
-class TestModel_BackupPolicyPatch():
+
+class TestModel_BackupPolicyPatch:
"""
Test Class for BackupPolicyPatch
"""
@@ -36980,7 +39603,8 @@ def test_backup_policy_patch_serialization(self):
backup_policy_patch_model_json2 = backup_policy_patch_model.to_dict()
assert backup_policy_patch_model_json2 == backup_policy_patch_model_json
-class TestModel_BackupPolicyPlan():
+
+class TestModel_BackupPolicyPlan:
"""
Test Class for BackupPolicyPlan
"""
@@ -36992,15 +39616,15 @@ def test_backup_policy_plan_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
- backup_policy_plan_clone_policy_model = {} # BackupPolicyPlanClonePolicy
+ backup_policy_plan_clone_policy_model = {} # BackupPolicyPlanClonePolicy
backup_policy_plan_clone_policy_model['max_snapshots'] = 1
backup_policy_plan_clone_policy_model['zones'] = [zone_reference_model]
- backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger
+ backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger
backup_policy_plan_deletion_trigger_model['delete_after'] = 20
backup_policy_plan_deletion_trigger_model['delete_over_count'] = 20
@@ -37034,7 +39658,8 @@ def test_backup_policy_plan_serialization(self):
backup_policy_plan_model_json2 = backup_policy_plan_model.to_dict()
assert backup_policy_plan_model_json2 == backup_policy_plan_model_json
-class TestModel_BackupPolicyPlanClonePolicy():
+
+class TestModel_BackupPolicyPlanClonePolicy:
"""
Test Class for BackupPolicyPlanClonePolicy
"""
@@ -37046,7 +39671,7 @@ def test_backup_policy_plan_clone_policy_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
@@ -37070,7 +39695,8 @@ def test_backup_policy_plan_clone_policy_serialization(self):
backup_policy_plan_clone_policy_model_json2 = backup_policy_plan_clone_policy_model.to_dict()
assert backup_policy_plan_clone_policy_model_json2 == backup_policy_plan_clone_policy_model_json
-class TestModel_BackupPolicyPlanClonePolicyPatch():
+
+class TestModel_BackupPolicyPlanClonePolicyPatch:
"""
Test Class for BackupPolicyPlanClonePolicyPatch
"""
@@ -37082,7 +39708,7 @@ def test_backup_policy_plan_clone_policy_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a BackupPolicyPlanClonePolicyPatch model
@@ -37105,7 +39731,8 @@ def test_backup_policy_plan_clone_policy_patch_serialization(self):
backup_policy_plan_clone_policy_patch_model_json2 = backup_policy_plan_clone_policy_patch_model.to_dict()
assert backup_policy_plan_clone_policy_patch_model_json2 == backup_policy_plan_clone_policy_patch_model_json
-class TestModel_BackupPolicyPlanClonePolicyPrototype():
+
+class TestModel_BackupPolicyPlanClonePolicyPrototype:
"""
Test Class for BackupPolicyPlanClonePolicyPrototype
"""
@@ -37117,7 +39744,7 @@ def test_backup_policy_plan_clone_policy_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a BackupPolicyPlanClonePolicyPrototype model
@@ -37140,7 +39767,8 @@ def test_backup_policy_plan_clone_policy_prototype_serialization(self):
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():
+
+class TestModel_BackupPolicyPlanCollection:
"""
Test Class for BackupPolicyPlanCollection
"""
@@ -37152,19 +39780,19 @@ def test_backup_policy_plan_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ 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'
- backup_policy_plan_clone_policy_model = {} # BackupPolicyPlanClonePolicy
+ backup_policy_plan_clone_policy_model = {} # BackupPolicyPlanClonePolicy
backup_policy_plan_clone_policy_model['max_snapshots'] = 1
backup_policy_plan_clone_policy_model['zones'] = [zone_reference_model]
- backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger
+ backup_policy_plan_deletion_trigger_model = {} # BackupPolicyPlanDeletionTrigger
backup_policy_plan_deletion_trigger_model['delete_after'] = 20
backup_policy_plan_deletion_trigger_model['delete_over_count'] = 20
- backup_policy_plan_model = {} # BackupPolicyPlan
+ backup_policy_plan_model = {} # BackupPolicyPlan
backup_policy_plan_model['active'] = True
backup_policy_plan_model['attach_user_tags'] = ['my-daily-backup-plan']
backup_policy_plan_model['clone_policy'] = backup_policy_plan_clone_policy_model
@@ -37197,7 +39825,8 @@ def test_backup_policy_plan_collection_serialization(self):
backup_policy_plan_collection_model_json2 = backup_policy_plan_collection_model.to_dict()
assert backup_policy_plan_collection_model_json2 == backup_policy_plan_collection_model_json
-class TestModel_BackupPolicyPlanDeletionTrigger():
+
+class TestModel_BackupPolicyPlanDeletionTrigger:
"""
Test Class for BackupPolicyPlanDeletionTrigger
"""
@@ -37227,7 +39856,8 @@ def test_backup_policy_plan_deletion_trigger_serialization(self):
backup_policy_plan_deletion_trigger_model_json2 = backup_policy_plan_deletion_trigger_model.to_dict()
assert backup_policy_plan_deletion_trigger_model_json2 == backup_policy_plan_deletion_trigger_model_json
-class TestModel_BackupPolicyPlanDeletionTriggerPatch():
+
+class TestModel_BackupPolicyPlanDeletionTriggerPatch:
"""
Test Class for BackupPolicyPlanDeletionTriggerPatch
"""
@@ -37257,7 +39887,8 @@ def test_backup_policy_plan_deletion_trigger_patch_serialization(self):
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():
+
+class TestModel_BackupPolicyPlanDeletionTriggerPrototype:
"""
Test Class for BackupPolicyPlanDeletionTriggerPrototype
"""
@@ -37287,7 +39918,8 @@ def test_backup_policy_plan_deletion_trigger_prototype_serialization(self):
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():
+
+class TestModel_BackupPolicyPlanPatch:
"""
Test Class for BackupPolicyPlanPatch
"""
@@ -37299,14 +39931,14 @@ def test_backup_policy_plan_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- backup_policy_plan_clone_policy_patch_model = {} # BackupPolicyPlanClonePolicyPatch
+ backup_policy_plan_clone_policy_patch_model = {} # BackupPolicyPlanClonePolicyPatch
backup_policy_plan_clone_policy_patch_model['max_snapshots'] = 1
backup_policy_plan_clone_policy_patch_model['zones'] = [zone_identity_model]
- backup_policy_plan_deletion_trigger_patch_model = {} # BackupPolicyPlanDeletionTriggerPatch
+ backup_policy_plan_deletion_trigger_patch_model = {} # BackupPolicyPlanDeletionTriggerPatch
backup_policy_plan_deletion_trigger_patch_model['delete_after'] = 20
backup_policy_plan_deletion_trigger_patch_model['delete_over_count'] = 1
@@ -37335,7 +39967,8 @@ def test_backup_policy_plan_patch_serialization(self):
backup_policy_plan_patch_model_json2 = backup_policy_plan_patch_model.to_dict()
assert backup_policy_plan_patch_model_json2 == backup_policy_plan_patch_model_json
-class TestModel_BackupPolicyPlanPrototype():
+
+class TestModel_BackupPolicyPlanPrototype:
"""
Test Class for BackupPolicyPlanPrototype
"""
@@ -37347,14 +39980,14 @@ def test_backup_policy_plan_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- backup_policy_plan_clone_policy_prototype_model = {} # BackupPolicyPlanClonePolicyPrototype
+ backup_policy_plan_clone_policy_prototype_model = {} # BackupPolicyPlanClonePolicyPrototype
backup_policy_plan_clone_policy_prototype_model['max_snapshots'] = 1
backup_policy_plan_clone_policy_prototype_model['zones'] = [zone_identity_model]
- backup_policy_plan_deletion_trigger_prototype_model = {} # BackupPolicyPlanDeletionTriggerPrototype
+ backup_policy_plan_deletion_trigger_prototype_model = {} # BackupPolicyPlanDeletionTriggerPrototype
backup_policy_plan_deletion_trigger_prototype_model['delete_after'] = 20
backup_policy_plan_deletion_trigger_prototype_model['delete_over_count'] = 20
@@ -37383,7 +40016,8 @@ def test_backup_policy_plan_prototype_serialization(self):
backup_policy_plan_prototype_model_json2 = backup_policy_plan_prototype_model.to_dict()
assert backup_policy_plan_prototype_model_json2 == backup_policy_plan_prototype_model_json
-class TestModel_BackupPolicyPlanReference():
+
+class TestModel_BackupPolicyPlanReference:
"""
Test Class for BackupPolicyPlanReference
"""
@@ -37395,7 +40029,7 @@ def test_backup_policy_plan_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a BackupPolicyPlanReference model
@@ -37421,7 +40055,8 @@ def test_backup_policy_plan_reference_serialization(self):
backup_policy_plan_reference_model_json2 = backup_policy_plan_reference_model.to_dict()
assert backup_policy_plan_reference_model_json2 == backup_policy_plan_reference_model_json
-class TestModel_BackupPolicyPlanReferenceDeleted():
+
+class TestModel_BackupPolicyPlanReferenceDeleted:
"""
Test Class for BackupPolicyPlanReferenceDeleted
"""
@@ -37450,7 +40085,8 @@ def test_backup_policy_plan_reference_deleted_serialization(self):
backup_policy_plan_reference_deleted_model_json2 = backup_policy_plan_reference_deleted_model.to_dict()
assert backup_policy_plan_reference_deleted_model_json2 == backup_policy_plan_reference_deleted_model_json
-class TestModel_BareMetalServer():
+
+class TestModel_BareMetalServer:
"""
Test Class for BareMetalServer
"""
@@ -37462,23 +40098,23 @@ def test_bare_metal_server_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted
+ bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted
bare_metal_server_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference
+ bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference
bare_metal_server_boot_target_model['deleted'] = bare_metal_server_disk_reference_deleted_model
bare_metal_server_boot_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_boot_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_boot_target_model['name'] = 'my-bare-metal-server-disk'
bare_metal_server_boot_target_model['resource_type'] = 'bare_metal_server_disk'
- bare_metal_server_cpu_model = {} # BareMetalServerCPU
+ bare_metal_server_cpu_model = {} # BareMetalServerCPU
bare_metal_server_cpu_model['architecture'] = 'amd64'
bare_metal_server_cpu_model['core_count'] = 80
bare_metal_server_cpu_model['socket_count'] = 4
bare_metal_server_cpu_model['threads_per_core'] = 2
- bare_metal_server_disk_model = {} # BareMetalServerDisk
+ bare_metal_server_disk_model = {} # BareMetalServerDisk
bare_metal_server_disk_model['created_at'] = '2019-01-01T12:00:00Z'
bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -37487,13 +40123,18 @@ def test_bare_metal_server_serialization(self):
bare_metal_server_disk_model['resource_type'] = 'bare_metal_server_disk'
bare_metal_server_disk_model['size'] = 100
- network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted
+ bare_metal_server_lifecycle_reason_model = {} # BareMetalServerLifecycleReason
+ bare_metal_server_lifecycle_reason_model['code'] = 'resource_suspended_by_provider'
+ bare_metal_server_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.'
+ bare_metal_server_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension'
+
+ network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted
network_interface_bare_metal_server_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -37501,10 +40142,10 @@ def test_bare_metal_server_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -37512,7 +40153,7 @@ def test_bare_metal_server_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- 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'] = network_interface_bare_metal_server_context_reference_deleted_model
network_interface_bare_metal_server_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
network_interface_bare_metal_server_context_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -37521,30 +40162,30 @@ def test_bare_metal_server_serialization(self):
network_interface_bare_metal_server_context_reference_model['resource_type'] = 'network_interface'
network_interface_bare_metal_server_context_reference_model['subnet'] = subnet_reference_model
- bare_metal_server_profile_reference_model = {} # BareMetalServerProfileReference
+ bare_metal_server_profile_reference_model = {} # BareMetalServerProfileReference
bare_metal_server_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768'
bare_metal_server_profile_reference_model['name'] = 'bx2-metal-192x768'
bare_metal_server_profile_reference_model['resource_type'] = 'bare_metal_server_profile'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- bare_metal_server_status_reason_model = {} # BareMetalServerStatusReason
+ bare_metal_server_status_reason_model = {} # BareMetalServerStatusReason
bare_metal_server_status_reason_model['code'] = 'cannot_start_capacity'
bare_metal_server_status_reason_model['message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.'
bare_metal_server_status_reason_model['more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html'
- bare_metal_server_trusted_platform_module_model = {} # BareMetalServerTrustedPlatformModule
+ bare_metal_server_trusted_platform_module_model = {} # BareMetalServerTrustedPlatformModule
bare_metal_server_trusted_platform_module_model['enabled'] = True
bare_metal_server_trusted_platform_module_model['mode'] = 'disabled'
bare_metal_server_trusted_platform_module_model['supported_modes'] = ['disabled']
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -37552,7 +40193,7 @@ def test_bare_metal_server_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -37567,6 +40208,8 @@ def test_bare_metal_server_serialization(self):
bare_metal_server_model_json['enable_secure_boot'] = False
bare_metal_server_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a'
bare_metal_server_model_json['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
+ bare_metal_server_model_json['lifecycle_reasons'] = [bare_metal_server_lifecycle_reason_model]
+ bare_metal_server_model_json['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_interfaces'] = [network_interface_bare_metal_server_context_reference_model]
@@ -37595,7 +40238,8 @@ def test_bare_metal_server_serialization(self):
bare_metal_server_model_json2 = bare_metal_server_model.to_dict()
assert bare_metal_server_model_json2 == bare_metal_server_model_json
-class TestModel_BareMetalServerCPU():
+
+class TestModel_BareMetalServerCPU:
"""
Test Class for BareMetalServerCPU
"""
@@ -37627,7 +40271,8 @@ def test_bare_metal_server_cpu_serialization(self):
bare_metal_server_cpu_model_json2 = bare_metal_server_cpu_model.to_dict()
assert bare_metal_server_cpu_model_json2 == bare_metal_server_cpu_model_json
-class TestModel_BareMetalServerCollection():
+
+class TestModel_BareMetalServerCollection:
"""
Test Class for BareMetalServerCollection
"""
@@ -37639,23 +40284,23 @@ def test_bare_metal_server_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted
+ bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted
bare_metal_server_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference
+ bare_metal_server_boot_target_model = {} # BareMetalServerBootTargetBareMetalServerDiskReference
bare_metal_server_boot_target_model['deleted'] = bare_metal_server_disk_reference_deleted_model
bare_metal_server_boot_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_boot_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_boot_target_model['name'] = 'my-bare-metal-server-disk'
bare_metal_server_boot_target_model['resource_type'] = 'bare_metal_server_disk'
- bare_metal_server_cpu_model = {} # BareMetalServerCPU
+ bare_metal_server_cpu_model = {} # BareMetalServerCPU
bare_metal_server_cpu_model['architecture'] = 'amd64'
bare_metal_server_cpu_model['core_count'] = 80
bare_metal_server_cpu_model['socket_count'] = 4
bare_metal_server_cpu_model['threads_per_core'] = 2
- bare_metal_server_disk_model = {} # BareMetalServerDisk
+ bare_metal_server_disk_model = {} # BareMetalServerDisk
bare_metal_server_disk_model['created_at'] = '2019-01-01T12:00:00Z'
bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -37664,13 +40309,18 @@ def test_bare_metal_server_collection_serialization(self):
bare_metal_server_disk_model['resource_type'] = 'bare_metal_server_disk'
bare_metal_server_disk_model['size'] = 100
- network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted
+ bare_metal_server_lifecycle_reason_model = {} # BareMetalServerLifecycleReason
+ bare_metal_server_lifecycle_reason_model['code'] = 'resource_suspended_by_provider'
+ bare_metal_server_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.'
+ bare_metal_server_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension'
+
+ network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted
network_interface_bare_metal_server_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -37678,10 +40328,10 @@ def test_bare_metal_server_collection_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -37689,7 +40339,7 @@ def test_bare_metal_server_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- 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'] = network_interface_bare_metal_server_context_reference_deleted_model
network_interface_bare_metal_server_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
network_interface_bare_metal_server_context_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -37698,30 +40348,30 @@ def test_bare_metal_server_collection_serialization(self):
network_interface_bare_metal_server_context_reference_model['resource_type'] = 'network_interface'
network_interface_bare_metal_server_context_reference_model['subnet'] = subnet_reference_model
- bare_metal_server_profile_reference_model = {} # BareMetalServerProfileReference
+ bare_metal_server_profile_reference_model = {} # BareMetalServerProfileReference
bare_metal_server_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768'
bare_metal_server_profile_reference_model['name'] = 'bx2-metal-192x768'
bare_metal_server_profile_reference_model['resource_type'] = 'bare_metal_server_profile'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- bare_metal_server_status_reason_model = {} # BareMetalServerStatusReason
+ bare_metal_server_status_reason_model = {} # BareMetalServerStatusReason
bare_metal_server_status_reason_model['code'] = 'cannot_start_capacity'
bare_metal_server_status_reason_model['message'] = 'The bare metal server cannot start as there is no more capacity in this\nzone for a bare metal server with the requested profile.'
bare_metal_server_status_reason_model['more_info'] = 'https://console.bluemix.net/docs/iaas/bare_metal_server.html'
- bare_metal_server_trusted_platform_module_model = {} # BareMetalServerTrustedPlatformModule
+ bare_metal_server_trusted_platform_module_model = {} # BareMetalServerTrustedPlatformModule
bare_metal_server_trusted_platform_module_model['enabled'] = True
bare_metal_server_trusted_platform_module_model['mode'] = 'disabled'
bare_metal_server_trusted_platform_module_model['supported_modes'] = ['disabled']
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -37729,11 +40379,11 @@ def test_bare_metal_server_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
- bare_metal_server_model = {} # BareMetalServer
+ bare_metal_server_model = {} # BareMetalServer
bare_metal_server_model['bandwidth'] = 20000
bare_metal_server_model['boot_target'] = bare_metal_server_boot_target_model
bare_metal_server_model['cpu'] = bare_metal_server_cpu_model
@@ -37743,6 +40393,8 @@ def test_bare_metal_server_collection_serialization(self):
bare_metal_server_model['enable_secure_boot'] = False
bare_metal_server_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a'
bare_metal_server_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
+ bare_metal_server_model['lifecycle_reasons'] = [bare_metal_server_lifecycle_reason_model]
+ bare_metal_server_model['lifecycle_state'] = 'stable'
bare_metal_server_model['memory'] = 1536
bare_metal_server_model['name'] = 'my-bare-metal-server'
bare_metal_server_model['network_interfaces'] = [network_interface_bare_metal_server_context_reference_model]
@@ -37756,10 +40408,10 @@ def test_bare_metal_server_collection_serialization(self):
bare_metal_server_model['vpc'] = vpc_reference_model
bare_metal_server_model['zone'] = zone_reference_model
- bare_metal_server_collection_first_model = {} # BareMetalServerCollectionFirst
+ bare_metal_server_collection_first_model = {} # BareMetalServerCollectionFirst
bare_metal_server_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?limit=20'
- bare_metal_server_collection_next_model = {} # BareMetalServerCollectionNext
+ bare_metal_server_collection_next_model = {} # BareMetalServerCollectionNext
bare_metal_server_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a BareMetalServerCollection model
@@ -37785,7 +40437,8 @@ def test_bare_metal_server_collection_serialization(self):
bare_metal_server_collection_model_json2 = bare_metal_server_collection_model.to_dict()
assert bare_metal_server_collection_model_json2 == bare_metal_server_collection_model_json
-class TestModel_BareMetalServerCollectionFirst():
+
+class TestModel_BareMetalServerCollectionFirst:
"""
Test Class for BareMetalServerCollectionFirst
"""
@@ -37814,7 +40467,8 @@ def test_bare_metal_server_collection_first_serialization(self):
bare_metal_server_collection_first_model_json2 = bare_metal_server_collection_first_model.to_dict()
assert bare_metal_server_collection_first_model_json2 == bare_metal_server_collection_first_model_json
-class TestModel_BareMetalServerCollectionNext():
+
+class TestModel_BareMetalServerCollectionNext:
"""
Test Class for BareMetalServerCollectionNext
"""
@@ -37843,7 +40497,8 @@ def test_bare_metal_server_collection_next_serialization(self):
bare_metal_server_collection_next_model_json2 = bare_metal_server_collection_next_model.to_dict()
assert bare_metal_server_collection_next_model_json2 == bare_metal_server_collection_next_model_json
-class TestModel_BareMetalServerConsoleAccessToken():
+
+class TestModel_BareMetalServerConsoleAccessToken:
"""
Test Class for BareMetalServerConsoleAccessToken
"""
@@ -37877,7 +40532,8 @@ def test_bare_metal_server_console_access_token_serialization(self):
bare_metal_server_console_access_token_model_json2 = bare_metal_server_console_access_token_model.to_dict()
assert bare_metal_server_console_access_token_model_json2 == bare_metal_server_console_access_token_model_json
-class TestModel_BareMetalServerDisk():
+
+class TestModel_BareMetalServerDisk:
"""
Test Class for BareMetalServerDisk
"""
@@ -37912,7 +40568,8 @@ def test_bare_metal_server_disk_serialization(self):
bare_metal_server_disk_model_json2 = bare_metal_server_disk_model.to_dict()
assert bare_metal_server_disk_model_json2 == bare_metal_server_disk_model_json
-class TestModel_BareMetalServerDiskCollection():
+
+class TestModel_BareMetalServerDiskCollection:
"""
Test Class for BareMetalServerDiskCollection
"""
@@ -37924,7 +40581,7 @@ def test_bare_metal_server_disk_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_disk_model = {} # BareMetalServerDisk
+ bare_metal_server_disk_model = {} # BareMetalServerDisk
bare_metal_server_disk_model['created_at'] = '2019-01-01T12:00:00Z'
bare_metal_server_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
bare_metal_server_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -37952,7 +40609,8 @@ def test_bare_metal_server_disk_collection_serialization(self):
bare_metal_server_disk_collection_model_json2 = bare_metal_server_disk_collection_model.to_dict()
assert bare_metal_server_disk_collection_model_json2 == bare_metal_server_disk_collection_model_json
-class TestModel_BareMetalServerDiskPatch():
+
+class TestModel_BareMetalServerDiskPatch:
"""
Test Class for BareMetalServerDiskPatch
"""
@@ -37981,7 +40639,8 @@ def test_bare_metal_server_disk_patch_serialization(self):
bare_metal_server_disk_patch_model_json2 = bare_metal_server_disk_patch_model.to_dict()
assert bare_metal_server_disk_patch_model_json2 == bare_metal_server_disk_patch_model_json
-class TestModel_BareMetalServerDiskReferenceDeleted():
+
+class TestModel_BareMetalServerDiskReferenceDeleted:
"""
Test Class for BareMetalServerDiskReferenceDeleted
"""
@@ -38010,7 +40669,8 @@ def test_bare_metal_server_disk_reference_deleted_serialization(self):
bare_metal_server_disk_reference_deleted_model_json2 = bare_metal_server_disk_reference_deleted_model.to_dict()
assert bare_metal_server_disk_reference_deleted_model_json2 == bare_metal_server_disk_reference_deleted_model_json
-class TestModel_BareMetalServerInitialization():
+
+class TestModel_BareMetalServerInitialization:
"""
Test Class for BareMetalServerInitialization
"""
@@ -38022,20 +40682,20 @@ def test_bare_metal_server_initialization_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['name'] = 'my-image'
- key_reference_deleted_model = {} # KeyReferenceDeleted
+ key_reference_deleted_model = {} # KeyReferenceDeleted
key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- key_reference_model = {} # KeyReference
+ key_reference_model = {} # KeyReference
key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803'
key_reference_model['deleted'] = key_reference_deleted_model
key_reference_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY'
@@ -38043,7 +40703,7 @@ def test_bare_metal_server_initialization_serialization(self):
key_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
key_reference_model['name'] = 'my-key'
- bare_metal_server_initialization_user_account_model = {} # BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount
+ bare_metal_server_initialization_user_account_model = {} # BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount
bare_metal_server_initialization_user_account_model['encrypted_password'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4='
bare_metal_server_initialization_user_account_model['encryption_key'] = key_reference_model
bare_metal_server_initialization_user_account_model['resource_type'] = 'host_user_account'
@@ -38070,7 +40730,8 @@ def test_bare_metal_server_initialization_serialization(self):
bare_metal_server_initialization_model_json2 = bare_metal_server_initialization_model.to_dict()
assert bare_metal_server_initialization_model_json2 == bare_metal_server_initialization_model_json
-class TestModel_BareMetalServerInitializationPrototype():
+
+class TestModel_BareMetalServerInitializationPrototype:
"""
Test Class for BareMetalServerInitializationPrototype
"""
@@ -38082,10 +40743,10 @@ def test_bare_metal_server_initialization_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- image_identity_model = {} # ImageIdentityById
+ image_identity_model = {} # ImageIdentityById
image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
# Construct a json representation of a BareMetalServerInitializationPrototype model
@@ -38109,7 +40770,40 @@ def test_bare_metal_server_initialization_prototype_serialization(self):
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_BareMetalServerNetworkInterfaceCollection():
+
+class TestModel_BareMetalServerLifecycleReason:
+ """
+ Test Class for BareMetalServerLifecycleReason
+ """
+
+ def test_bare_metal_server_lifecycle_reason_serialization(self):
+ """
+ Test serialization/deserialization for BareMetalServerLifecycleReason
+ """
+
+ # 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'
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert bare_metal_server_lifecycle_reason_model == bare_metal_server_lifecycle_reason_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ bare_metal_server_lifecycle_reason_model_json2 = bare_metal_server_lifecycle_reason_model.to_dict()
+ assert bare_metal_server_lifecycle_reason_model_json2 == bare_metal_server_lifecycle_reason_model_json
+
+
+class TestModel_BareMetalServerNetworkInterfaceCollection:
"""
Test Class for BareMetalServerNetworkInterfaceCollection
"""
@@ -38121,13 +40815,13 @@ def test_bare_metal_server_network_interface_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_network_interface_collection_first_model = {} # BareMetalServerNetworkInterfaceCollectionFirst
+ bare_metal_server_network_interface_collection_first_model = {} # BareMetalServerNetworkInterfaceCollectionFirst
bare_metal_server_network_interface_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20'
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- floating_ip_reference_model = {} # FloatingIPReference
+ 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/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model
@@ -38135,10 +40829,10 @@ def test_bare_metal_server_network_interface_collection_serialization(self):
floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['name'] = 'my-floating-ip'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -38146,20 +40840,20 @@ def test_bare_metal_server_network_interface_collection_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -38167,7 +40861,7 @@ def test_bare_metal_server_network_interface_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- bare_metal_server_network_interface_model = {} # BareMetalServerNetworkInterfaceByHiperSocket
+ bare_metal_server_network_interface_model = {} # BareMetalServerNetworkInterfaceByHiperSocket
bare_metal_server_network_interface_model['allow_ip_spoofing'] = True
bare_metal_server_network_interface_model['created_at'] = '2019-01-01T12:00:00Z'
bare_metal_server_network_interface_model['enable_infrastructure_nat'] = True
@@ -38185,7 +40879,7 @@ def test_bare_metal_server_network_interface_collection_serialization(self):
bare_metal_server_network_interface_model['type'] = 'primary'
bare_metal_server_network_interface_model['interface_type'] = 'hipersocket'
- bare_metal_server_network_interface_collection_next_model = {} # BareMetalServerNetworkInterfaceCollectionNext
+ bare_metal_server_network_interface_collection_next_model = {} # BareMetalServerNetworkInterfaceCollectionNext
bare_metal_server_network_interface_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20'
# Construct a json representation of a BareMetalServerNetworkInterfaceCollection model
@@ -38211,7 +40905,8 @@ def test_bare_metal_server_network_interface_collection_serialization(self):
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_BareMetalServerNetworkInterfaceCollectionFirst():
+
+class TestModel_BareMetalServerNetworkInterfaceCollectionFirst:
"""
Test Class for BareMetalServerNetworkInterfaceCollectionFirst
"""
@@ -38240,7 +40935,8 @@ def test_bare_metal_server_network_interface_collection_first_serialization(self
bare_metal_server_network_interface_collection_first_model_json2 = bare_metal_server_network_interface_collection_first_model.to_dict()
assert bare_metal_server_network_interface_collection_first_model_json2 == bare_metal_server_network_interface_collection_first_model_json
-class TestModel_BareMetalServerNetworkInterfaceCollectionNext():
+
+class TestModel_BareMetalServerNetworkInterfaceCollectionNext:
"""
Test Class for BareMetalServerNetworkInterfaceCollectionNext
"""
@@ -38269,7 +40965,8 @@ def test_bare_metal_server_network_interface_collection_next_serialization(self)
bare_metal_server_network_interface_collection_next_model_json2 = bare_metal_server_network_interface_collection_next_model.to_dict()
assert bare_metal_server_network_interface_collection_next_model_json2 == bare_metal_server_network_interface_collection_next_model_json
-class TestModel_BareMetalServerNetworkInterfacePatch():
+
+class TestModel_BareMetalServerNetworkInterfacePatch:
"""
Test Class for BareMetalServerNetworkInterfacePatch
"""
@@ -38301,7 +40998,8 @@ def test_bare_metal_server_network_interface_patch_serialization(self):
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():
+
+class TestModel_BareMetalServerPatch:
"""
Test Class for BareMetalServerPatch
"""
@@ -38313,7 +41011,7 @@ def test_bare_metal_server_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_trusted_platform_module_patch_model = {} # BareMetalServerTrustedPlatformModulePatch
+ bare_metal_server_trusted_platform_module_patch_model = {} # BareMetalServerTrustedPlatformModulePatch
bare_metal_server_trusted_platform_module_patch_model['mode'] = 'disabled'
# Construct a json representation of a BareMetalServerPatch model
@@ -38337,7 +41035,8 @@ def test_bare_metal_server_patch_serialization(self):
bare_metal_server_patch_model_json2 = bare_metal_server_patch_model.to_dict()
assert bare_metal_server_patch_model_json2 == bare_metal_server_patch_model_json
-class TestModel_BareMetalServerPrimaryNetworkInterfacePrototype():
+
+class TestModel_BareMetalServerPrimaryNetworkInterfacePrototype:
"""
Test Class for BareMetalServerPrimaryNetworkInterfacePrototype
"""
@@ -38349,15 +41048,15 @@ 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'
- security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model = {} # SecurityGroupIdentityById
security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a BareMetalServerPrimaryNetworkInterfacePrototype model
@@ -38386,7 +41085,8 @@ def test_bare_metal_server_primary_network_interface_prototype_serialization(sel
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():
+
+class TestModel_BareMetalServerProfile:
"""
Test Class for BareMetalServerProfile
"""
@@ -38398,57 +41098,67 @@ def test_bare_metal_server_profile_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed
+ bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed
bare_metal_server_profile_bandwidth_model['type'] = 'fixed'
bare_metal_server_profile_bandwidth_model['value'] = 20000
- bare_metal_server_profile_cpu_architecture_model = {} # BareMetalServerProfileCPUArchitecture
+ bare_metal_server_profile_console_types_model = {} # BareMetalServerProfileConsoleTypes
+ bare_metal_server_profile_console_types_model['type'] = 'enum'
+ bare_metal_server_profile_console_types_model['values'] = ['serial']
+
+ bare_metal_server_profile_cpu_architecture_model = {} # BareMetalServerProfileCPUArchitecture
bare_metal_server_profile_cpu_architecture_model['default'] = 'amd64'
bare_metal_server_profile_cpu_architecture_model['type'] = 'fixed'
bare_metal_server_profile_cpu_architecture_model['value'] = 'amd64'
- bare_metal_server_profile_cpu_core_count_model = {} # BareMetalServerProfileCPUCoreCountFixed
+ bare_metal_server_profile_cpu_core_count_model = {} # BareMetalServerProfileCPUCoreCountFixed
bare_metal_server_profile_cpu_core_count_model['type'] = 'fixed'
bare_metal_server_profile_cpu_core_count_model['value'] = 80
- bare_metal_server_profile_cpu_socket_count_model = {} # BareMetalServerProfileCPUSocketCountFixed
+ bare_metal_server_profile_cpu_socket_count_model = {} # BareMetalServerProfileCPUSocketCountFixed
bare_metal_server_profile_cpu_socket_count_model['type'] = 'fixed'
bare_metal_server_profile_cpu_socket_count_model['value'] = 4
- bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed
+ bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed
bare_metal_server_profile_disk_quantity_model['type'] = 'fixed'
bare_metal_server_profile_disk_quantity_model['value'] = 4
- bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed
+ bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed
bare_metal_server_profile_disk_size_model['type'] = 'fixed'
bare_metal_server_profile_disk_size_model['value'] = 100
- bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces
+ bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces
bare_metal_server_profile_disk_supported_interfaces_model['default'] = 'fcp'
bare_metal_server_profile_disk_supported_interfaces_model['type'] = 'enum'
bare_metal_server_profile_disk_supported_interfaces_model['values'] = ['fcp']
- bare_metal_server_profile_disk_model = {} # BareMetalServerProfileDisk
+ bare_metal_server_profile_disk_model = {} # BareMetalServerProfileDisk
bare_metal_server_profile_disk_model['quantity'] = bare_metal_server_profile_disk_quantity_model
bare_metal_server_profile_disk_model['size'] = bare_metal_server_profile_disk_size_model
bare_metal_server_profile_disk_model['supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model
- bare_metal_server_profile_memory_model = {} # BareMetalServerProfileMemoryFixed
+ bare_metal_server_profile_memory_model = {} # BareMetalServerProfileMemoryFixed
bare_metal_server_profile_memory_model['type'] = 'fixed'
bare_metal_server_profile_memory_model['value'] = 16
- bare_metal_server_profile_os_architecture_model = {} # BareMetalServerProfileOSArchitecture
+ bare_metal_server_profile_network_interface_count_model = {} # BareMetalServerProfileNetworkInterfaceCountRange
+ bare_metal_server_profile_network_interface_count_model['max'] = 128
+ bare_metal_server_profile_network_interface_count_model['min'] = 1
+ bare_metal_server_profile_network_interface_count_model['type'] = 'range'
+
+ bare_metal_server_profile_os_architecture_model = {} # BareMetalServerProfileOSArchitecture
bare_metal_server_profile_os_architecture_model['default'] = 'amd64'
bare_metal_server_profile_os_architecture_model['type'] = 'enum'
bare_metal_server_profile_os_architecture_model['values'] = ['amd64']
- bare_metal_server_profile_supported_trusted_platform_module_modes_model = {} # BareMetalServerProfileSupportedTrustedPlatformModuleModes
+ bare_metal_server_profile_supported_trusted_platform_module_modes_model = {} # BareMetalServerProfileSupportedTrustedPlatformModuleModes
bare_metal_server_profile_supported_trusted_platform_module_modes_model['type'] = 'enum'
bare_metal_server_profile_supported_trusted_platform_module_modes_model['values'] = ['disabled']
# Construct a json representation of a BareMetalServerProfile model
bare_metal_server_profile_model_json = {}
bare_metal_server_profile_model_json['bandwidth'] = bare_metal_server_profile_bandwidth_model
+ bare_metal_server_profile_model_json['console_types'] = bare_metal_server_profile_console_types_model
bare_metal_server_profile_model_json['cpu_architecture'] = bare_metal_server_profile_cpu_architecture_model
bare_metal_server_profile_model_json['cpu_core_count'] = bare_metal_server_profile_cpu_core_count_model
bare_metal_server_profile_model_json['cpu_socket_count'] = bare_metal_server_profile_cpu_socket_count_model
@@ -38457,6 +41167,7 @@ def test_bare_metal_server_profile_serialization(self):
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_interface_count'] = bare_metal_server_profile_network_interface_count_model
bare_metal_server_profile_model_json['os_architecture'] = bare_metal_server_profile_os_architecture_model
bare_metal_server_profile_model_json['resource_type'] = 'bare_metal_server_profile'
bare_metal_server_profile_model_json['supported_trusted_platform_module_modes'] = bare_metal_server_profile_supported_trusted_platform_module_modes_model
@@ -38476,7 +41187,8 @@ def test_bare_metal_server_profile_serialization(self):
bare_metal_server_profile_model_json2 = bare_metal_server_profile_model.to_dict()
assert bare_metal_server_profile_model_json2 == bare_metal_server_profile_model_json
-class TestModel_BareMetalServerProfileCPUArchitecture():
+
+class TestModel_BareMetalServerProfileCPUArchitecture:
"""
Test Class for BareMetalServerProfileCPUArchitecture
"""
@@ -38507,7 +41219,8 @@ def test_bare_metal_server_profile_cpu_architecture_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCollection:
"""
Test Class for BareMetalServerProfileCollection
"""
@@ -38519,62 +41232,72 @@ def test_bare_metal_server_profile_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_profile_collection_first_model = {} # BareMetalServerProfileCollectionFirst
+ bare_metal_server_profile_collection_first_model = {} # BareMetalServerProfileCollectionFirst
bare_metal_server_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?limit=20'
- bare_metal_server_profile_collection_next_model = {} # BareMetalServerProfileCollectionNext
+ bare_metal_server_profile_collection_next_model = {} # BareMetalServerProfileCollectionNext
bare_metal_server_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed
+ bare_metal_server_profile_bandwidth_model = {} # BareMetalServerProfileBandwidthFixed
bare_metal_server_profile_bandwidth_model['type'] = 'fixed'
bare_metal_server_profile_bandwidth_model['value'] = 20000
- bare_metal_server_profile_cpu_architecture_model = {} # BareMetalServerProfileCPUArchitecture
+ bare_metal_server_profile_console_types_model = {} # BareMetalServerProfileConsoleTypes
+ bare_metal_server_profile_console_types_model['type'] = 'enum'
+ bare_metal_server_profile_console_types_model['values'] = ['serial']
+
+ bare_metal_server_profile_cpu_architecture_model = {} # BareMetalServerProfileCPUArchitecture
bare_metal_server_profile_cpu_architecture_model['default'] = 'amd64'
bare_metal_server_profile_cpu_architecture_model['type'] = 'fixed'
bare_metal_server_profile_cpu_architecture_model['value'] = 'amd64'
- bare_metal_server_profile_cpu_core_count_model = {} # BareMetalServerProfileCPUCoreCountFixed
+ bare_metal_server_profile_cpu_core_count_model = {} # BareMetalServerProfileCPUCoreCountFixed
bare_metal_server_profile_cpu_core_count_model['type'] = 'fixed'
bare_metal_server_profile_cpu_core_count_model['value'] = 80
- bare_metal_server_profile_cpu_socket_count_model = {} # BareMetalServerProfileCPUSocketCountFixed
+ bare_metal_server_profile_cpu_socket_count_model = {} # BareMetalServerProfileCPUSocketCountFixed
bare_metal_server_profile_cpu_socket_count_model['type'] = 'fixed'
bare_metal_server_profile_cpu_socket_count_model['value'] = 4
- bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed
+ bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed
bare_metal_server_profile_disk_quantity_model['type'] = 'fixed'
bare_metal_server_profile_disk_quantity_model['value'] = 4
- bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed
+ bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed
bare_metal_server_profile_disk_size_model['type'] = 'fixed'
bare_metal_server_profile_disk_size_model['value'] = 100
- bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces
+ bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces
bare_metal_server_profile_disk_supported_interfaces_model['default'] = 'fcp'
bare_metal_server_profile_disk_supported_interfaces_model['type'] = 'enum'
bare_metal_server_profile_disk_supported_interfaces_model['values'] = ['fcp']
- bare_metal_server_profile_disk_model = {} # BareMetalServerProfileDisk
+ bare_metal_server_profile_disk_model = {} # BareMetalServerProfileDisk
bare_metal_server_profile_disk_model['quantity'] = bare_metal_server_profile_disk_quantity_model
bare_metal_server_profile_disk_model['size'] = bare_metal_server_profile_disk_size_model
bare_metal_server_profile_disk_model['supported_interface_types'] = bare_metal_server_profile_disk_supported_interfaces_model
- bare_metal_server_profile_memory_model = {} # BareMetalServerProfileMemoryFixed
+ bare_metal_server_profile_memory_model = {} # BareMetalServerProfileMemoryFixed
bare_metal_server_profile_memory_model['type'] = 'fixed'
bare_metal_server_profile_memory_model['value'] = 16
- bare_metal_server_profile_os_architecture_model = {} # BareMetalServerProfileOSArchitecture
+ bare_metal_server_profile_network_interface_count_model = {} # BareMetalServerProfileNetworkInterfaceCountRange
+ bare_metal_server_profile_network_interface_count_model['max'] = 128
+ bare_metal_server_profile_network_interface_count_model['min'] = 1
+ bare_metal_server_profile_network_interface_count_model['type'] = 'range'
+
+ bare_metal_server_profile_os_architecture_model = {} # BareMetalServerProfileOSArchitecture
bare_metal_server_profile_os_architecture_model['default'] = 'amd64'
bare_metal_server_profile_os_architecture_model['type'] = 'enum'
bare_metal_server_profile_os_architecture_model['values'] = ['amd64']
- bare_metal_server_profile_supported_trusted_platform_module_modes_model = {} # BareMetalServerProfileSupportedTrustedPlatformModuleModes
+ bare_metal_server_profile_supported_trusted_platform_module_modes_model = {} # BareMetalServerProfileSupportedTrustedPlatformModuleModes
bare_metal_server_profile_supported_trusted_platform_module_modes_model['type'] = 'enum'
bare_metal_server_profile_supported_trusted_platform_module_modes_model['values'] = ['disabled']
- bare_metal_server_profile_model = {} # BareMetalServerProfile
+ bare_metal_server_profile_model = {} # BareMetalServerProfile
bare_metal_server_profile_model['bandwidth'] = bare_metal_server_profile_bandwidth_model
+ bare_metal_server_profile_model['console_types'] = bare_metal_server_profile_console_types_model
bare_metal_server_profile_model['cpu_architecture'] = bare_metal_server_profile_cpu_architecture_model
bare_metal_server_profile_model['cpu_core_count'] = bare_metal_server_profile_cpu_core_count_model
bare_metal_server_profile_model['cpu_socket_count'] = bare_metal_server_profile_cpu_socket_count_model
@@ -38583,6 +41306,7 @@ def test_bare_metal_server_profile_collection_serialization(self):
bare_metal_server_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/bare_metal_servers/profiles/bx2-metal-192x768'
bare_metal_server_profile_model['memory'] = bare_metal_server_profile_memory_model
bare_metal_server_profile_model['name'] = 'bx2-metal-192x768'
+ bare_metal_server_profile_model['network_interface_count'] = bare_metal_server_profile_network_interface_count_model
bare_metal_server_profile_model['os_architecture'] = bare_metal_server_profile_os_architecture_model
bare_metal_server_profile_model['resource_type'] = 'bare_metal_server_profile'
bare_metal_server_profile_model['supported_trusted_platform_module_modes'] = bare_metal_server_profile_supported_trusted_platform_module_modes_model
@@ -38610,7 +41334,8 @@ def test_bare_metal_server_profile_collection_serialization(self):
bare_metal_server_profile_collection_model_json2 = bare_metal_server_profile_collection_model.to_dict()
assert bare_metal_server_profile_collection_model_json2 == bare_metal_server_profile_collection_model_json
-class TestModel_BareMetalServerProfileCollectionFirst():
+
+class TestModel_BareMetalServerProfileCollectionFirst:
"""
Test Class for BareMetalServerProfileCollectionFirst
"""
@@ -38639,7 +41364,8 @@ def test_bare_metal_server_profile_collection_first_serialization(self):
bare_metal_server_profile_collection_first_model_json2 = bare_metal_server_profile_collection_first_model.to_dict()
assert bare_metal_server_profile_collection_first_model_json2 == bare_metal_server_profile_collection_first_model_json
-class TestModel_BareMetalServerProfileCollectionNext():
+
+class TestModel_BareMetalServerProfileCollectionNext:
"""
Test Class for BareMetalServerProfileCollectionNext
"""
@@ -38668,7 +41394,39 @@ def test_bare_metal_server_profile_collection_next_serialization(self):
bare_metal_server_profile_collection_next_model_json2 = bare_metal_server_profile_collection_next_model.to_dict()
assert bare_metal_server_profile_collection_next_model_json2 == bare_metal_server_profile_collection_next_model_json
-class TestModel_BareMetalServerProfileDisk():
+
+class TestModel_BareMetalServerProfileConsoleTypes:
+ """
+ Test Class for BareMetalServerProfileConsoleTypes
+ """
+
+ def test_bare_metal_server_profile_console_types_serialization(self):
+ """
+ Test serialization/deserialization for BareMetalServerProfileConsoleTypes
+ """
+
+ # Construct a json representation of a BareMetalServerProfileConsoleTypes model
+ bare_metal_server_profile_console_types_model_json = {}
+ bare_metal_server_profile_console_types_model_json['type'] = 'enum'
+ bare_metal_server_profile_console_types_model_json['values'] = ['serial']
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert bare_metal_server_profile_console_types_model == bare_metal_server_profile_console_types_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ bare_metal_server_profile_console_types_model_json2 = bare_metal_server_profile_console_types_model.to_dict()
+ assert bare_metal_server_profile_console_types_model_json2 == bare_metal_server_profile_console_types_model_json
+
+
+class TestModel_BareMetalServerProfileDisk:
"""
Test Class for BareMetalServerProfileDisk
"""
@@ -38680,15 +41438,15 @@ def test_bare_metal_server_profile_disk_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed
+ bare_metal_server_profile_disk_quantity_model = {} # BareMetalServerProfileDiskQuantityFixed
bare_metal_server_profile_disk_quantity_model['type'] = 'fixed'
bare_metal_server_profile_disk_quantity_model['value'] = 4
- bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed
+ bare_metal_server_profile_disk_size_model = {} # BareMetalServerProfileDiskSizeFixed
bare_metal_server_profile_disk_size_model['type'] = 'fixed'
bare_metal_server_profile_disk_size_model['value'] = 100
- bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces
+ bare_metal_server_profile_disk_supported_interfaces_model = {} # BareMetalServerProfileDiskSupportedInterfaces
bare_metal_server_profile_disk_supported_interfaces_model['default'] = 'fcp'
bare_metal_server_profile_disk_supported_interfaces_model['type'] = 'enum'
bare_metal_server_profile_disk_supported_interfaces_model['values'] = ['fcp']
@@ -38714,7 +41472,8 @@ def test_bare_metal_server_profile_disk_serialization(self):
bare_metal_server_profile_disk_model_json2 = bare_metal_server_profile_disk_model.to_dict()
assert bare_metal_server_profile_disk_model_json2 == bare_metal_server_profile_disk_model_json
-class TestModel_BareMetalServerProfileDiskSupportedInterfaces():
+
+class TestModel_BareMetalServerProfileDiskSupportedInterfaces:
"""
Test Class for BareMetalServerProfileDiskSupportedInterfaces
"""
@@ -38745,7 +41504,8 @@ def test_bare_metal_server_profile_disk_supported_interfaces_serialization(self)
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():
+
+class TestModel_BareMetalServerProfileOSArchitecture:
"""
Test Class for BareMetalServerProfileOSArchitecture
"""
@@ -38776,7 +41536,8 @@ def test_bare_metal_server_profile_os_architecture_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileReference:
"""
Test Class for BareMetalServerProfileReference
"""
@@ -38807,7 +41568,8 @@ def test_bare_metal_server_profile_reference_serialization(self):
bare_metal_server_profile_reference_model_json2 = bare_metal_server_profile_reference_model.to_dict()
assert bare_metal_server_profile_reference_model_json2 == bare_metal_server_profile_reference_model_json
-class TestModel_BareMetalServerProfileSupportedTrustedPlatformModuleModes():
+
+class TestModel_BareMetalServerProfileSupportedTrustedPlatformModuleModes:
"""
Test Class for BareMetalServerProfileSupportedTrustedPlatformModuleModes
"""
@@ -38837,7 +41599,8 @@ def test_bare_metal_server_profile_supported_trusted_platform_module_modes_seria
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_BareMetalServerStatusReason():
+
+class TestModel_BareMetalServerStatusReason:
"""
Test Class for BareMetalServerStatusReason
"""
@@ -38868,7 +41631,8 @@ def test_bare_metal_server_status_reason_serialization(self):
bare_metal_server_status_reason_model_json2 = bare_metal_server_status_reason_model.to_dict()
assert bare_metal_server_status_reason_model_json2 == bare_metal_server_status_reason_model_json
-class TestModel_BareMetalServerTrustedPlatformModule():
+
+class TestModel_BareMetalServerTrustedPlatformModule:
"""
Test Class for BareMetalServerTrustedPlatformModule
"""
@@ -38899,7 +41663,8 @@ def test_bare_metal_server_trusted_platform_module_serialization(self):
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():
+
+class TestModel_BareMetalServerTrustedPlatformModulePatch:
"""
Test Class for BareMetalServerTrustedPlatformModulePatch
"""
@@ -38928,7 +41693,8 @@ def test_bare_metal_server_trusted_platform_module_patch_serialization(self):
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():
+
+class TestModel_BareMetalServerTrustedPlatformModulePrototype:
"""
Test Class for BareMetalServerTrustedPlatformModulePrototype
"""
@@ -38957,7 +41723,8 @@ def test_bare_metal_server_trusted_platform_module_prototype_serialization(self)
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_CatalogOfferingVersionReference():
+
+class TestModel_CatalogOfferingVersionReference:
"""
Test Class for CatalogOfferingVersionReference
"""
@@ -38986,7 +41753,8 @@ def test_catalog_offering_version_reference_serialization(self):
catalog_offering_version_reference_model_json2 = catalog_offering_version_reference_model.to_dict()
assert catalog_offering_version_reference_model_json2 == catalog_offering_version_reference_model_json
-class TestModel_CertificateInstanceReference():
+
+class TestModel_CertificateInstanceReference:
"""
Test Class for CertificateInstanceReference
"""
@@ -39015,7 +41783,69 @@ def test_certificate_instance_reference_serialization(self):
certificate_instance_reference_model_json2 = certificate_instance_reference_model.to_dict()
assert certificate_instance_reference_model_json2 == certificate_instance_reference_model_json
-class TestModel_DNSInstanceReference():
+
+class TestModel_CloudObjectStorageBucketReference:
+ """
+ Test Class for CloudObjectStorageBucketReference
+ """
+
+ def test_cloud_object_storage_bucket_reference_serialization(self):
+ """
+ Test serialization/deserialization for CloudObjectStorageBucketReference
+ """
+
+ # 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/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket'
+ cloud_object_storage_bucket_reference_model_json['name'] = 'bucket-27200-lwx4cfvcue'
+
+ # Construct a model instance of CloudObjectStorageBucketReference by calling from_dict on the json representation
+ cloud_object_storage_bucket_reference_model = CloudObjectStorageBucketReference.from_dict(cloud_object_storage_bucket_reference_model_json)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert cloud_object_storage_bucket_reference_model == cloud_object_storage_bucket_reference_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ cloud_object_storage_bucket_reference_model_json2 = cloud_object_storage_bucket_reference_model.to_dict()
+ assert cloud_object_storage_bucket_reference_model_json2 == cloud_object_storage_bucket_reference_model_json
+
+
+class TestModel_CloudObjectStorageObjectReference:
+ """
+ Test Class for CloudObjectStorageObjectReference
+ """
+
+ def test_cloud_object_storage_object_reference_serialization(self):
+ """
+ Test serialization/deserialization for CloudObjectStorageObjectReference
+ """
+
+ # Construct a json representation of a CloudObjectStorageObjectReference model
+ cloud_object_storage_object_reference_model_json = {}
+ 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert cloud_object_storage_object_reference_model == cloud_object_storage_object_reference_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ cloud_object_storage_object_reference_model_json2 = cloud_object_storage_object_reference_model.to_dict()
+ assert cloud_object_storage_object_reference_model_json2 == cloud_object_storage_object_reference_model_json
+
+
+class TestModel_DNSInstanceReference:
"""
Test Class for DNSInstanceReference
"""
@@ -39044,7 +41874,8 @@ def test_dns_instance_reference_serialization(self):
dns_instance_reference_model_json2 = dns_instance_reference_model.to_dict()
assert dns_instance_reference_model_json2 == dns_instance_reference_model_json
-class TestModel_DNSZoneReference():
+
+class TestModel_DNSZoneReference:
"""
Test Class for DNSZoneReference
"""
@@ -39073,7 +41904,8 @@ def test_dns_zone_reference_serialization(self):
dns_zone_reference_model_json2 = dns_zone_reference_model.to_dict()
assert dns_zone_reference_model_json2 == dns_zone_reference_model_json
-class TestModel_DedicatedHost():
+
+class TestModel_DedicatedHost:
"""
Test Class for DedicatedHost
"""
@@ -39085,22 +41917,22 @@ def test_dedicated_host_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vcpu_model = {} # VCPU
+ vcpu_model = {} # VCPU
vcpu_model['architecture'] = 'amd64'
vcpu_model['count'] = 4
vcpu_model['manufacturer'] = 'intel'
- instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
+ instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_disk_reference_model = {} # InstanceDiskReference
+ instance_disk_reference_model = {} # InstanceDiskReference
instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model
instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['name'] = 'my-instance-disk'
instance_disk_reference_model['resource_type'] = 'instance_disk'
- dedicated_host_disk_model = {} # DedicatedHostDisk
+ dedicated_host_disk_model = {} # DedicatedHostDisk
dedicated_host_disk_model['available'] = 38
dedicated_host_disk_model['created_at'] = '2019-01-01T12:00:00Z'
dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -39114,10 +41946,10 @@ def test_dedicated_host_serialization(self):
dedicated_host_disk_model['size'] = 38
dedicated_host_disk_model['supported_instance_interface_types'] = ['nvme']
- dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
+ dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- dedicated_host_group_reference_model = {} # DedicatedHostGroupReference
+ dedicated_host_group_reference_model = {} # DedicatedHostGroupReference
dedicated_host_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
dedicated_host_group_reference_model['deleted'] = dedicated_host_group_reference_deleted_model
dedicated_host_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
@@ -39125,30 +41957,30 @@ def test_dedicated_host_serialization(self):
dedicated_host_group_reference_model['name'] = 'my-host-group'
dedicated_host_group_reference_model['resource_type'] = 'dedicated_host_group'
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['name'] = 'my-instance'
- dedicated_host_profile_reference_model = {} # DedicatedHostProfileReference
+ dedicated_host_profile_reference_model = {} # DedicatedHostProfileReference
dedicated_host_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a'
dedicated_host_profile_reference_model['name'] = 'mx2-host-152x1216'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -39192,7 +42024,8 @@ def test_dedicated_host_serialization(self):
dedicated_host_model_json2 = dedicated_host_model.to_dict()
assert dedicated_host_model_json2 == dedicated_host_model_json
-class TestModel_DedicatedHostCollection():
+
+class TestModel_DedicatedHostCollection:
"""
Test Class for DedicatedHostCollection
"""
@@ -39204,22 +42037,22 @@ def test_dedicated_host_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vcpu_model = {} # VCPU
+ vcpu_model = {} # VCPU
vcpu_model['architecture'] = 'amd64'
vcpu_model['count'] = 4
vcpu_model['manufacturer'] = 'intel'
- instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
+ instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_disk_reference_model = {} # InstanceDiskReference
+ instance_disk_reference_model = {} # InstanceDiskReference
instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model
instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['name'] = 'my-instance-disk'
instance_disk_reference_model['resource_type'] = 'instance_disk'
- dedicated_host_disk_model = {} # DedicatedHostDisk
+ dedicated_host_disk_model = {} # DedicatedHostDisk
dedicated_host_disk_model['available'] = 38
dedicated_host_disk_model['created_at'] = '2019-01-01T12:00:00Z'
dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -39233,10 +42066,10 @@ def test_dedicated_host_collection_serialization(self):
dedicated_host_disk_model['size'] = 38
dedicated_host_disk_model['supported_instance_interface_types'] = ['nvme']
- dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
+ dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- dedicated_host_group_reference_model = {} # DedicatedHostGroupReference
+ dedicated_host_group_reference_model = {} # DedicatedHostGroupReference
dedicated_host_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
dedicated_host_group_reference_model['deleted'] = dedicated_host_group_reference_deleted_model
dedicated_host_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
@@ -39244,34 +42077,34 @@ def test_dedicated_host_collection_serialization(self):
dedicated_host_group_reference_model['name'] = 'my-host-group'
dedicated_host_group_reference_model['resource_type'] = 'dedicated_host_group'
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['name'] = 'my-instance'
- dedicated_host_profile_reference_model = {} # DedicatedHostProfileReference
+ dedicated_host_profile_reference_model = {} # DedicatedHostProfileReference
dedicated_host_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a'
dedicated_host_profile_reference_model['name'] = 'mx2-host-152x1216'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- zone_reference_model = {} # ZoneReference
+ 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'
- dedicated_host_model = {} # DedicatedHost
+ dedicated_host_model = {} # DedicatedHost
dedicated_host_model['available_memory'] = 128
dedicated_host_model['available_vcpu'] = vcpu_model
dedicated_host_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -39295,10 +42128,10 @@ def test_dedicated_host_collection_serialization(self):
dedicated_host_model['vcpu'] = vcpu_model
dedicated_host_model['zone'] = zone_reference_model
- dedicated_host_collection_first_model = {} # DedicatedHostCollectionFirst
+ dedicated_host_collection_first_model = {} # DedicatedHostCollectionFirst
dedicated_host_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?limit=20'
- dedicated_host_collection_next_model = {} # DedicatedHostCollectionNext
+ dedicated_host_collection_next_model = {} # DedicatedHostCollectionNext
dedicated_host_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a DedicatedHostCollection model
@@ -39324,7 +42157,8 @@ def test_dedicated_host_collection_serialization(self):
dedicated_host_collection_model_json2 = dedicated_host_collection_model.to_dict()
assert dedicated_host_collection_model_json2 == dedicated_host_collection_model_json
-class TestModel_DedicatedHostCollectionFirst():
+
+class TestModel_DedicatedHostCollectionFirst:
"""
Test Class for DedicatedHostCollectionFirst
"""
@@ -39353,7 +42187,8 @@ def test_dedicated_host_collection_first_serialization(self):
dedicated_host_collection_first_model_json2 = dedicated_host_collection_first_model.to_dict()
assert dedicated_host_collection_first_model_json2 == dedicated_host_collection_first_model_json
-class TestModel_DedicatedHostCollectionNext():
+
+class TestModel_DedicatedHostCollectionNext:
"""
Test Class for DedicatedHostCollectionNext
"""
@@ -39382,7 +42217,8 @@ def test_dedicated_host_collection_next_serialization(self):
dedicated_host_collection_next_model_json2 = dedicated_host_collection_next_model.to_dict()
assert dedicated_host_collection_next_model_json2 == dedicated_host_collection_next_model_json
-class TestModel_DedicatedHostDisk():
+
+class TestModel_DedicatedHostDisk:
"""
Test Class for DedicatedHostDisk
"""
@@ -39394,10 +42230,10 @@ def test_dedicated_host_disk_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
+ instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_disk_reference_model = {} # InstanceDiskReference
+ instance_disk_reference_model = {} # InstanceDiskReference
instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model
instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -39434,7 +42270,8 @@ def test_dedicated_host_disk_serialization(self):
dedicated_host_disk_model_json2 = dedicated_host_disk_model.to_dict()
assert dedicated_host_disk_model_json2 == dedicated_host_disk_model_json
-class TestModel_DedicatedHostDiskCollection():
+
+class TestModel_DedicatedHostDiskCollection:
"""
Test Class for DedicatedHostDiskCollection
"""
@@ -39446,17 +42283,17 @@ def test_dedicated_host_disk_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
+ instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_disk_reference_model = {} # InstanceDiskReference
+ instance_disk_reference_model = {} # InstanceDiskReference
instance_disk_reference_model['deleted'] = instance_disk_reference_deleted_model
instance_disk_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_reference_model['name'] = 'my-instance-disk'
instance_disk_reference_model['resource_type'] = 'instance_disk'
- dedicated_host_disk_model = {} # DedicatedHostDisk
+ dedicated_host_disk_model = {} # DedicatedHostDisk
dedicated_host_disk_model['available'] = 38
dedicated_host_disk_model['created_at'] = '2019-01-01T12:00:00Z'
dedicated_host_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -39489,7 +42326,8 @@ def test_dedicated_host_disk_collection_serialization(self):
dedicated_host_disk_collection_model_json2 = dedicated_host_disk_collection_model.to_dict()
assert dedicated_host_disk_collection_model_json2 == dedicated_host_disk_collection_model_json
-class TestModel_DedicatedHostDiskPatch():
+
+class TestModel_DedicatedHostDiskPatch:
"""
Test Class for DedicatedHostDiskPatch
"""
@@ -39518,7 +42356,8 @@ def test_dedicated_host_disk_patch_serialization(self):
dedicated_host_disk_patch_model_json2 = dedicated_host_disk_patch_model.to_dict()
assert dedicated_host_disk_patch_model_json2 == dedicated_host_disk_patch_model_json
-class TestModel_DedicatedHostGroup():
+
+class TestModel_DedicatedHostGroup:
"""
Test Class for DedicatedHostGroup
"""
@@ -39530,10 +42369,10 @@ def test_dedicated_host_group_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
+ dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- dedicated_host_reference_model = {} # DedicatedHostReference
+ dedicated_host_reference_model = {} # DedicatedHostReference
dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a'
dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model
dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -39541,16 +42380,16 @@ def test_dedicated_host_group_serialization(self):
dedicated_host_reference_model['name'] = 'my-host'
dedicated_host_reference_model['resource_type'] = 'dedicated_host'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -39584,7 +42423,8 @@ def test_dedicated_host_group_serialization(self):
dedicated_host_group_model_json2 = dedicated_host_group_model.to_dict()
assert dedicated_host_group_model_json2 == dedicated_host_group_model_json
-class TestModel_DedicatedHostGroupCollection():
+
+class TestModel_DedicatedHostGroupCollection:
"""
Test Class for DedicatedHostGroupCollection
"""
@@ -39596,13 +42436,13 @@ def test_dedicated_host_group_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_group_collection_first_model = {} # DedicatedHostGroupCollectionFirst
+ dedicated_host_group_collection_first_model = {} # DedicatedHostGroupCollectionFirst
dedicated_host_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?limit=20'
- dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
+ dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- dedicated_host_reference_model = {} # DedicatedHostReference
+ dedicated_host_reference_model = {} # DedicatedHostReference
dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a'
dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model
dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -39610,20 +42450,20 @@ def test_dedicated_host_group_collection_serialization(self):
dedicated_host_reference_model['name'] = 'my-host'
dedicated_host_reference_model['resource_type'] = 'dedicated_host'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- zone_reference_model = {} # ZoneReference
+ 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'
- dedicated_host_group_model = {} # DedicatedHostGroup
+ dedicated_host_group_model = {} # DedicatedHostGroup
dedicated_host_group_model['class'] = 'mx2'
dedicated_host_group_model['created_at'] = '2019-01-01T12:00:00Z'
dedicated_host_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
@@ -39637,7 +42477,7 @@ def test_dedicated_host_group_collection_serialization(self):
dedicated_host_group_model['supported_instance_profiles'] = [instance_profile_reference_model]
dedicated_host_group_model['zone'] = zone_reference_model
- dedicated_host_group_collection_next_model = {} # DedicatedHostGroupCollectionNext
+ dedicated_host_group_collection_next_model = {} # DedicatedHostGroupCollectionNext
dedicated_host_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a DedicatedHostGroupCollection model
@@ -39663,7 +42503,8 @@ def test_dedicated_host_group_collection_serialization(self):
dedicated_host_group_collection_model_json2 = dedicated_host_group_collection_model.to_dict()
assert dedicated_host_group_collection_model_json2 == dedicated_host_group_collection_model_json
-class TestModel_DedicatedHostGroupCollectionFirst():
+
+class TestModel_DedicatedHostGroupCollectionFirst:
"""
Test Class for DedicatedHostGroupCollectionFirst
"""
@@ -39692,7 +42533,8 @@ def test_dedicated_host_group_collection_first_serialization(self):
dedicated_host_group_collection_first_model_json2 = dedicated_host_group_collection_first_model.to_dict()
assert dedicated_host_group_collection_first_model_json2 == dedicated_host_group_collection_first_model_json
-class TestModel_DedicatedHostGroupCollectionNext():
+
+class TestModel_DedicatedHostGroupCollectionNext:
"""
Test Class for DedicatedHostGroupCollectionNext
"""
@@ -39721,7 +42563,8 @@ def test_dedicated_host_group_collection_next_serialization(self):
dedicated_host_group_collection_next_model_json2 = dedicated_host_group_collection_next_model.to_dict()
assert dedicated_host_group_collection_next_model_json2 == dedicated_host_group_collection_next_model_json
-class TestModel_DedicatedHostGroupPatch():
+
+class TestModel_DedicatedHostGroupPatch:
"""
Test Class for DedicatedHostGroupPatch
"""
@@ -39750,7 +42593,8 @@ def test_dedicated_host_group_patch_serialization(self):
dedicated_host_group_patch_model_json2 = dedicated_host_group_patch_model.to_dict()
assert dedicated_host_group_patch_model_json2 == dedicated_host_group_patch_model_json
-class TestModel_DedicatedHostGroupPrototypeDedicatedHostByZoneContext():
+
+class TestModel_DedicatedHostGroupPrototypeDedicatedHostByZoneContext:
"""
Test Class for DedicatedHostGroupPrototypeDedicatedHostByZoneContext
"""
@@ -39762,7 +42606,7 @@ def test_dedicated_host_group_prototype_dedicated_host_by_zone_context_serializa
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
# Construct a json representation of a DedicatedHostGroupPrototypeDedicatedHostByZoneContext model
@@ -39785,7 +42629,8 @@ def test_dedicated_host_group_prototype_dedicated_host_by_zone_context_serializa
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():
+
+class TestModel_DedicatedHostGroupReference:
"""
Test Class for DedicatedHostGroupReference
"""
@@ -39797,7 +42642,7 @@ def test_dedicated_host_group_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
+ dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a DedicatedHostGroupReference model
@@ -39824,7 +42669,8 @@ def test_dedicated_host_group_reference_serialization(self):
dedicated_host_group_reference_model_json2 = dedicated_host_group_reference_model.to_dict()
assert dedicated_host_group_reference_model_json2 == dedicated_host_group_reference_model_json
-class TestModel_DedicatedHostGroupReferenceDeleted():
+
+class TestModel_DedicatedHostGroupReferenceDeleted:
"""
Test Class for DedicatedHostGroupReferenceDeleted
"""
@@ -39853,7 +42699,8 @@ def test_dedicated_host_group_reference_deleted_serialization(self):
dedicated_host_group_reference_deleted_model_json2 = dedicated_host_group_reference_deleted_model.to_dict()
assert dedicated_host_group_reference_deleted_model_json2 == dedicated_host_group_reference_deleted_model_json
-class TestModel_DedicatedHostPatch():
+
+class TestModel_DedicatedHostPatch:
"""
Test Class for DedicatedHostPatch
"""
@@ -39883,7 +42730,8 @@ def test_dedicated_host_patch_serialization(self):
dedicated_host_patch_model_json2 = dedicated_host_patch_model.to_dict()
assert dedicated_host_patch_model_json2 == dedicated_host_patch_model_json
-class TestModel_DedicatedHostProfile():
+
+class TestModel_DedicatedHostProfile:
"""
Test Class for DedicatedHostProfile
"""
@@ -39895,49 +42743,49 @@ def test_dedicated_host_profile_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface
+ dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface
dedicated_host_profile_disk_interface_model['type'] = 'fixed'
dedicated_host_profile_disk_interface_model['value'] = 'nvme'
- dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity
+ dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity
dedicated_host_profile_disk_quantity_model['type'] = 'fixed'
dedicated_host_profile_disk_quantity_model['value'] = 4
- dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize
+ dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize
dedicated_host_profile_disk_size_model['type'] = 'fixed'
dedicated_host_profile_disk_size_model['value'] = 3200
- dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces
+ dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces
dedicated_host_profile_disk_supported_interfaces_model['type'] = 'fixed'
dedicated_host_profile_disk_supported_interfaces_model['value'] = ['nvme']
- dedicated_host_profile_disk_model = {} # DedicatedHostProfileDisk
+ dedicated_host_profile_disk_model = {} # DedicatedHostProfileDisk
dedicated_host_profile_disk_model['interface_type'] = dedicated_host_profile_disk_interface_model
dedicated_host_profile_disk_model['quantity'] = dedicated_host_profile_disk_quantity_model
dedicated_host_profile_disk_model['size'] = dedicated_host_profile_disk_size_model
dedicated_host_profile_disk_model['supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model
- dedicated_host_profile_memory_model = {} # DedicatedHostProfileMemoryFixed
+ dedicated_host_profile_memory_model = {} # DedicatedHostProfileMemoryFixed
dedicated_host_profile_memory_model['type'] = 'fixed'
dedicated_host_profile_memory_model['value'] = 16
- dedicated_host_profile_socket_model = {} # DedicatedHostProfileSocketFixed
+ dedicated_host_profile_socket_model = {} # DedicatedHostProfileSocketFixed
dedicated_host_profile_socket_model['type'] = 'fixed'
dedicated_host_profile_socket_model['value'] = 2
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- dedicated_host_profile_vcpu_architecture_model = {} # DedicatedHostProfileVCPUArchitecture
+ dedicated_host_profile_vcpu_architecture_model = {} # DedicatedHostProfileVCPUArchitecture
dedicated_host_profile_vcpu_architecture_model['type'] = 'fixed'
dedicated_host_profile_vcpu_architecture_model['value'] = 'amd64'
- dedicated_host_profile_vcpu_model = {} # DedicatedHostProfileVCPUFixed
+ dedicated_host_profile_vcpu_model = {} # DedicatedHostProfileVCPUFixed
dedicated_host_profile_vcpu_model['type'] = 'fixed'
dedicated_host_profile_vcpu_model['value'] = 16
- dedicated_host_profile_vcpu_manufacturer_model = {} # DedicatedHostProfileVCPUManufacturer
+ dedicated_host_profile_vcpu_manufacturer_model = {} # DedicatedHostProfileVCPUManufacturer
dedicated_host_profile_vcpu_manufacturer_model['type'] = 'fixed'
dedicated_host_profile_vcpu_manufacturer_model['value'] = 'intel'
@@ -39970,7 +42818,8 @@ def test_dedicated_host_profile_serialization(self):
dedicated_host_profile_model_json2 = dedicated_host_profile_model.to_dict()
assert dedicated_host_profile_model_json2 == dedicated_host_profile_model_json
-class TestModel_DedicatedHostProfileCollection():
+
+class TestModel_DedicatedHostProfileCollection:
"""
Test Class for DedicatedHostProfileCollection
"""
@@ -39982,59 +42831,59 @@ def test_dedicated_host_profile_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_profile_collection_first_model = {} # DedicatedHostProfileCollectionFirst
+ dedicated_host_profile_collection_first_model = {} # DedicatedHostProfileCollectionFirst
dedicated_host_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?limit=20'
- dedicated_host_profile_collection_next_model = {} # DedicatedHostProfileCollectionNext
+ dedicated_host_profile_collection_next_model = {} # DedicatedHostProfileCollectionNext
dedicated_host_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?start=9da91&limit=20'
- dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface
+ dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface
dedicated_host_profile_disk_interface_model['type'] = 'fixed'
dedicated_host_profile_disk_interface_model['value'] = 'nvme'
- dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity
+ dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity
dedicated_host_profile_disk_quantity_model['type'] = 'fixed'
dedicated_host_profile_disk_quantity_model['value'] = 4
- dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize
+ dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize
dedicated_host_profile_disk_size_model['type'] = 'fixed'
dedicated_host_profile_disk_size_model['value'] = 3200
- dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces
+ dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces
dedicated_host_profile_disk_supported_interfaces_model['type'] = 'fixed'
dedicated_host_profile_disk_supported_interfaces_model['value'] = ['nvme']
- dedicated_host_profile_disk_model = {} # DedicatedHostProfileDisk
+ dedicated_host_profile_disk_model = {} # DedicatedHostProfileDisk
dedicated_host_profile_disk_model['interface_type'] = dedicated_host_profile_disk_interface_model
dedicated_host_profile_disk_model['quantity'] = dedicated_host_profile_disk_quantity_model
dedicated_host_profile_disk_model['size'] = dedicated_host_profile_disk_size_model
dedicated_host_profile_disk_model['supported_instance_interface_types'] = dedicated_host_profile_disk_supported_interfaces_model
- dedicated_host_profile_memory_model = {} # DedicatedHostProfileMemoryFixed
+ dedicated_host_profile_memory_model = {} # DedicatedHostProfileMemoryFixed
dedicated_host_profile_memory_model['type'] = 'fixed'
dedicated_host_profile_memory_model['value'] = 16
- dedicated_host_profile_socket_model = {} # DedicatedHostProfileSocketFixed
+ dedicated_host_profile_socket_model = {} # DedicatedHostProfileSocketFixed
dedicated_host_profile_socket_model['type'] = 'fixed'
dedicated_host_profile_socket_model['value'] = 2
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- dedicated_host_profile_vcpu_architecture_model = {} # DedicatedHostProfileVCPUArchitecture
+ dedicated_host_profile_vcpu_architecture_model = {} # DedicatedHostProfileVCPUArchitecture
dedicated_host_profile_vcpu_architecture_model['type'] = 'fixed'
dedicated_host_profile_vcpu_architecture_model['value'] = 'amd64'
- dedicated_host_profile_vcpu_model = {} # DedicatedHostProfileVCPUFixed
+ dedicated_host_profile_vcpu_model = {} # DedicatedHostProfileVCPUFixed
dedicated_host_profile_vcpu_model['type'] = 'fixed'
dedicated_host_profile_vcpu_model['value'] = 16
- dedicated_host_profile_vcpu_manufacturer_model = {} # DedicatedHostProfileVCPUManufacturer
+ dedicated_host_profile_vcpu_manufacturer_model = {} # DedicatedHostProfileVCPUManufacturer
dedicated_host_profile_vcpu_manufacturer_model['type'] = 'fixed'
dedicated_host_profile_vcpu_manufacturer_model['value'] = 'intel'
- dedicated_host_profile_model = {} # DedicatedHostProfile
+ dedicated_host_profile_model = {} # DedicatedHostProfile
dedicated_host_profile_model['class'] = 'mx2'
dedicated_host_profile_model['disks'] = [dedicated_host_profile_disk_model]
dedicated_host_profile_model['family'] = 'balanced'
@@ -40070,7 +42919,8 @@ def test_dedicated_host_profile_collection_serialization(self):
dedicated_host_profile_collection_model_json2 = dedicated_host_profile_collection_model.to_dict()
assert dedicated_host_profile_collection_model_json2 == dedicated_host_profile_collection_model_json
-class TestModel_DedicatedHostProfileCollectionFirst():
+
+class TestModel_DedicatedHostProfileCollectionFirst:
"""
Test Class for DedicatedHostProfileCollectionFirst
"""
@@ -40099,7 +42949,8 @@ def test_dedicated_host_profile_collection_first_serialization(self):
dedicated_host_profile_collection_first_model_json2 = dedicated_host_profile_collection_first_model.to_dict()
assert dedicated_host_profile_collection_first_model_json2 == dedicated_host_profile_collection_first_model_json
-class TestModel_DedicatedHostProfileCollectionNext():
+
+class TestModel_DedicatedHostProfileCollectionNext:
"""
Test Class for DedicatedHostProfileCollectionNext
"""
@@ -40128,7 +42979,8 @@ def test_dedicated_host_profile_collection_next_serialization(self):
dedicated_host_profile_collection_next_model_json2 = dedicated_host_profile_collection_next_model.to_dict()
assert dedicated_host_profile_collection_next_model_json2 == dedicated_host_profile_collection_next_model_json
-class TestModel_DedicatedHostProfileDisk():
+
+class TestModel_DedicatedHostProfileDisk:
"""
Test Class for DedicatedHostProfileDisk
"""
@@ -40140,19 +42992,19 @@ def test_dedicated_host_profile_disk_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface
+ dedicated_host_profile_disk_interface_model = {} # DedicatedHostProfileDiskInterface
dedicated_host_profile_disk_interface_model['type'] = 'fixed'
dedicated_host_profile_disk_interface_model['value'] = 'nvme'
- dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity
+ dedicated_host_profile_disk_quantity_model = {} # DedicatedHostProfileDiskQuantity
dedicated_host_profile_disk_quantity_model['type'] = 'fixed'
dedicated_host_profile_disk_quantity_model['value'] = 4
- dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize
+ dedicated_host_profile_disk_size_model = {} # DedicatedHostProfileDiskSize
dedicated_host_profile_disk_size_model['type'] = 'fixed'
dedicated_host_profile_disk_size_model['value'] = 3200
- dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces
+ dedicated_host_profile_disk_supported_interfaces_model = {} # DedicatedHostProfileDiskSupportedInterfaces
dedicated_host_profile_disk_supported_interfaces_model['type'] = 'fixed'
dedicated_host_profile_disk_supported_interfaces_model['value'] = ['nvme']
@@ -40178,7 +43030,8 @@ def test_dedicated_host_profile_disk_serialization(self):
dedicated_host_profile_disk_model_json2 = dedicated_host_profile_disk_model.to_dict()
assert dedicated_host_profile_disk_model_json2 == dedicated_host_profile_disk_model_json
-class TestModel_DedicatedHostProfileDiskInterface():
+
+class TestModel_DedicatedHostProfileDiskInterface:
"""
Test Class for DedicatedHostProfileDiskInterface
"""
@@ -40208,7 +43061,8 @@ def test_dedicated_host_profile_disk_interface_serialization(self):
dedicated_host_profile_disk_interface_model_json2 = dedicated_host_profile_disk_interface_model.to_dict()
assert dedicated_host_profile_disk_interface_model_json2 == dedicated_host_profile_disk_interface_model_json
-class TestModel_DedicatedHostProfileDiskQuantity():
+
+class TestModel_DedicatedHostProfileDiskQuantity:
"""
Test Class for DedicatedHostProfileDiskQuantity
"""
@@ -40238,7 +43092,8 @@ def test_dedicated_host_profile_disk_quantity_serialization(self):
dedicated_host_profile_disk_quantity_model_json2 = dedicated_host_profile_disk_quantity_model.to_dict()
assert dedicated_host_profile_disk_quantity_model_json2 == dedicated_host_profile_disk_quantity_model_json
-class TestModel_DedicatedHostProfileDiskSize():
+
+class TestModel_DedicatedHostProfileDiskSize:
"""
Test Class for DedicatedHostProfileDiskSize
"""
@@ -40268,7 +43123,8 @@ def test_dedicated_host_profile_disk_size_serialization(self):
dedicated_host_profile_disk_size_model_json2 = dedicated_host_profile_disk_size_model.to_dict()
assert dedicated_host_profile_disk_size_model_json2 == dedicated_host_profile_disk_size_model_json
-class TestModel_DedicatedHostProfileDiskSupportedInterfaces():
+
+class TestModel_DedicatedHostProfileDiskSupportedInterfaces:
"""
Test Class for DedicatedHostProfileDiskSupportedInterfaces
"""
@@ -40298,7 +43154,8 @@ def test_dedicated_host_profile_disk_supported_interfaces_serialization(self):
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():
+
+class TestModel_DedicatedHostProfileReference:
"""
Test Class for DedicatedHostProfileReference
"""
@@ -40328,7 +43185,8 @@ def test_dedicated_host_profile_reference_serialization(self):
dedicated_host_profile_reference_model_json2 = dedicated_host_profile_reference_model.to_dict()
assert dedicated_host_profile_reference_model_json2 == dedicated_host_profile_reference_model_json
-class TestModel_DedicatedHostProfileVCPUArchitecture():
+
+class TestModel_DedicatedHostProfileVCPUArchitecture:
"""
Test Class for DedicatedHostProfileVCPUArchitecture
"""
@@ -40358,7 +43216,8 @@ def test_dedicated_host_profile_vcpu_architecture_serialization(self):
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
-class TestModel_DedicatedHostProfileVCPUManufacturer():
+
+class TestModel_DedicatedHostProfileVCPUManufacturer:
"""
Test Class for DedicatedHostProfileVCPUManufacturer
"""
@@ -40388,7 +43247,8 @@ def test_dedicated_host_profile_vcpu_manufacturer_serialization(self):
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
-class TestModel_DedicatedHostReference():
+
+class TestModel_DedicatedHostReference:
"""
Test Class for DedicatedHostReference
"""
@@ -40400,7 +43260,7 @@ def test_dedicated_host_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
+ dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a DedicatedHostReference model
@@ -40427,7 +43287,8 @@ def test_dedicated_host_reference_serialization(self):
dedicated_host_reference_model_json2 = dedicated_host_reference_model.to_dict()
assert dedicated_host_reference_model_json2 == dedicated_host_reference_model_json
-class TestModel_DedicatedHostReferenceDeleted():
+
+class TestModel_DedicatedHostReferenceDeleted:
"""
Test Class for DedicatedHostReferenceDeleted
"""
@@ -40456,7 +43317,8 @@ def test_dedicated_host_reference_deleted_serialization(self):
dedicated_host_reference_deleted_model_json2 = dedicated_host_reference_deleted_model.to_dict()
assert dedicated_host_reference_deleted_model_json2 == dedicated_host_reference_deleted_model_json
-class TestModel_DefaultNetworkACL():
+
+class TestModel_DefaultNetworkACL:
"""
Test Class for DefaultNetworkACL
"""
@@ -40468,21 +43330,21 @@ 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 = {} # 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'
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['name'] = 'my-rule-1'
- network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
+ network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
network_acl_rule_item_model['action'] = 'allow'
network_acl_rule_item_model['before'] = network_acl_rule_reference_model
network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -40499,10 +43361,10 @@ def test_default_network_acl_serialization(self):
network_acl_rule_item_model['source_port_max'] = 65535
network_acl_rule_item_model['source_port_min'] = 49152
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -40510,10 +43372,10 @@ def test_default_network_acl_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -40548,7 +43410,8 @@ def test_default_network_acl_serialization(self):
default_network_acl_model_json2 = default_network_acl_model.to_dict()
assert default_network_acl_model_json2 == default_network_acl_model_json
-class TestModel_DefaultRoutingTable():
+
+class TestModel_DefaultRoutingTable:
"""
Test Class for DefaultRoutingTable
"""
@@ -40560,22 +43423,22 @@ def test_default_routing_table_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_filter_model = {} # ResourceFilter
+ resource_filter_model = {} # ResourceFilter
resource_filter_model['resource_type'] = 'vpn_server'
- route_reference_deleted_model = {} # RouteReferenceDeleted
+ route_reference_deleted_model = {} # RouteReferenceDeleted
route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- route_reference_model = {} # RouteReference
+ route_reference_model = {} # RouteReference
route_reference_model['deleted'] = route_reference_deleted_model
route_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531'
route_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
route_reference_model['name'] = 'my-route-1'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -40615,7 +43478,8 @@ def test_default_routing_table_serialization(self):
default_routing_table_model_json2 = default_routing_table_model.to_dict()
assert default_routing_table_model_json2 == default_routing_table_model_json
-class TestModel_DefaultSecurityGroup():
+
+class TestModel_DefaultSecurityGroup:
"""
Test Class for DefaultSecurityGroup
"""
@@ -40627,15 +43491,15 @@ 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 = {} # 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'
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
- security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
+ security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
security_group_rule_model['direction'] = 'inbound'
security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a'
security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a'
@@ -40643,20 +43507,20 @@ def test_default_security_group_serialization(self):
security_group_rule_model['remote'] = security_group_rule_remote_model
security_group_rule_model['protocol'] = 'all'
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
+ security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model
security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['name'] = 'my-network-interface'
security_group_target_reference_model['resource_type'] = 'network_interface'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -40691,7 +43555,8 @@ def test_default_security_group_serialization(self):
default_security_group_model_json2 = default_security_group_model.to_dict()
assert default_security_group_model_json2 == default_security_group_model_json
-class TestModel_EncryptionKeyReference():
+
+class TestModel_EncryptionKeyReference:
"""
Test Class for EncryptionKeyReference
"""
@@ -40720,7 +43585,8 @@ def test_encryption_key_reference_serialization(self):
encryption_key_reference_model_json2 = encryption_key_reference_model.to_dict()
assert encryption_key_reference_model_json2 == encryption_key_reference_model_json
-class TestModel_EndpointGateway():
+
+class TestModel_EndpointGateway:
"""
Test Class for EndpointGateway
"""
@@ -40732,10 +43598,10 @@ def test_endpoint_gateway_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -40743,29 +43609,29 @@ def test_endpoint_gateway_serialization(self):
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 = {} # 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'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- endpoint_gateway_target_model = {} # EndpointGatewayTargetProviderCloudServiceReference
+ endpoint_gateway_target_model = {} # EndpointGatewayTargetProviderCloudServiceReference
endpoint_gateway_target_model['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::'
endpoint_gateway_target_model['resource_type'] = 'provider_cloud_service'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -40806,7 +43672,8 @@ def test_endpoint_gateway_serialization(self):
endpoint_gateway_model_json2 = endpoint_gateway_model.to_dict()
assert endpoint_gateway_model_json2 == endpoint_gateway_model_json
-class TestModel_EndpointGatewayCollection():
+
+class TestModel_EndpointGatewayCollection:
"""
Test Class for EndpointGatewayCollection
"""
@@ -40818,10 +43685,10 @@ def test_endpoint_gateway_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -40829,29 +43696,29 @@ def test_endpoint_gateway_collection_serialization(self):
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 = {} # 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'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- endpoint_gateway_target_model = {} # EndpointGatewayTargetProviderCloudServiceReference
+ endpoint_gateway_target_model = {} # EndpointGatewayTargetProviderCloudServiceReference
endpoint_gateway_target_model['crn'] = 'crn:v1:bluemix:public:cloudant:us-south:a/123456:3527280b-9327-4411-8020-591092e60353::'
endpoint_gateway_target_model['resource_type'] = 'provider_cloud_service'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -40859,7 +43726,7 @@ def test_endpoint_gateway_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- endpoint_gateway_model = {} # EndpointGateway
+ endpoint_gateway_model = {} # EndpointGateway
endpoint_gateway_model['created_at'] = '2019-01-01T12:00:00Z'
endpoint_gateway_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
endpoint_gateway_model['health_state'] = 'ok'
@@ -40876,10 +43743,10 @@ def test_endpoint_gateway_collection_serialization(self):
endpoint_gateway_model['target'] = endpoint_gateway_target_model
endpoint_gateway_model['vpc'] = vpc_reference_model
- endpoint_gateway_collection_first_model = {} # EndpointGatewayCollectionFirst
+ endpoint_gateway_collection_first_model = {} # EndpointGatewayCollectionFirst
endpoint_gateway_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?limit=20'
- endpoint_gateway_collection_next_model = {} # EndpointGatewayCollectionNext
+ endpoint_gateway_collection_next_model = {} # EndpointGatewayCollectionNext
endpoint_gateway_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?start=ffd653466e284937896724b2dd044c9c&limit=20'
# Construct a json representation of a EndpointGatewayCollection model
@@ -40905,7 +43772,8 @@ def test_endpoint_gateway_collection_serialization(self):
endpoint_gateway_collection_model_json2 = endpoint_gateway_collection_model.to_dict()
assert endpoint_gateway_collection_model_json2 == endpoint_gateway_collection_model_json
-class TestModel_EndpointGatewayCollectionFirst():
+
+class TestModel_EndpointGatewayCollectionFirst:
"""
Test Class for EndpointGatewayCollectionFirst
"""
@@ -40934,7 +43802,8 @@ def test_endpoint_gateway_collection_first_serialization(self):
endpoint_gateway_collection_first_model_json2 = endpoint_gateway_collection_first_model.to_dict()
assert endpoint_gateway_collection_first_model_json2 == endpoint_gateway_collection_first_model_json
-class TestModel_EndpointGatewayCollectionNext():
+
+class TestModel_EndpointGatewayCollectionNext:
"""
Test Class for EndpointGatewayCollectionNext
"""
@@ -40963,7 +43832,8 @@ def test_endpoint_gateway_collection_next_serialization(self):
endpoint_gateway_collection_next_model_json2 = endpoint_gateway_collection_next_model.to_dict()
assert endpoint_gateway_collection_next_model_json2 == endpoint_gateway_collection_next_model_json
-class TestModel_EndpointGatewayPatch():
+
+class TestModel_EndpointGatewayPatch:
"""
Test Class for EndpointGatewayPatch
"""
@@ -40992,7 +43862,8 @@ def test_endpoint_gateway_patch_serialization(self):
endpoint_gateway_patch_model_json2 = endpoint_gateway_patch_model.to_dict()
assert endpoint_gateway_patch_model_json2 == endpoint_gateway_patch_model_json
-class TestModel_EndpointGatewayReferenceDeleted():
+
+class TestModel_EndpointGatewayReferenceDeleted:
"""
Test Class for EndpointGatewayReferenceDeleted
"""
@@ -41021,7 +43892,8 @@ def test_endpoint_gateway_reference_deleted_serialization(self):
endpoint_gateway_reference_deleted_model_json2 = endpoint_gateway_reference_deleted_model.to_dict()
assert endpoint_gateway_reference_deleted_model_json2 == endpoint_gateway_reference_deleted_model_json
-class TestModel_FloatingIP():
+
+class TestModel_FloatingIP:
"""
Test Class for FloatingIP
"""
@@ -41033,18 +43905,18 @@ 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 = {} # 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'
- network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
+ network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -41052,7 +43924,7 @@ def test_floating_ip_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference
+ floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference
floating_ip_target_model['deleted'] = network_interface_reference_deleted_model
floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
floating_ip_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -41060,7 +43932,7 @@ def test_floating_ip_serialization(self):
floating_ip_target_model['primary_ip'] = reserved_ip_reference_model
floating_ip_target_model['resource_type'] = 'network_interface'
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
@@ -41092,7 +43964,8 @@ def test_floating_ip_serialization(self):
floating_ip_model_json2 = floating_ip_model.to_dict()
assert floating_ip_model_json2 == floating_ip_model_json
-class TestModel_FloatingIPCollection():
+
+class TestModel_FloatingIPCollection:
"""
Test Class for FloatingIPCollection
"""
@@ -41104,21 +43977,21 @@ def test_floating_ip_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_collection_first_model = {} # FloatingIPCollectionFirst
+ floating_ip_collection_first_model = {} # FloatingIPCollectionFirst
floating_ip_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?limit=20'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
+ network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -41126,7 +43999,7 @@ def test_floating_ip_collection_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference
+ floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference
floating_ip_target_model['deleted'] = network_interface_reference_deleted_model
floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
floating_ip_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -41134,11 +44007,11 @@ def test_floating_ip_collection_serialization(self):
floating_ip_target_model['primary_ip'] = reserved_ip_reference_model
floating_ip_target_model['resource_type'] = 'network_interface'
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
- floating_ip_model = {} # FloatingIP
+ floating_ip_model = {} # FloatingIP
floating_ip_model['address'] = '203.0.113.1'
floating_ip_model['created_at'] = '2019-01-01T12:00:00Z'
floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
@@ -41150,7 +44023,7 @@ def test_floating_ip_collection_serialization(self):
floating_ip_model['target'] = floating_ip_target_model
floating_ip_model['zone'] = zone_reference_model
- floating_ip_collection_next_model = {} # FloatingIPCollectionNext
+ floating_ip_collection_next_model = {} # FloatingIPCollectionNext
floating_ip_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/floating_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a FloatingIPCollection model
@@ -41176,7 +44049,8 @@ def test_floating_ip_collection_serialization(self):
floating_ip_collection_model_json2 = floating_ip_collection_model.to_dict()
assert floating_ip_collection_model_json2 == floating_ip_collection_model_json
-class TestModel_FloatingIPCollectionFirst():
+
+class TestModel_FloatingIPCollectionFirst:
"""
Test Class for FloatingIPCollectionFirst
"""
@@ -41205,7 +44079,8 @@ def test_floating_ip_collection_first_serialization(self):
floating_ip_collection_first_model_json2 = floating_ip_collection_first_model.to_dict()
assert floating_ip_collection_first_model_json2 == floating_ip_collection_first_model_json
-class TestModel_FloatingIPCollectionNext():
+
+class TestModel_FloatingIPCollectionNext:
"""
Test Class for FloatingIPCollectionNext
"""
@@ -41234,7 +44109,8 @@ def test_floating_ip_collection_next_serialization(self):
floating_ip_collection_next_model_json2 = floating_ip_collection_next_model.to_dict()
assert floating_ip_collection_next_model_json2 == floating_ip_collection_next_model_json
-class TestModel_FloatingIPPatch():
+
+class TestModel_FloatingIPPatch:
"""
Test Class for FloatingIPPatch
"""
@@ -41246,7 +44122,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 = {} # FloatingIPTargetPatchNetworkInterfaceIdentityById
+ floating_ip_target_patch_model = {} # FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById
floating_ip_target_patch_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
# Construct a json representation of a FloatingIPPatch model
@@ -41269,7 +44145,8 @@ def test_floating_ip_patch_serialization(self):
floating_ip_patch_model_json2 = floating_ip_patch_model.to_dict()
assert floating_ip_patch_model_json2 == floating_ip_patch_model_json
-class TestModel_FloatingIPReference():
+
+class TestModel_FloatingIPReference:
"""
Test Class for FloatingIPReference
"""
@@ -41281,7 +44158,7 @@ def test_floating_ip_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a FloatingIPReference model
@@ -41308,7 +44185,8 @@ def test_floating_ip_reference_serialization(self):
floating_ip_reference_model_json2 = floating_ip_reference_model.to_dict()
assert floating_ip_reference_model_json2 == floating_ip_reference_model_json
-class TestModel_FloatingIPReferenceDeleted():
+
+class TestModel_FloatingIPReferenceDeleted:
"""
Test Class for FloatingIPReferenceDeleted
"""
@@ -41337,7 +44215,8 @@ def test_floating_ip_reference_deleted_serialization(self):
floating_ip_reference_deleted_model_json2 = floating_ip_reference_deleted_model.to_dict()
assert floating_ip_reference_deleted_model_json2 == floating_ip_reference_deleted_model_json
-class TestModel_FloatingIPUnpaginatedCollection():
+
+class TestModel_FloatingIPUnpaginatedCollection:
"""
Test Class for FloatingIPUnpaginatedCollection
"""
@@ -41349,18 +44228,18 @@ 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 = {} # 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'
- network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
+ network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -41368,7 +44247,7 @@ def test_floating_ip_unpaginated_collection_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference
+ floating_ip_target_model = {} # FloatingIPTargetNetworkInterfaceReference
floating_ip_target_model['deleted'] = network_interface_reference_deleted_model
floating_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
floating_ip_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -41376,11 +44255,11 @@ def test_floating_ip_unpaginated_collection_serialization(self):
floating_ip_target_model['primary_ip'] = reserved_ip_reference_model
floating_ip_target_model['resource_type'] = 'network_interface'
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
- floating_ip_model = {} # FloatingIP
+ floating_ip_model = {} # FloatingIP
floating_ip_model['address'] = '203.0.113.1'
floating_ip_model['created_at'] = '2019-01-01T12:00:00Z'
floating_ip_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
@@ -41411,7 +44290,8 @@ def test_floating_ip_unpaginated_collection_serialization(self):
floating_ip_unpaginated_collection_model_json2 = floating_ip_unpaginated_collection_model.to_dict()
assert floating_ip_unpaginated_collection_model_json2 == floating_ip_unpaginated_collection_model_json
-class TestModel_FlowLogCollector():
+
+class TestModel_FlowLogCollector:
"""
Test Class for FlowLogCollector
"""
@@ -41423,28 +44303,28 @@ 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 = {} # 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'
- legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference
+ legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference
legacy_cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue'
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext
+ flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext
flow_log_collector_target_model['deleted'] = network_interface_reference_target_context_deleted_model
flow_log_collector_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
flow_log_collector_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
flow_log_collector_target_model['name'] = 'my-network-interface'
flow_log_collector_target_model['resource_type'] = 'network_interface'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -41482,7 +44362,8 @@ def test_flow_log_collector_serialization(self):
flow_log_collector_model_json2 = flow_log_collector_model.to_dict()
assert flow_log_collector_model_json2 == flow_log_collector_model_json
-class TestModel_FlowLogCollectorCollection():
+
+class TestModel_FlowLogCollectorCollection:
"""
Test Class for FlowLogCollectorCollection
"""
@@ -41494,31 +44375,31 @@ def test_flow_log_collector_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- flow_log_collector_collection_first_model = {} # FlowLogCollectorCollectionFirst
+ flow_log_collector_collection_first_model = {} # FlowLogCollectorCollectionFirst
flow_log_collector_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference
+ legacy_cloud_object_storage_bucket_reference_model = {} # LegacyCloudObjectStorageBucketReference
legacy_cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue'
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext
+ flow_log_collector_target_model = {} # FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext
flow_log_collector_target_model['deleted'] = network_interface_reference_target_context_deleted_model
flow_log_collector_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
flow_log_collector_target_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
flow_log_collector_target_model['name'] = 'my-network-interface'
flow_log_collector_target_model['resource_type'] = 'network_interface'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -41526,7 +44407,7 @@ def test_flow_log_collector_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- flow_log_collector_model = {} # FlowLogCollector
+ 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'
@@ -41540,7 +44421,7 @@ def test_flow_log_collector_collection_serialization(self):
flow_log_collector_model['target'] = flow_log_collector_target_model
flow_log_collector_model['vpc'] = vpc_reference_model
- flow_log_collector_collection_next_model = {} # FlowLogCollectorCollectionNext
+ flow_log_collector_collection_next_model = {} # FlowLogCollectorCollectionNext
flow_log_collector_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a FlowLogCollectorCollection model
@@ -41566,7 +44447,8 @@ def test_flow_log_collector_collection_serialization(self):
flow_log_collector_collection_model_json2 = flow_log_collector_collection_model.to_dict()
assert flow_log_collector_collection_model_json2 == flow_log_collector_collection_model_json
-class TestModel_FlowLogCollectorCollectionFirst():
+
+class TestModel_FlowLogCollectorCollectionFirst:
"""
Test Class for FlowLogCollectorCollectionFirst
"""
@@ -41595,7 +44477,8 @@ def test_flow_log_collector_collection_first_serialization(self):
flow_log_collector_collection_first_model_json2 = flow_log_collector_collection_first_model.to_dict()
assert flow_log_collector_collection_first_model_json2 == flow_log_collector_collection_first_model_json
-class TestModel_FlowLogCollectorCollectionNext():
+
+class TestModel_FlowLogCollectorCollectionNext:
"""
Test Class for FlowLogCollectorCollectionNext
"""
@@ -41624,7 +44507,8 @@ def test_flow_log_collector_collection_next_serialization(self):
flow_log_collector_collection_next_model_json2 = flow_log_collector_collection_next_model.to_dict()
assert flow_log_collector_collection_next_model_json2 == flow_log_collector_collection_next_model_json
-class TestModel_FlowLogCollectorPatch():
+
+class TestModel_FlowLogCollectorPatch:
"""
Test Class for FlowLogCollectorPatch
"""
@@ -41654,7 +44538,8 @@ def test_flow_log_collector_patch_serialization(self):
flow_log_collector_patch_model_json2 = flow_log_collector_patch_model.to_dict()
assert flow_log_collector_patch_model_json2 == flow_log_collector_patch_model_json
-class TestModel_GenericResourceReferenceDeleted():
+
+class TestModel_GenericResourceReferenceDeleted:
"""
Test Class for GenericResourceReferenceDeleted
"""
@@ -41683,7 +44568,8 @@ def test_generic_resource_reference_deleted_serialization(self):
generic_resource_reference_deleted_model_json2 = generic_resource_reference_deleted_model.to_dict()
assert generic_resource_reference_deleted_model_json2 == generic_resource_reference_deleted_model_json
-class TestModel_IKEPolicy():
+
+class TestModel_IKEPolicy:
"""
Test Class for IKEPolicy
"""
@@ -41695,17 +44581,17 @@ def test_ike_policy_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
@@ -41741,7 +44627,8 @@ def test_ike_policy_serialization(self):
ike_policy_model_json2 = ike_policy_model.to_dict()
assert ike_policy_model_json2 == ike_policy_model_json
-class TestModel_IKEPolicyCollection():
+
+class TestModel_IKEPolicyCollection:
"""
Test Class for IKEPolicyCollection
"""
@@ -41753,25 +44640,25 @@ def test_ike_policy_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ike_policy_collection_first_model = {} # IKEPolicyCollectionFirst
+ ike_policy_collection_first_model = {} # IKEPolicyCollectionFirst
ike_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?limit=20'
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- ike_policy_model = {} # IKEPolicy
+ ike_policy_model = {} # IKEPolicy
ike_policy_model['authentication_algorithm'] = 'md5'
ike_policy_model['connections'] = [vpn_gateway_connection_reference_model]
ike_policy_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -41786,7 +44673,7 @@ def test_ike_policy_collection_serialization(self):
ike_policy_model['resource_group'] = resource_group_reference_model
ike_policy_model['resource_type'] = 'ike_policy'
- ike_policy_collection_next_model = {} # IKEPolicyCollectionNext
+ ike_policy_collection_next_model = {} # IKEPolicyCollectionNext
ike_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20'
# Construct a json representation of a IKEPolicyCollection model
@@ -41812,7 +44699,8 @@ def test_ike_policy_collection_serialization(self):
ike_policy_collection_model_json2 = ike_policy_collection_model.to_dict()
assert ike_policy_collection_model_json2 == ike_policy_collection_model_json
-class TestModel_IKEPolicyCollectionFirst():
+
+class TestModel_IKEPolicyCollectionFirst:
"""
Test Class for IKEPolicyCollectionFirst
"""
@@ -41841,7 +44729,8 @@ def test_ike_policy_collection_first_serialization(self):
ike_policy_collection_first_model_json2 = ike_policy_collection_first_model.to_dict()
assert ike_policy_collection_first_model_json2 == ike_policy_collection_first_model_json
-class TestModel_IKEPolicyCollectionNext():
+
+class TestModel_IKEPolicyCollectionNext:
"""
Test Class for IKEPolicyCollectionNext
"""
@@ -41870,7 +44759,8 @@ def test_ike_policy_collection_next_serialization(self):
ike_policy_collection_next_model_json2 = ike_policy_collection_next_model.to_dict()
assert ike_policy_collection_next_model_json2 == ike_policy_collection_next_model_json
-class TestModel_IKEPolicyPatch():
+
+class TestModel_IKEPolicyPatch:
"""
Test Class for IKEPolicyPatch
"""
@@ -41904,7 +44794,8 @@ def test_ike_policy_patch_serialization(self):
ike_policy_patch_model_json2 = ike_policy_patch_model.to_dict()
assert ike_policy_patch_model_json2 == ike_policy_patch_model_json
-class TestModel_IKEPolicyReference():
+
+class TestModel_IKEPolicyReference:
"""
Test Class for IKEPolicyReference
"""
@@ -41916,7 +44807,7 @@ def test_ike_policy_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
+ ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a IKEPolicyReference model
@@ -41942,7 +44833,8 @@ def test_ike_policy_reference_serialization(self):
ike_policy_reference_model_json2 = ike_policy_reference_model.to_dict()
assert ike_policy_reference_model_json2 == ike_policy_reference_model_json
-class TestModel_IKEPolicyReferenceDeleted():
+
+class TestModel_IKEPolicyReferenceDeleted:
"""
Test Class for IKEPolicyReferenceDeleted
"""
@@ -41971,7 +44863,8 @@ def test_ike_policy_reference_deleted_serialization(self):
ike_policy_reference_deleted_model_json2 = ike_policy_reference_deleted_model.to_dict()
assert ike_policy_reference_deleted_model_json2 == ike_policy_reference_deleted_model_json
-class TestModel_IP():
+
+class TestModel_IP:
"""
Test Class for IP
"""
@@ -42000,7 +44893,8 @@ def test_ip_serialization(self):
ip_model_json2 = ip_model.to_dict()
assert ip_model_json2 == ip_model_json
-class TestModel_IPsecPolicy():
+
+class TestModel_IPsecPolicy:
"""
Test Class for IPsecPolicy
"""
@@ -42012,17 +44906,17 @@ def test_i_psec_policy_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
@@ -42058,7 +44952,8 @@ def test_i_psec_policy_serialization(self):
i_psec_policy_model_json2 = i_psec_policy_model.to_dict()
assert i_psec_policy_model_json2 == i_psec_policy_model_json
-class TestModel_IPsecPolicyCollection():
+
+class TestModel_IPsecPolicyCollection:
"""
Test Class for IPsecPolicyCollection
"""
@@ -42070,25 +44965,25 @@ def test_i_psec_policy_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- i_psec_policy_collection_first_model = {} # IPsecPolicyCollectionFirst
+ i_psec_policy_collection_first_model = {} # IPsecPolicyCollectionFirst
i_psec_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?limit=20'
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- i_psec_policy_model = {} # IPsecPolicy
+ i_psec_policy_model = {} # IPsecPolicy
i_psec_policy_model['authentication_algorithm'] = 'disabled'
i_psec_policy_model['connections'] = [vpn_gateway_connection_reference_model]
i_psec_policy_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -42103,7 +44998,7 @@ def test_i_psec_policy_collection_serialization(self):
i_psec_policy_model['resource_type'] = 'ipsec_policy'
i_psec_policy_model['transform_protocol'] = 'esp'
- i_psec_policy_collection_next_model = {} # IPsecPolicyCollectionNext
+ i_psec_policy_collection_next_model = {} # IPsecPolicyCollectionNext
i_psec_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20'
# Construct a json representation of a IPsecPolicyCollection model
@@ -42129,7 +45024,8 @@ def test_i_psec_policy_collection_serialization(self):
i_psec_policy_collection_model_json2 = i_psec_policy_collection_model.to_dict()
assert i_psec_policy_collection_model_json2 == i_psec_policy_collection_model_json
-class TestModel_IPsecPolicyCollectionFirst():
+
+class TestModel_IPsecPolicyCollectionFirst:
"""
Test Class for IPsecPolicyCollectionFirst
"""
@@ -42158,7 +45054,8 @@ def test_i_psec_policy_collection_first_serialization(self):
i_psec_policy_collection_first_model_json2 = i_psec_policy_collection_first_model.to_dict()
assert i_psec_policy_collection_first_model_json2 == i_psec_policy_collection_first_model_json
-class TestModel_IPsecPolicyCollectionNext():
+
+class TestModel_IPsecPolicyCollectionNext:
"""
Test Class for IPsecPolicyCollectionNext
"""
@@ -42187,7 +45084,8 @@ def test_i_psec_policy_collection_next_serialization(self):
i_psec_policy_collection_next_model_json2 = i_psec_policy_collection_next_model.to_dict()
assert i_psec_policy_collection_next_model_json2 == i_psec_policy_collection_next_model_json
-class TestModel_IPsecPolicyPatch():
+
+class TestModel_IPsecPolicyPatch:
"""
Test Class for IPsecPolicyPatch
"""
@@ -42220,7 +45118,8 @@ def test_i_psec_policy_patch_serialization(self):
i_psec_policy_patch_model_json2 = i_psec_policy_patch_model.to_dict()
assert i_psec_policy_patch_model_json2 == i_psec_policy_patch_model_json
-class TestModel_IPsecPolicyReference():
+
+class TestModel_IPsecPolicyReference:
"""
Test Class for IPsecPolicyReference
"""
@@ -42232,7 +45131,7 @@ def test_i_psec_policy_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
+ i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a IPsecPolicyReference model
@@ -42258,7 +45157,8 @@ def test_i_psec_policy_reference_serialization(self):
i_psec_policy_reference_model_json2 = i_psec_policy_reference_model.to_dict()
assert i_psec_policy_reference_model_json2 == i_psec_policy_reference_model_json
-class TestModel_IPsecPolicyReferenceDeleted():
+
+class TestModel_IPsecPolicyReferenceDeleted:
"""
Test Class for IPsecPolicyReferenceDeleted
"""
@@ -42287,7 +45187,8 @@ def test_i_psec_policy_reference_deleted_serialization(self):
i_psec_policy_reference_deleted_model_json2 = i_psec_policy_reference_deleted_model.to_dict()
assert i_psec_policy_reference_deleted_model_json2 == i_psec_policy_reference_deleted_model_json
-class TestModel_Image():
+
+class TestModel_Image:
"""
Test Class for Image
"""
@@ -42299,24 +45200,24 @@ 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 = {} # CatalogOfferingVersionReference
catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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 = {} # ImageCatalogOffering
image_catalog_offering_model['managed'] = True
image_catalog_offering_model['version'] = catalog_offering_version_reference_model
- encryption_key_reference_model = {} # EncryptionKeyReference
+ encryption_key_reference_model = {} # EncryptionKeyReference
encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- image_file_checksums_model = {} # ImageFileChecksums
+ image_file_checksums_model = {} # ImageFileChecksums
image_file_checksums_model['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15'
- image_file_model = {} # ImageFile
+ image_file_model = {} # ImageFile
image_file_model['checksums'] = image_file_checksums_model
image_file_model['size'] = 1
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -42326,22 +45227,22 @@ def test_image_serialization(self):
operating_system_model['vendor'] = 'Canonical'
operating_system_model['version'] = '16.04 LTS'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['name'] = 'my-resource-group'
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_model = {} # VolumeReference
+ volume_reference_model = {} # VolumeReference
volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['deleted'] = volume_reference_deleted_model
volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['name'] = 'my-volume'
- image_status_reason_model = {} # ImageStatusReason
+ image_status_reason_model = {} # ImageStatusReason
image_status_reason_model['code'] = 'encryption_key_deleted'
image_status_reason_model['message'] = 'testString'
image_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys'
@@ -42380,7 +45281,8 @@ def test_image_serialization(self):
image_model_json2 = image_model.to_dict()
assert image_model_json2 == image_model_json
-class TestModel_ImageCatalogOffering():
+
+class TestModel_ImageCatalogOffering:
"""
Test Class for ImageCatalogOffering
"""
@@ -42392,7 +45294,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 = {} # CatalogOfferingVersionReference
catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d'
# Construct a json representation of a ImageCatalogOffering model
@@ -42415,7 +45317,8 @@ def test_image_catalog_offering_serialization(self):
image_catalog_offering_model_json2 = image_catalog_offering_model.to_dict()
assert image_catalog_offering_model_json2 == image_catalog_offering_model_json
-class TestModel_ImageCollection():
+
+class TestModel_ImageCollection:
"""
Test Class for ImageCollection
"""
@@ -42427,27 +45330,27 @@ def test_image_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- image_collection_first_model = {} # ImageCollectionFirst
+ image_collection_first_model = {} # ImageCollectionFirst
image_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?limit=20'
- catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
+ catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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 = {} # ImageCatalogOffering
image_catalog_offering_model['managed'] = True
image_catalog_offering_model['version'] = catalog_offering_version_reference_model
- encryption_key_reference_model = {} # EncryptionKeyReference
+ encryption_key_reference_model = {} # EncryptionKeyReference
encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- image_file_checksums_model = {} # ImageFileChecksums
+ image_file_checksums_model = {} # ImageFileChecksums
image_file_checksums_model['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15'
- image_file_model = {} # ImageFile
+ image_file_model = {} # ImageFile
image_file_model['checksums'] = image_file_checksums_model
image_file_model['size'] = 1
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -42457,27 +45360,27 @@ def test_image_collection_serialization(self):
operating_system_model['vendor'] = 'Canonical'
operating_system_model['version'] = '16.04 LTS'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['name'] = 'my-resource-group'
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_model = {} # VolumeReference
+ volume_reference_model = {} # VolumeReference
volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['deleted'] = volume_reference_deleted_model
volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['name'] = 'my-volume'
- image_status_reason_model = {} # ImageStatusReason
+ image_status_reason_model = {} # ImageStatusReason
image_status_reason_model['code'] = 'encryption_key_deleted'
image_status_reason_model['message'] = 'testString'
image_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/key-protect?topic=key-protect-restore-keys'
- image_model = {} # Image
+ image_model = {} # Image
image_model['catalog_offering'] = image_catalog_offering_model
image_model['created_at'] = '2019-01-01T12:00:00Z'
image_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
@@ -42495,7 +45398,7 @@ def test_image_collection_serialization(self):
image_model['status_reasons'] = [image_status_reason_model]
image_model['visibility'] = 'private'
- image_collection_next_model = {} # ImageCollectionNext
+ image_collection_next_model = {} # ImageCollectionNext
image_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a ImageCollection model
@@ -42520,7 +45423,8 @@ def test_image_collection_serialization(self):
image_collection_model_json2 = image_collection_model.to_dict()
assert image_collection_model_json2 == image_collection_model_json
-class TestModel_ImageCollectionFirst():
+
+class TestModel_ImageCollectionFirst:
"""
Test Class for ImageCollectionFirst
"""
@@ -42549,7 +45453,8 @@ def test_image_collection_first_serialization(self):
image_collection_first_model_json2 = image_collection_first_model.to_dict()
assert image_collection_first_model_json2 == image_collection_first_model_json
-class TestModel_ImageCollectionNext():
+
+class TestModel_ImageCollectionNext:
"""
Test Class for ImageCollectionNext
"""
@@ -42578,7 +45483,187 @@ def test_image_collection_next_serialization(self):
image_collection_next_model_json2 = image_collection_next_model.to_dict()
assert image_collection_next_model_json2 == image_collection_next_model_json
-class TestModel_ImageFile():
+
+class TestModel_ImageExportJob:
+ """
+ Test Class for ImageExportJob
+ """
+
+ def test_image_export_job_serialization(self):
+ """
+ Test serialization/deserialization for ImageExportJob
+ """
+
+ # Construct dict forms of any model objects needed in order to build this model.
+
+ image_export_job_status_reason_model = {} # ImageExportJobStatusReason
+ image_export_job_status_reason_model['code'] = 'cannot_access_storage_bucket'
+ image_export_job_status_reason_model['message'] = 'testString'
+ image_export_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq'
+
+ cloud_object_storage_bucket_reference_model = {} # CloudObjectStorageBucketReference
+ cloud_object_storage_bucket_reference_model['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket'
+ cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue'
+
+ cloud_object_storage_object_reference_model = {} # CloudObjectStorageObjectReference
+ cloud_object_storage_object_reference_model['name'] = 'my-object'
+
+ # Construct a json representation of a ImageExportJob model
+ image_export_job_model_json = {}
+ image_export_job_model_json['completed_at'] = '2019-01-01T12:00:00Z'
+ image_export_job_model_json['created_at'] = '2019-01-01T12:00:00Z'
+ image_export_job_model_json['encrypted_data_key'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4='
+ image_export_job_model_json['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['resource_type'] = 'image_export_job'
+ image_export_job_model_json['started_at'] = '2019-01-01T12:00:00Z'
+ image_export_job_model_json['status'] = 'deleting'
+ image_export_job_model_json['status_reasons'] = [image_export_job_status_reason_model]
+ image_export_job_model_json['storage_bucket'] = cloud_object_storage_bucket_reference_model
+ image_export_job_model_json['storage_href'] = 'cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2'
+ image_export_job_model_json['storage_object'] = cloud_object_storage_object_reference_model
+
+ # Construct a model instance of ImageExportJob by calling from_dict on the json representation
+ image_export_job_model = ImageExportJob.from_dict(image_export_job_model_json)
+ assert image_export_job_model != False
+
+ # Construct a model instance of ImageExportJob by calling from_dict on the json representation
+ image_export_job_model_dict = ImageExportJob.from_dict(image_export_job_model_json).__dict__
+ image_export_job_model2 = ImageExportJob(**image_export_job_model_dict)
+
+ # Verify the model instances are equivalent
+ assert image_export_job_model == image_export_job_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ image_export_job_model_json2 = image_export_job_model.to_dict()
+ assert image_export_job_model_json2 == image_export_job_model_json
+
+
+class TestModel_ImageExportJobPatch:
+ """
+ Test Class for ImageExportJobPatch
+ """
+
+ def test_image_export_job_patch_serialization(self):
+ """
+ Test serialization/deserialization for ImageExportJobPatch
+ """
+
+ # Construct a json representation of a ImageExportJobPatch model
+ image_export_job_patch_model_json = {}
+ image_export_job_patch_model_json['name'] = 'my-image-export'
+
+ # Construct a model instance of ImageExportJobPatch by calling from_dict on the json representation
+ image_export_job_patch_model = ImageExportJobPatch.from_dict(image_export_job_patch_model_json)
+ assert image_export_job_patch_model != False
+
+ # Construct a model instance of ImageExportJobPatch by calling from_dict on the json representation
+ image_export_job_patch_model_dict = ImageExportJobPatch.from_dict(image_export_job_patch_model_json).__dict__
+ image_export_job_patch_model2 = ImageExportJobPatch(**image_export_job_patch_model_dict)
+
+ # Verify the model instances are equivalent
+ assert image_export_job_patch_model == image_export_job_patch_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ image_export_job_patch_model_json2 = image_export_job_patch_model.to_dict()
+ assert image_export_job_patch_model_json2 == image_export_job_patch_model_json
+
+
+class TestModel_ImageExportJobStatusReason:
+ """
+ Test Class for ImageExportJobStatusReason
+ """
+
+ def test_image_export_job_status_reason_serialization(self):
+ """
+ Test serialization/deserialization for ImageExportJobStatusReason
+ """
+
+ # Construct a json representation of a ImageExportJobStatusReason model
+ image_export_job_status_reason_model_json = {}
+ image_export_job_status_reason_model_json['code'] = 'cannot_access_storage_bucket'
+ image_export_job_status_reason_model_json['message'] = 'testString'
+ 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)
+ assert image_export_job_status_reason_model != False
+
+ # Construct a model instance of ImageExportJobStatusReason by calling from_dict on the json representation
+ image_export_job_status_reason_model_dict = ImageExportJobStatusReason.from_dict(image_export_job_status_reason_model_json).__dict__
+ image_export_job_status_reason_model2 = ImageExportJobStatusReason(**image_export_job_status_reason_model_dict)
+
+ # Verify the model instances are equivalent
+ assert image_export_job_status_reason_model == image_export_job_status_reason_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ image_export_job_status_reason_model_json2 = image_export_job_status_reason_model.to_dict()
+ assert image_export_job_status_reason_model_json2 == image_export_job_status_reason_model_json
+
+
+class TestModel_ImageExportJobUnpaginatedCollection:
+ """
+ Test Class for ImageExportJobUnpaginatedCollection
+ """
+
+ def test_image_export_job_unpaginated_collection_serialization(self):
+ """
+ Test serialization/deserialization for ImageExportJobUnpaginatedCollection
+ """
+
+ # Construct dict forms of any model objects needed in order to build this model.
+
+ image_export_job_status_reason_model = {} # ImageExportJobStatusReason
+ image_export_job_status_reason_model['code'] = 'cannot_access_storage_bucket'
+ image_export_job_status_reason_model['message'] = 'testString'
+ image_export_job_status_reason_model['more_info'] = 'https://cloud.ibm.com/docs/vpc?topic=vpc-object-storage-prereq'
+
+ cloud_object_storage_bucket_reference_model = {} # CloudObjectStorageBucketReference
+ cloud_object_storage_bucket_reference_model['crn'] = 'crn:v1:bluemix:public:cloud-object-storage:global:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket'
+ cloud_object_storage_bucket_reference_model['name'] = 'bucket-27200-lwx4cfvcue'
+
+ cloud_object_storage_object_reference_model = {} # CloudObjectStorageObjectReference
+ cloud_object_storage_object_reference_model['name'] = 'my-object'
+
+ image_export_job_model = {} # ImageExportJob
+ image_export_job_model['completed_at'] = '2019-01-01T12:00:00Z'
+ image_export_job_model['created_at'] = '2019-01-01T12:00:00Z'
+ image_export_job_model['encrypted_data_key'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4='
+ image_export_job_model['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['name'] = 'my-image-export'
+ image_export_job_model['resource_type'] = 'image_export_job'
+ image_export_job_model['started_at'] = '2019-01-01T12:00:00Z'
+ image_export_job_model['status'] = 'deleting'
+ image_export_job_model['status_reasons'] = [image_export_job_status_reason_model]
+ image_export_job_model['storage_bucket'] = cloud_object_storage_bucket_reference_model
+ image_export_job_model['storage_href'] = 'cos://us-south/bucket-27200-lwx4cfvcue/my-image-export.qcow2'
+ image_export_job_model['storage_object'] = cloud_object_storage_object_reference_model
+
+ # Construct a json representation of a ImageExportJobUnpaginatedCollection model
+ image_export_job_unpaginated_collection_model_json = {}
+ image_export_job_unpaginated_collection_model_json['export_jobs'] = [image_export_job_model]
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert image_export_job_unpaginated_collection_model == image_export_job_unpaginated_collection_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ image_export_job_unpaginated_collection_model_json2 = image_export_job_unpaginated_collection_model.to_dict()
+ assert image_export_job_unpaginated_collection_model_json2 == image_export_job_unpaginated_collection_model_json
+
+
+class TestModel_ImageFile:
"""
Test Class for ImageFile
"""
@@ -42590,7 +45675,7 @@ def test_image_file_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- image_file_checksums_model = {} # ImageFileChecksums
+ image_file_checksums_model = {} # ImageFileChecksums
image_file_checksums_model['sha256'] = 'e992a84f113d3a35d2145ca3e7aca4fc95fe6daf470a08d8af3422ee59c92e15'
# Construct a json representation of a ImageFile model
@@ -42613,7 +45698,8 @@ def test_image_file_serialization(self):
image_file_model_json2 = image_file_model.to_dict()
assert image_file_model_json2 == image_file_model_json
-class TestModel_ImageFileChecksums():
+
+class TestModel_ImageFileChecksums:
"""
Test Class for ImageFileChecksums
"""
@@ -42642,7 +45728,8 @@ def test_image_file_checksums_serialization(self):
image_file_checksums_model_json2 = image_file_checksums_model.to_dict()
assert image_file_checksums_model_json2 == image_file_checksums_model_json
-class TestModel_ImageFilePrototype():
+
+class TestModel_ImageFilePrototype:
"""
Test Class for ImageFilePrototype
"""
@@ -42671,7 +45758,8 @@ def test_image_file_prototype_serialization(self):
image_file_prototype_model_json2 = image_file_prototype_model.to_dict()
assert image_file_prototype_model_json2 == image_file_prototype_model_json
-class TestModel_ImagePatch():
+
+class TestModel_ImagePatch:
"""
Test Class for ImagePatch
"""
@@ -42700,7 +45788,8 @@ def test_image_patch_serialization(self):
image_patch_model_json2 = image_patch_model.to_dict()
assert image_patch_model_json2 == image_patch_model_json
-class TestModel_ImageReference():
+
+class TestModel_ImageReference:
"""
Test Class for ImageReference
"""
@@ -42712,7 +45801,7 @@ def test_image_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ImageReference model
@@ -42738,7 +45827,8 @@ def test_image_reference_serialization(self):
image_reference_model_json2 = image_reference_model.to_dict()
assert image_reference_model_json2 == image_reference_model_json
-class TestModel_ImageReferenceDeleted():
+
+class TestModel_ImageReferenceDeleted:
"""
Test Class for ImageReferenceDeleted
"""
@@ -42767,7 +45857,8 @@ def test_image_reference_deleted_serialization(self):
image_reference_deleted_model_json2 = image_reference_deleted_model.to_dict()
assert image_reference_deleted_model_json2 == image_reference_deleted_model_json
-class TestModel_ImageStatusReason():
+
+class TestModel_ImageStatusReason:
"""
Test Class for ImageStatusReason
"""
@@ -42798,7 +45889,8 @@ def test_image_status_reason_serialization(self):
image_status_reason_model_json2 = image_status_reason_model.to_dict()
assert image_status_reason_model_json2 == image_status_reason_model_json
-class TestModel_Instance():
+
+class TestModel_Instance:
"""
Test Class for Instance
"""
@@ -42810,26 +45902,26 @@ def test_instance_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_model = {} # InstanceAvailabilityPolicy
+ instance_availability_policy_model = {} # InstanceAvailabilityPolicy
instance_availability_policy_model['host_failure'] = 'restart'
- volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted
+ volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted
volume_attachment_reference_instance_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = 'a8a15363-a6f7-4f01-af60-715e85b28141'
- volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
+ volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
+ volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
volume_reference_volume_attachment_context_model['crn'] = 'crn:[...]'
volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model
volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/49c5d61b-41e7-4c01-9b7a-1a97366c6916'
volume_reference_volume_attachment_context_model['id'] = '49c5d61b-41e7-4c01-9b7a-1a97366c6916'
volume_reference_volume_attachment_context_model['name'] = 'my-boot-volume'
- volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext
+ volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext
volume_attachment_reference_instance_context_model['deleted'] = volume_attachment_reference_instance_context_deleted_model
volume_attachment_reference_instance_context_model['device'] = volume_attachment_device_model
volume_attachment_reference_instance_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/7389-a8a15363-a6f7-4f01-af60-715e85b28141'
@@ -42837,16 +45929,16 @@ def test_instance_serialization(self):
volume_attachment_reference_instance_context_model['name'] = 'my-boot-volume-attachment'
volume_attachment_reference_instance_context_model['volume'] = volume_reference_volume_attachment_context_model
- catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
+ catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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 = {} # InstanceCatalogOffering
instance_catalog_offering_model['version'] = catalog_offering_version_reference_model
- dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
+ dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- dedicated_host_reference_model = {} # DedicatedHostReference
+ dedicated_host_reference_model = {} # DedicatedHostReference
dedicated_host_reference_model['crn'] = 'crn:[...]'
dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model
dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221'
@@ -42854,7 +45946,7 @@ def test_instance_serialization(self):
dedicated_host_reference_model['name'] = 'test-new'
dedicated_host_reference_model['resource_type'] = 'dedicated_host'
- instance_disk_model = {} # InstanceDisk
+ instance_disk_model = {} # InstanceDisk
instance_disk_model['created_at'] = '2019-01-01T12:00:00Z'
instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -42863,39 +45955,39 @@ def test_instance_serialization(self):
instance_disk_model['resource_type'] = 'instance_disk'
instance_disk_model['size'] = 100
- instance_gpu_model = {} # InstanceGPU
+ instance_gpu_model = {} # InstanceGPU
instance_gpu_model['count'] = 1
instance_gpu_model['manufacturer'] = 'nvidia'
instance_gpu_model['memory'] = 1
instance_gpu_model['model'] = 'Tesla V100'
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:[...]'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/9aaf3bcb-dcd7-4de7-bb60-24e39ff9d366'
image_reference_model['id'] = '9aaf3bcb-dcd7-4de7-bb60-24e39ff9d366'
image_reference_model['name'] = 'my-image'
- instance_lifecycle_reason_model = {} # InstanceLifecycleReason
+ instance_lifecycle_reason_model = {} # InstanceLifecycleReason
instance_lifecycle_reason_model['code'] = 'resource_suspended_by_provider'
instance_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.'
instance_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension'
- instance_metadata_service_model = {} # InstanceMetadataService
+ instance_metadata_service_model = {} # InstanceMetadataService
instance_metadata_service_model['enabled'] = True
instance_metadata_service_model['protocol'] = 'http'
instance_metadata_service_model['response_hop_limit'] = 1
- network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted
+ network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted
network_interface_instance_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '10.0.0.32'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5'
@@ -42903,10 +45995,10 @@ def test_instance_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip-1'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:[...]'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7389-bea6a632-5e13-42a4-b4b8-31dc877abfe4'
@@ -42914,7 +46006,7 @@ def test_instance_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference
+ network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference
network_interface_instance_context_reference_model['deleted'] = network_interface_instance_context_reference_deleted_model
network_interface_instance_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/e402fa1b-96f6-4aa2-a8d7-703aac843651/network_interfaces/7ca88dfb-8962-469d-b1de-1dd56f4c3275'
network_interface_instance_context_reference_model['id'] = '7ca88dfb-8962-469d-b1de-1dd56f4c3275'
@@ -42923,10 +46015,10 @@ def test_instance_serialization(self):
network_interface_instance_context_reference_model['resource_type'] = 'network_interface'
network_interface_instance_context_reference_model['subnet'] = subnet_reference_model
- dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
+ dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_placement_target_model = {} # InstancePlacementTargetDedicatedHostGroupReference
+ instance_placement_target_model = {} # InstancePlacementTargetDedicatedHostGroupReference
instance_placement_target_model['crn'] = 'crn:[...]'
instance_placement_target_model['deleted'] = dedicated_host_group_reference_deleted_model
instance_placement_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-84e4793a-7cd8-4a7b-b253-818aa19d0512'
@@ -42934,29 +46026,29 @@ def test_instance_serialization(self):
instance_placement_target_model['name'] = 'test-new'
instance_placement_target_model['resource_type'] = 'dedicated_host'
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-2x8'
instance_profile_reference_model['name'] = 'bx2-2x8'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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['name'] = 'Default'
- instance_status_reason_model = {} # InstanceStatusReason
+ 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_vcpu_model = {} # InstanceVCPU
+ instance_vcpu_model = {} # InstanceVCPU
instance_vcpu_model['architecture'] = 'amd64'
instance_vcpu_model['count'] = 2
instance_vcpu_model['manufacturer'] = 'intel'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:[...]'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/f0aae929-7047-46d1-92e1-9102b07a7f6f'
@@ -42964,7 +46056,7 @@ def test_instance_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -43018,7 +46110,8 @@ def test_instance_serialization(self):
instance_model_json2 = instance_model.to_dict()
assert instance_model_json2 == instance_model_json
-class TestModel_InstanceAction():
+
+class TestModel_InstanceAction:
"""
Test Class for InstanceAction
"""
@@ -43054,7 +46147,8 @@ def test_instance_action_serialization(self):
instance_action_model_json2 = instance_action_model.to_dict()
assert instance_action_model_json2 == instance_action_model_json
-class TestModel_InstanceAvailabilityPolicy():
+
+class TestModel_InstanceAvailabilityPolicy:
"""
Test Class for InstanceAvailabilityPolicy
"""
@@ -43083,7 +46177,8 @@ def test_instance_availability_policy_serialization(self):
instance_availability_policy_model_json2 = instance_availability_policy_model.to_dict()
assert instance_availability_policy_model_json2 == instance_availability_policy_model_json
-class TestModel_InstanceAvailabilityPolicyPatch():
+
+class TestModel_InstanceAvailabilityPolicyPatch:
"""
Test Class for InstanceAvailabilityPolicyPatch
"""
@@ -43112,7 +46207,8 @@ def test_instance_availability_policy_patch_serialization(self):
instance_availability_policy_patch_model_json2 = instance_availability_policy_patch_model.to_dict()
assert instance_availability_policy_patch_model_json2 == instance_availability_policy_patch_model_json
-class TestModel_InstanceAvailabilityPolicyPrototype():
+
+class TestModel_InstanceAvailabilityPolicyPrototype:
"""
Test Class for InstanceAvailabilityPolicyPrototype
"""
@@ -43141,7 +46237,8 @@ def test_instance_availability_policy_prototype_serialization(self):
instance_availability_policy_prototype_model_json2 = instance_availability_policy_prototype_model.to_dict()
assert instance_availability_policy_prototype_model_json2 == instance_availability_policy_prototype_model_json
-class TestModel_InstanceCatalogOffering():
+
+class TestModel_InstanceCatalogOffering:
"""
Test Class for InstanceCatalogOffering
"""
@@ -43153,7 +46250,7 @@ def test_instance_catalog_offering_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
+ catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d'
# Construct a json representation of a InstanceCatalogOffering model
@@ -43175,7 +46272,8 @@ def test_instance_catalog_offering_serialization(self):
instance_catalog_offering_model_json2 = instance_catalog_offering_model.to_dict()
assert instance_catalog_offering_model_json2 == instance_catalog_offering_model_json
-class TestModel_InstanceCollection():
+
+class TestModel_InstanceCollection:
"""
Test Class for InstanceCollection
"""
@@ -43187,29 +46285,29 @@ def test_instance_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_collection_first_model = {} # InstanceCollectionFirst
+ instance_collection_first_model = {} # InstanceCollectionFirst
instance_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?limit=20'
- instance_availability_policy_model = {} # InstanceAvailabilityPolicy
+ instance_availability_policy_model = {} # InstanceAvailabilityPolicy
instance_availability_policy_model['host_failure'] = 'restart'
- volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted
+ volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted
volume_attachment_reference_instance_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
+ volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
+ volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
volume_reference_volume_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model
volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_volume_attachment_context_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_volume_attachment_context_model['name'] = 'my-volume'
- volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext
+ volume_attachment_reference_instance_context_model = {} # VolumeAttachmentReferenceInstanceContext
volume_attachment_reference_instance_context_model['deleted'] = volume_attachment_reference_instance_context_deleted_model
volume_attachment_reference_instance_context_model['device'] = volume_attachment_device_model
volume_attachment_reference_instance_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a'
@@ -43217,16 +46315,16 @@ def test_instance_collection_serialization(self):
volume_attachment_reference_instance_context_model['name'] = 'my-volume-attachment'
volume_attachment_reference_instance_context_model['volume'] = volume_reference_volume_attachment_context_model
- catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
+ catalog_offering_version_reference_model = {} # CatalogOfferingVersionReference
catalog_offering_version_reference_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456: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 = {} # InstanceCatalogOffering
instance_catalog_offering_model['version'] = catalog_offering_version_reference_model
- dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
+ dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- dedicated_host_reference_model = {} # DedicatedHostReference
+ dedicated_host_reference_model = {} # DedicatedHostReference
dedicated_host_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host:1e09281b-f177-46fb-baf1-bc152b2e391a'
dedicated_host_reference_model['deleted'] = dedicated_host_reference_deleted_model
dedicated_host_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -43234,7 +46332,7 @@ def test_instance_collection_serialization(self):
dedicated_host_reference_model['name'] = 'my-host'
dedicated_host_reference_model['resource_type'] = 'dedicated_host'
- instance_disk_model = {} # InstanceDisk
+ instance_disk_model = {} # InstanceDisk
instance_disk_model['created_at'] = '2019-01-01T12:00:00Z'
instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -43243,39 +46341,39 @@ def test_instance_collection_serialization(self):
instance_disk_model['resource_type'] = 'instance_disk'
instance_disk_model['size'] = 100
- instance_gpu_model = {} # InstanceGPU
+ instance_gpu_model = {} # InstanceGPU
instance_gpu_model['count'] = 1
instance_gpu_model['manufacturer'] = 'nvidia'
instance_gpu_model['memory'] = 1
instance_gpu_model['model'] = 'Tesla V100'
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['name'] = 'my-image'
- instance_lifecycle_reason_model = {} # InstanceLifecycleReason
+ instance_lifecycle_reason_model = {} # InstanceLifecycleReason
instance_lifecycle_reason_model['code'] = 'resource_suspended_by_provider'
instance_lifecycle_reason_model['message'] = 'The resource has been suspended. Contact IBM support with the CRN for next steps.'
instance_lifecycle_reason_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#resource-suspension'
- instance_metadata_service_model = {} # InstanceMetadataService
+ instance_metadata_service_model = {} # InstanceMetadataService
instance_metadata_service_model['enabled'] = True
instance_metadata_service_model['protocol'] = 'http'
instance_metadata_service_model['response_hop_limit'] = 1
- network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted
+ network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted
network_interface_instance_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -43283,10 +46381,10 @@ def test_instance_collection_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -43294,7 +46392,7 @@ def test_instance_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference
+ network_interface_instance_context_reference_model = {} # NetworkInterfaceInstanceContextReference
network_interface_instance_context_reference_model['deleted'] = network_interface_instance_context_reference_deleted_model
network_interface_instance_context_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
network_interface_instance_context_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -43303,10 +46401,10 @@ def test_instance_collection_serialization(self):
network_interface_instance_context_reference_model['resource_type'] = 'network_interface'
network_interface_instance_context_reference_model['subnet'] = subnet_reference_model
- dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
+ dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_placement_target_model = {} # InstancePlacementTargetDedicatedHostGroupReference
+ instance_placement_target_model = {} # InstancePlacementTargetDedicatedHostGroupReference
instance_placement_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::dedicated-host-group:bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
instance_placement_target_model['deleted'] = dedicated_host_group_reference_deleted_model
instance_placement_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
@@ -43314,29 +46412,29 @@ def test_instance_collection_serialization(self):
instance_placement_target_model['name'] = 'my-host-group'
instance_placement_target_model['resource_type'] = 'dedicated_host_group'
- instance_profile_reference_model = {} # InstanceProfileReference
+ instance_profile_reference_model = {} # InstanceProfileReference
instance_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-4x16'
instance_profile_reference_model['name'] = 'bx2-4x16'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- instance_status_reason_model = {} # InstanceStatusReason
+ 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_vcpu_model = {} # InstanceVCPU
+ instance_vcpu_model = {} # InstanceVCPU
instance_vcpu_model['architecture'] = 'amd64'
instance_vcpu_model['count'] = 4
instance_vcpu_model['manufacturer'] = 'intel'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -43344,11 +46442,11 @@ def test_instance_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
- instance_model = {} # Instance
+ instance_model = {} # Instance
instance_model['availability_policy'] = instance_availability_policy_model
instance_model['bandwidth'] = 1000
instance_model['boot_volume_attachment'] = volume_attachment_reference_instance_context_model
@@ -43382,7 +46480,7 @@ def test_instance_collection_serialization(self):
instance_model['vpc'] = vpc_reference_model
instance_model['zone'] = zone_reference_model
- instance_collection_next_model = {} # InstanceCollectionNext
+ instance_collection_next_model = {} # InstanceCollectionNext
instance_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a InstanceCollection model
@@ -43408,7 +46506,8 @@ def test_instance_collection_serialization(self):
instance_collection_model_json2 = instance_collection_model.to_dict()
assert instance_collection_model_json2 == instance_collection_model_json
-class TestModel_InstanceCollectionFirst():
+
+class TestModel_InstanceCollectionFirst:
"""
Test Class for InstanceCollectionFirst
"""
@@ -43437,7 +46536,8 @@ def test_instance_collection_first_serialization(self):
instance_collection_first_model_json2 = instance_collection_first_model.to_dict()
assert instance_collection_first_model_json2 == instance_collection_first_model_json
-class TestModel_InstanceCollectionNext():
+
+class TestModel_InstanceCollectionNext:
"""
Test Class for InstanceCollectionNext
"""
@@ -43466,7 +46566,8 @@ def test_instance_collection_next_serialization(self):
instance_collection_next_model_json2 = instance_collection_next_model.to_dict()
assert instance_collection_next_model_json2 == instance_collection_next_model_json
-class TestModel_InstanceConsoleAccessToken():
+
+class TestModel_InstanceConsoleAccessToken:
"""
Test Class for InstanceConsoleAccessToken
"""
@@ -43500,7 +46601,8 @@ def test_instance_console_access_token_serialization(self):
instance_console_access_token_model_json2 = instance_console_access_token_model.to_dict()
assert instance_console_access_token_model_json2 == instance_console_access_token_model_json
-class TestModel_InstanceDefaultTrustedProfilePrototype():
+
+class TestModel_InstanceDefaultTrustedProfilePrototype:
"""
Test Class for InstanceDefaultTrustedProfilePrototype
"""
@@ -43512,7 +46614,7 @@ def test_instance_default_trusted_profile_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
# Construct a json representation of a InstanceDefaultTrustedProfilePrototype model
@@ -43535,7 +46637,8 @@ def test_instance_default_trusted_profile_prototype_serialization(self):
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():
+
+class TestModel_InstanceDisk:
"""
Test Class for InstanceDisk
"""
@@ -43570,7 +46673,8 @@ def test_instance_disk_serialization(self):
instance_disk_model_json2 = instance_disk_model.to_dict()
assert instance_disk_model_json2 == instance_disk_model_json
-class TestModel_InstanceDiskCollection():
+
+class TestModel_InstanceDiskCollection:
"""
Test Class for InstanceDiskCollection
"""
@@ -43582,7 +46686,7 @@ def test_instance_disk_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_disk_model = {} # InstanceDisk
+ instance_disk_model = {} # InstanceDisk
instance_disk_model['created_at'] = '2019-01-01T12:00:00Z'
instance_disk_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/disks/10c02d81-0ecb-4dc5-897d-28392913b81e'
instance_disk_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -43610,7 +46714,8 @@ def test_instance_disk_collection_serialization(self):
instance_disk_collection_model_json2 = instance_disk_collection_model.to_dict()
assert instance_disk_collection_model_json2 == instance_disk_collection_model_json
-class TestModel_InstanceDiskPatch():
+
+class TestModel_InstanceDiskPatch:
"""
Test Class for InstanceDiskPatch
"""
@@ -43639,7 +46744,8 @@ def test_instance_disk_patch_serialization(self):
instance_disk_patch_model_json2 = instance_disk_patch_model.to_dict()
assert instance_disk_patch_model_json2 == instance_disk_patch_model_json
-class TestModel_InstanceDiskReference():
+
+class TestModel_InstanceDiskReference:
"""
Test Class for InstanceDiskReference
"""
@@ -43651,7 +46757,7 @@ def test_instance_disk_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
+ instance_disk_reference_deleted_model = {} # InstanceDiskReferenceDeleted
instance_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceDiskReference model
@@ -43677,7 +46783,8 @@ def test_instance_disk_reference_serialization(self):
instance_disk_reference_model_json2 = instance_disk_reference_model.to_dict()
assert instance_disk_reference_model_json2 == instance_disk_reference_model_json
-class TestModel_InstanceDiskReferenceDeleted():
+
+class TestModel_InstanceDiskReferenceDeleted:
"""
Test Class for InstanceDiskReferenceDeleted
"""
@@ -43706,7 +46813,8 @@ def test_instance_disk_reference_deleted_serialization(self):
instance_disk_reference_deleted_model_json2 = instance_disk_reference_deleted_model.to_dict()
assert instance_disk_reference_deleted_model_json2 == instance_disk_reference_deleted_model_json
-class TestModel_InstanceGPU():
+
+class TestModel_InstanceGPU:
"""
Test Class for InstanceGPU
"""
@@ -43738,7 +46846,8 @@ def test_instance_gpu_serialization(self):
instance_gpu_model_json2 = instance_gpu_model.to_dict()
assert instance_gpu_model_json2 == instance_gpu_model_json
-class TestModel_InstanceGroup():
+
+class TestModel_InstanceGroup:
"""
Test Class for InstanceGroup
"""
@@ -43750,43 +46859,43 @@ def test_instance_group_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
+ instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_template_reference_model = {} # InstanceTemplateReference
+ instance_template_reference_model = {} # InstanceTemplateReference
instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['deleted'] = instance_template_reference_deleted_model
instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
instance_template_reference_model['name'] = 'my-instance-template'
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
+ load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool'
- instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
+ instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_manager_reference_model = {} # InstanceGroupManagerReference
+ instance_group_manager_reference_model = {} # InstanceGroupManagerReference
instance_group_manager_reference_model['deleted'] = instance_group_manager_reference_deleted_model
instance_group_manager_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727'
instance_group_manager_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_manager_reference_model['name'] = 'my-instance-group-manager'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -43794,10 +46903,10 @@ def test_instance_group_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -43838,7 +46947,8 @@ def test_instance_group_serialization(self):
instance_group_model_json2 = instance_group_model.to_dict()
assert instance_group_model_json2 == instance_group_model_json
-class TestModel_InstanceGroupCollection():
+
+class TestModel_InstanceGroupCollection:
"""
Test Class for InstanceGroupCollection
"""
@@ -43850,46 +46960,46 @@ def test_instance_group_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_collection_first_model = {} # InstanceGroupCollectionFirst
+ instance_group_collection_first_model = {} # InstanceGroupCollectionFirst
instance_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?limit=20'
- instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
+ instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_template_reference_model = {} # InstanceTemplateReference
+ instance_template_reference_model = {} # InstanceTemplateReference
instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['deleted'] = instance_template_reference_deleted_model
instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
instance_template_reference_model['name'] = 'my-instance-template'
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
+ load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool'
- instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
+ instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_manager_reference_model = {} # InstanceGroupManagerReference
+ instance_group_manager_reference_model = {} # InstanceGroupManagerReference
instance_group_manager_reference_model['deleted'] = instance_group_manager_reference_deleted_model
instance_group_manager_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727'
instance_group_manager_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_manager_reference_model['name'] = 'my-instance-group-manager'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -43897,10 +47007,10 @@ def test_instance_group_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -43908,7 +47018,7 @@ def test_instance_group_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- instance_group_model = {} # InstanceGroup
+ 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/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -43925,7 +47035,7 @@ def test_instance_group_collection_serialization(self):
instance_group_model['updated_at'] = '2019-01-01T12:00:00Z'
instance_group_model['vpc'] = vpc_reference_model
- instance_group_collection_next_model = {} # InstanceGroupCollectionNext
+ instance_group_collection_next_model = {} # InstanceGroupCollectionNext
instance_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a InstanceGroupCollection model
@@ -43951,7 +47061,8 @@ def test_instance_group_collection_serialization(self):
instance_group_collection_model_json2 = instance_group_collection_model.to_dict()
assert instance_group_collection_model_json2 == instance_group_collection_model_json
-class TestModel_InstanceGroupCollectionFirst():
+
+class TestModel_InstanceGroupCollectionFirst:
"""
Test Class for InstanceGroupCollectionFirst
"""
@@ -43980,7 +47091,8 @@ def test_instance_group_collection_first_serialization(self):
instance_group_collection_first_model_json2 = instance_group_collection_first_model.to_dict()
assert instance_group_collection_first_model_json2 == instance_group_collection_first_model_json
-class TestModel_InstanceGroupCollectionNext():
+
+class TestModel_InstanceGroupCollectionNext:
"""
Test Class for InstanceGroupCollectionNext
"""
@@ -44009,7 +47121,8 @@ def test_instance_group_collection_next_serialization(self):
instance_group_collection_next_model_json2 = instance_group_collection_next_model.to_dict()
assert instance_group_collection_next_model_json2 == instance_group_collection_next_model_json
-class TestModel_InstanceGroupManagerActionGroupPatch():
+
+class TestModel_InstanceGroupManagerActionGroupPatch:
"""
Test Class for InstanceGroupManagerActionGroupPatch
"""
@@ -44038,7 +47151,8 @@ def test_instance_group_manager_action_group_patch_serialization(self):
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():
+
+class TestModel_InstanceGroupManagerActionManagerPatch:
"""
Test Class for InstanceGroupManagerActionManagerPatch
"""
@@ -44068,7 +47182,8 @@ def test_instance_group_manager_action_manager_patch_serialization(self):
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():
+
+class TestModel_InstanceGroupManagerActionPatch:
"""
Test Class for InstanceGroupManagerActionPatch
"""
@@ -44080,10 +47195,10 @@ def test_instance_group_manager_action_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_action_group_patch_model = {} # InstanceGroupManagerActionGroupPatch
+ instance_group_manager_action_group_patch_model = {} # InstanceGroupManagerActionGroupPatch
instance_group_manager_action_group_patch_model['membership_count'] = 10
- instance_group_manager_action_manager_patch_model = {} # InstanceGroupManagerActionManagerPatch
+ instance_group_manager_action_manager_patch_model = {} # InstanceGroupManagerActionManagerPatch
instance_group_manager_action_manager_patch_model['max_membership_count'] = 10
instance_group_manager_action_manager_patch_model['min_membership_count'] = 10
@@ -44110,7 +47225,8 @@ def test_instance_group_manager_action_patch_serialization(self):
instance_group_manager_action_patch_model_json2 = instance_group_manager_action_patch_model.to_dict()
assert instance_group_manager_action_patch_model_json2 == instance_group_manager_action_patch_model_json
-class TestModel_InstanceGroupManagerActionReference():
+
+class TestModel_InstanceGroupManagerActionReference:
"""
Test Class for InstanceGroupManagerActionReference
"""
@@ -44122,7 +47238,7 @@ def test_instance_group_manager_action_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_action_reference_deleted_model = {} # InstanceGroupManagerActionReferenceDeleted
+ instance_group_manager_action_reference_deleted_model = {} # InstanceGroupManagerActionReferenceDeleted
instance_group_manager_action_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceGroupManagerActionReference model
@@ -44148,7 +47264,8 @@ def test_instance_group_manager_action_reference_serialization(self):
instance_group_manager_action_reference_model_json2 = instance_group_manager_action_reference_model.to_dict()
assert instance_group_manager_action_reference_model_json2 == instance_group_manager_action_reference_model_json
-class TestModel_InstanceGroupManagerActionReferenceDeleted():
+
+class TestModel_InstanceGroupManagerActionReferenceDeleted:
"""
Test Class for InstanceGroupManagerActionReferenceDeleted
"""
@@ -44177,7 +47294,8 @@ def test_instance_group_manager_action_reference_deleted_serialization(self):
instance_group_manager_action_reference_deleted_model_json2 = instance_group_manager_action_reference_deleted_model.to_dict()
assert instance_group_manager_action_reference_deleted_model_json2 == instance_group_manager_action_reference_deleted_model_json
-class TestModel_InstanceGroupManagerActionsCollection():
+
+class TestModel_InstanceGroupManagerActionsCollection:
"""
Test Class for InstanceGroupManagerActionsCollection
"""
@@ -44189,10 +47307,10 @@ def test_instance_group_manager_actions_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_scheduled_action_group_model = {} # InstanceGroupManagerScheduledActionGroup
+ instance_group_manager_scheduled_action_group_model = {} # InstanceGroupManagerScheduledActionGroup
instance_group_manager_scheduled_action_group_model['membership_count'] = 10
- instance_group_manager_action_model = {} # InstanceGroupManagerActionScheduledActionGroupTarget
+ instance_group_manager_action_model = {} # InstanceGroupManagerActionScheduledActionGroupTarget
instance_group_manager_action_model['auto_delete'] = True
instance_group_manager_action_model['auto_delete_timeout'] = 24
instance_group_manager_action_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -44208,10 +47326,10 @@ def test_instance_group_manager_actions_collection_serialization(self):
instance_group_manager_action_model['next_run_at'] = '2019-01-01T12:00:00Z'
instance_group_manager_action_model['group'] = instance_group_manager_scheduled_action_group_model
- instance_group_manager_actions_collection_first_model = {} # InstanceGroupManagerActionsCollectionFirst
+ instance_group_manager_actions_collection_first_model = {} # InstanceGroupManagerActionsCollectionFirst
instance_group_manager_actions_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?limit=20'
- instance_group_manager_actions_collection_next_model = {} # InstanceGroupManagerActionsCollectionNext
+ instance_group_manager_actions_collection_next_model = {} # InstanceGroupManagerActionsCollectionNext
instance_group_manager_actions_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a InstanceGroupManagerActionsCollection model
@@ -44237,7 +47355,8 @@ def test_instance_group_manager_actions_collection_serialization(self):
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_InstanceGroupManagerActionsCollectionFirst():
+
+class TestModel_InstanceGroupManagerActionsCollectionFirst:
"""
Test Class for InstanceGroupManagerActionsCollectionFirst
"""
@@ -44266,7 +47385,8 @@ def test_instance_group_manager_actions_collection_first_serialization(self):
instance_group_manager_actions_collection_first_model_json2 = instance_group_manager_actions_collection_first_model.to_dict()
assert instance_group_manager_actions_collection_first_model_json2 == instance_group_manager_actions_collection_first_model_json
-class TestModel_InstanceGroupManagerActionsCollectionNext():
+
+class TestModel_InstanceGroupManagerActionsCollectionNext:
"""
Test Class for InstanceGroupManagerActionsCollectionNext
"""
@@ -44295,7 +47415,8 @@ def test_instance_group_manager_actions_collection_next_serialization(self):
instance_group_manager_actions_collection_next_model_json2 = instance_group_manager_actions_collection_next_model.to_dict()
assert instance_group_manager_actions_collection_next_model_json2 == instance_group_manager_actions_collection_next_model_json
-class TestModel_InstanceGroupManagerCollection():
+
+class TestModel_InstanceGroupManagerCollection:
"""
Test Class for InstanceGroupManagerCollection
"""
@@ -44307,19 +47428,19 @@ def test_instance_group_manager_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_collection_first_model = {} # InstanceGroupManagerCollectionFirst
+ instance_group_manager_collection_first_model = {} # InstanceGroupManagerCollectionFirst
instance_group_manager_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20'
- instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted
+ instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted
instance_group_manager_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference
+ instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference
instance_group_manager_policy_reference_model['deleted'] = instance_group_manager_policy_reference_deleted_model
instance_group_manager_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_manager_policy_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_manager_policy_reference_model['name'] = 'my-instance-group-manager-policy'
- instance_group_manager_model = {} # InstanceGroupManagerAutoScale
+ instance_group_manager_model = {} # 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'
@@ -44333,7 +47454,7 @@ def test_instance_group_manager_collection_serialization(self):
instance_group_manager_model['min_membership_count'] = 10
instance_group_manager_model['policies'] = [instance_group_manager_policy_reference_model]
- instance_group_manager_collection_next_model = {} # InstanceGroupManagerCollectionNext
+ instance_group_manager_collection_next_model = {} # InstanceGroupManagerCollectionNext
instance_group_manager_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a InstanceGroupManagerCollection model
@@ -44359,7 +47480,8 @@ def test_instance_group_manager_collection_serialization(self):
instance_group_manager_collection_model_json2 = instance_group_manager_collection_model.to_dict()
assert instance_group_manager_collection_model_json2 == instance_group_manager_collection_model_json
-class TestModel_InstanceGroupManagerCollectionFirst():
+
+class TestModel_InstanceGroupManagerCollectionFirst:
"""
Test Class for InstanceGroupManagerCollectionFirst
"""
@@ -44388,7 +47510,8 @@ def test_instance_group_manager_collection_first_serialization(self):
instance_group_manager_collection_first_model_json2 = instance_group_manager_collection_first_model.to_dict()
assert instance_group_manager_collection_first_model_json2 == instance_group_manager_collection_first_model_json
-class TestModel_InstanceGroupManagerCollectionNext():
+
+class TestModel_InstanceGroupManagerCollectionNext:
"""
Test Class for InstanceGroupManagerCollectionNext
"""
@@ -44417,7 +47540,8 @@ def test_instance_group_manager_collection_next_serialization(self):
instance_group_manager_collection_next_model_json2 = instance_group_manager_collection_next_model.to_dict()
assert instance_group_manager_collection_next_model_json2 == instance_group_manager_collection_next_model_json
-class TestModel_InstanceGroupManagerPatch():
+
+class TestModel_InstanceGroupManagerPatch:
"""
Test Class for InstanceGroupManagerPatch
"""
@@ -44451,7 +47575,8 @@ def test_instance_group_manager_patch_serialization(self):
instance_group_manager_patch_model_json2 = instance_group_manager_patch_model.to_dict()
assert instance_group_manager_patch_model_json2 == instance_group_manager_patch_model_json
-class TestModel_InstanceGroupManagerPolicyCollection():
+
+class TestModel_InstanceGroupManagerPolicyCollection:
"""
Test Class for InstanceGroupManagerPolicyCollection
"""
@@ -44463,13 +47588,13 @@ def test_instance_group_manager_policy_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_policy_collection_first_model = {} # InstanceGroupManagerPolicyCollectionFirst
+ instance_group_manager_policy_collection_first_model = {} # InstanceGroupManagerPolicyCollectionFirst
instance_group_manager_policy_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?limit=20'
- instance_group_manager_policy_collection_next_model = {} # InstanceGroupManagerPolicyCollectionNext
+ instance_group_manager_policy_collection_next_model = {} # InstanceGroupManagerPolicyCollectionNext
instance_group_manager_policy_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- instance_group_manager_policy_model = {} # InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy
+ instance_group_manager_policy_model = {} # 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'
@@ -44502,7 +47627,8 @@ def test_instance_group_manager_policy_collection_serialization(self):
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
-class TestModel_InstanceGroupManagerPolicyCollectionFirst():
+
+class TestModel_InstanceGroupManagerPolicyCollectionFirst:
"""
Test Class for InstanceGroupManagerPolicyCollectionFirst
"""
@@ -44531,7 +47657,8 @@ def test_instance_group_manager_policy_collection_first_serialization(self):
instance_group_manager_policy_collection_first_model_json2 = instance_group_manager_policy_collection_first_model.to_dict()
assert instance_group_manager_policy_collection_first_model_json2 == instance_group_manager_policy_collection_first_model_json
-class TestModel_InstanceGroupManagerPolicyCollectionNext():
+
+class TestModel_InstanceGroupManagerPolicyCollectionNext:
"""
Test Class for InstanceGroupManagerPolicyCollectionNext
"""
@@ -44560,7 +47687,8 @@ def test_instance_group_manager_policy_collection_next_serialization(self):
instance_group_manager_policy_collection_next_model_json2 = instance_group_manager_policy_collection_next_model.to_dict()
assert instance_group_manager_policy_collection_next_model_json2 == instance_group_manager_policy_collection_next_model_json
-class TestModel_InstanceGroupManagerPolicyPatch():
+
+class TestModel_InstanceGroupManagerPolicyPatch:
"""
Test Class for InstanceGroupManagerPolicyPatch
"""
@@ -44591,7 +47719,8 @@ def test_instance_group_manager_policy_patch_serialization(self):
instance_group_manager_policy_patch_model_json2 = instance_group_manager_policy_patch_model.to_dict()
assert instance_group_manager_policy_patch_model_json2 == instance_group_manager_policy_patch_model_json
-class TestModel_InstanceGroupManagerPolicyReference():
+
+class TestModel_InstanceGroupManagerPolicyReference:
"""
Test Class for InstanceGroupManagerPolicyReference
"""
@@ -44603,7 +47732,7 @@ def test_instance_group_manager_policy_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted
+ instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted
instance_group_manager_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceGroupManagerPolicyReference model
@@ -44628,7 +47757,8 @@ def test_instance_group_manager_policy_reference_serialization(self):
instance_group_manager_policy_reference_model_json2 = instance_group_manager_policy_reference_model.to_dict()
assert instance_group_manager_policy_reference_model_json2 == instance_group_manager_policy_reference_model_json
-class TestModel_InstanceGroupManagerPolicyReferenceDeleted():
+
+class TestModel_InstanceGroupManagerPolicyReferenceDeleted:
"""
Test Class for InstanceGroupManagerPolicyReferenceDeleted
"""
@@ -44657,7 +47787,8 @@ def test_instance_group_manager_policy_reference_deleted_serialization(self):
instance_group_manager_policy_reference_deleted_model_json2 = instance_group_manager_policy_reference_deleted_model.to_dict()
assert instance_group_manager_policy_reference_deleted_model_json2 == instance_group_manager_policy_reference_deleted_model_json
-class TestModel_InstanceGroupManagerReference():
+
+class TestModel_InstanceGroupManagerReference:
"""
Test Class for InstanceGroupManagerReference
"""
@@ -44669,7 +47800,7 @@ def test_instance_group_manager_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
+ instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceGroupManagerReference model
@@ -44694,7 +47825,8 @@ def test_instance_group_manager_reference_serialization(self):
instance_group_manager_reference_model_json2 = instance_group_manager_reference_model.to_dict()
assert instance_group_manager_reference_model_json2 == instance_group_manager_reference_model_json
-class TestModel_InstanceGroupManagerReferenceDeleted():
+
+class TestModel_InstanceGroupManagerReferenceDeleted:
"""
Test Class for InstanceGroupManagerReferenceDeleted
"""
@@ -44723,7 +47855,8 @@ def test_instance_group_manager_reference_deleted_serialization(self):
instance_group_manager_reference_deleted_model_json2 = instance_group_manager_reference_deleted_model.to_dict()
assert instance_group_manager_reference_deleted_model_json2 == instance_group_manager_reference_deleted_model_json
-class TestModel_InstanceGroupManagerScheduledActionGroup():
+
+class TestModel_InstanceGroupManagerScheduledActionGroup:
"""
Test Class for InstanceGroupManagerScheduledActionGroup
"""
@@ -44752,7 +47885,8 @@ def test_instance_group_manager_scheduled_action_group_serialization(self):
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():
+
+class TestModel_InstanceGroupManagerScheduledActionGroupPrototype:
"""
Test Class for InstanceGroupManagerScheduledActionGroupPrototype
"""
@@ -44781,7 +47915,8 @@ def test_instance_group_manager_scheduled_action_group_prototype_serialization(s
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():
+
+class TestModel_InstanceGroupMembership:
"""
Test Class for InstanceGroupMembership
"""
@@ -44793,30 +47928,30 @@ def test_instance_group_membership_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['name'] = 'my-instance'
- instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
+ instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_template_reference_model = {} # InstanceTemplateReference
+ instance_template_reference_model = {} # InstanceTemplateReference
instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['deleted'] = instance_template_reference_deleted_model
instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
instance_template_reference_model['name'] = 'my-instance-template'
- load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
+ load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
+ load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model
load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
@@ -44849,7 +47984,8 @@ def test_instance_group_membership_serialization(self):
instance_group_membership_model_json2 = instance_group_membership_model.to_dict()
assert instance_group_membership_model_json2 == instance_group_membership_model_json
-class TestModel_InstanceGroupMembershipCollection():
+
+class TestModel_InstanceGroupMembershipCollection:
"""
Test Class for InstanceGroupMembershipCollection
"""
@@ -44861,38 +47997,38 @@ def test_instance_group_membership_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_membership_collection_first_model = {} # InstanceGroupMembershipCollectionFirst
+ instance_group_membership_collection_first_model = {} # InstanceGroupMembershipCollectionFirst
instance_group_membership_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?limit=20'
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['name'] = 'my-instance'
- instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
+ instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_template_reference_model = {} # InstanceTemplateReference
+ instance_template_reference_model = {} # InstanceTemplateReference
instance_template_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['deleted'] = instance_template_reference_deleted_model
instance_template_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_template_reference_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
instance_template_reference_model['name'] = 'my-instance-template'
- load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
+ load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
+ load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model
load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- instance_group_membership_model = {} # InstanceGroupMembership
+ instance_group_membership_model = {} # InstanceGroupMembership
instance_group_membership_model['created_at'] = '2019-01-01T12:00:00Z'
instance_group_membership_model['delete_instance_on_membership_delete'] = True
instance_group_membership_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/memberships/8b002d86-601f-11ea-898b-000c29475bed'
@@ -44904,7 +48040,7 @@ def test_instance_group_membership_collection_serialization(self):
instance_group_membership_model['status'] = 'deleting'
instance_group_membership_model['updated_at'] = '2019-01-01T12:00:00Z'
- instance_group_membership_collection_next_model = {} # InstanceGroupMembershipCollectionNext
+ instance_group_membership_collection_next_model = {} # InstanceGroupMembershipCollectionNext
instance_group_membership_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/7241e2a8-601f-11ea-8503-000c29475bed/memberships?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a InstanceGroupMembershipCollection model
@@ -44930,7 +48066,8 @@ def test_instance_group_membership_collection_serialization(self):
instance_group_membership_collection_model_json2 = instance_group_membership_collection_model.to_dict()
assert instance_group_membership_collection_model_json2 == instance_group_membership_collection_model_json
-class TestModel_InstanceGroupMembershipCollectionFirst():
+
+class TestModel_InstanceGroupMembershipCollectionFirst:
"""
Test Class for InstanceGroupMembershipCollectionFirst
"""
@@ -44959,7 +48096,8 @@ def test_instance_group_membership_collection_first_serialization(self):
instance_group_membership_collection_first_model_json2 = instance_group_membership_collection_first_model.to_dict()
assert instance_group_membership_collection_first_model_json2 == instance_group_membership_collection_first_model_json
-class TestModel_InstanceGroupMembershipCollectionNext():
+
+class TestModel_InstanceGroupMembershipCollectionNext:
"""
Test Class for InstanceGroupMembershipCollectionNext
"""
@@ -44988,7 +48126,8 @@ def test_instance_group_membership_collection_next_serialization(self):
instance_group_membership_collection_next_model_json2 = instance_group_membership_collection_next_model.to_dict()
assert instance_group_membership_collection_next_model_json2 == instance_group_membership_collection_next_model_json
-class TestModel_InstanceGroupMembershipPatch():
+
+class TestModel_InstanceGroupMembershipPatch:
"""
Test Class for InstanceGroupMembershipPatch
"""
@@ -45017,7 +48156,8 @@ def test_instance_group_membership_patch_serialization(self):
instance_group_membership_patch_model_json2 = instance_group_membership_patch_model.to_dict()
assert instance_group_membership_patch_model_json2 == instance_group_membership_patch_model_json
-class TestModel_InstanceGroupPatch():
+
+class TestModel_InstanceGroupPatch:
"""
Test Class for InstanceGroupPatch
"""
@@ -45029,16 +48169,16 @@ 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 = {} # InstanceTemplateIdentityById
instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- load_balancer_identity_model = {} # LoadBalancerIdentityById
+ load_balancer_identity_model = {} # LoadBalancerIdentityById
load_balancer_identity_model['id'] = 'dd754295-e9e0-4c9d-bf6c-58fbc59e5727'
- load_balancer_pool_identity_model = {} # LoadBalancerPoolIdentityById
+ load_balancer_pool_identity_model = {} # LoadBalancerPoolIdentityById
load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a InstanceGroupPatch model
@@ -45066,7 +48206,8 @@ def test_instance_group_patch_serialization(self):
instance_group_patch_model_json2 = instance_group_patch_model.to_dict()
assert instance_group_patch_model_json2 == instance_group_patch_model_json
-class TestModel_InstanceGroupReference():
+
+class TestModel_InstanceGroupReference:
"""
Test Class for InstanceGroupReference
"""
@@ -45078,7 +48219,7 @@ def test_instance_group_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted
+ instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted
instance_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceGroupReference model
@@ -45104,7 +48245,8 @@ def test_instance_group_reference_serialization(self):
instance_group_reference_model_json2 = instance_group_reference_model.to_dict()
assert instance_group_reference_model_json2 == instance_group_reference_model_json
-class TestModel_InstanceGroupReferenceDeleted():
+
+class TestModel_InstanceGroupReferenceDeleted:
"""
Test Class for InstanceGroupReferenceDeleted
"""
@@ -45133,7 +48275,8 @@ def test_instance_group_reference_deleted_serialization(self):
instance_group_reference_deleted_model_json2 = instance_group_reference_deleted_model.to_dict()
assert instance_group_reference_deleted_model_json2 == instance_group_reference_deleted_model_json
-class TestModel_InstanceInitialization():
+
+class TestModel_InstanceInitialization:
"""
Test Class for InstanceInitialization
"""
@@ -45145,19 +48288,19 @@ 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 = {} # TrustedProfileReference
trusted_profile_reference_model['crn'] = 'crn:[...]'
trusted_profile_reference_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
trusted_profile_reference_model['resource_type'] = 'trusted_profile'
- instance_initialization_default_trusted_profile_model = {} # InstanceInitializationDefaultTrustedProfile
+ instance_initialization_default_trusted_profile_model = {} # InstanceInitializationDefaultTrustedProfile
instance_initialization_default_trusted_profile_model['auto_link'] = True
instance_initialization_default_trusted_profile_model['target'] = trusted_profile_reference_model
- key_reference_deleted_model = {} # KeyReferenceDeleted
+ key_reference_deleted_model = {} # KeyReferenceDeleted
key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- key_reference_model = {} # KeyReference
+ key_reference_model = {} # KeyReference
key_reference_model['crn'] = 'crn:[...]'
key_reference_model['deleted'] = key_reference_deleted_model
key_reference_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E'
@@ -45165,10 +48308,10 @@ def test_instance_initialization_serialization(self):
key_reference_model['id'] = '82679077-ac3b-4c10-be16-63e9c21f0f45'
key_reference_model['name'] = 'my-key-1'
- key_identity_by_fingerprint_model = {} # KeyIdentityByFingerprint
+ key_identity_by_fingerprint_model = {} # KeyIdentityByFingerprint
key_identity_by_fingerprint_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY'
- instance_initialization_password_model = {} # InstanceInitializationPassword
+ instance_initialization_password_model = {} # InstanceInitializationPassword
instance_initialization_password_model['encrypted_password'] = 'VGhpcyBpcyBhIG1vY2sgYnl0ZSBhcnJheSB2YWx1ZS4='
instance_initialization_password_model['encryption_key'] = key_identity_by_fingerprint_model
@@ -45193,7 +48336,8 @@ def test_instance_initialization_serialization(self):
instance_initialization_model_json2 = instance_initialization_model.to_dict()
assert instance_initialization_model_json2 == instance_initialization_model_json
-class TestModel_InstanceInitializationDefaultTrustedProfile():
+
+class TestModel_InstanceInitializationDefaultTrustedProfile:
"""
Test Class for InstanceInitializationDefaultTrustedProfile
"""
@@ -45205,7 +48349,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 = {} # TrustedProfileReference
trusted_profile_reference_model['crn'] = 'crn:v1:bluemix:public:iam-identity::a/123456::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'
@@ -45230,7 +48374,8 @@ def test_instance_initialization_default_trusted_profile_serialization(self):
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():
+
+class TestModel_InstanceInitializationPassword:
"""
Test Class for InstanceInitializationPassword
"""
@@ -45242,7 +48387,7 @@ def test_instance_initialization_password_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- key_identity_by_fingerprint_model = {} # KeyIdentityByFingerprint
+ key_identity_by_fingerprint_model = {} # KeyIdentityByFingerprint
key_identity_by_fingerprint_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY'
# Construct a json representation of a InstanceInitializationPassword model
@@ -45265,7 +48410,8 @@ def test_instance_initialization_password_serialization(self):
instance_initialization_password_model_json2 = instance_initialization_password_model.to_dict()
assert instance_initialization_password_model_json2 == instance_initialization_password_model_json
-class TestModel_InstanceLifecycleReason():
+
+class TestModel_InstanceLifecycleReason:
"""
Test Class for InstanceLifecycleReason
"""
@@ -45296,7 +48442,8 @@ def test_instance_lifecycle_reason_serialization(self):
instance_lifecycle_reason_model_json2 = instance_lifecycle_reason_model.to_dict()
assert instance_lifecycle_reason_model_json2 == instance_lifecycle_reason_model_json
-class TestModel_InstanceMetadataService():
+
+class TestModel_InstanceMetadataService:
"""
Test Class for InstanceMetadataService
"""
@@ -45327,7 +48474,8 @@ def test_instance_metadata_service_serialization(self):
instance_metadata_service_model_json2 = instance_metadata_service_model.to_dict()
assert instance_metadata_service_model_json2 == instance_metadata_service_model_json
-class TestModel_InstanceMetadataServicePatch():
+
+class TestModel_InstanceMetadataServicePatch:
"""
Test Class for InstanceMetadataServicePatch
"""
@@ -45358,7 +48506,8 @@ def test_instance_metadata_service_patch_serialization(self):
instance_metadata_service_patch_model_json2 = instance_metadata_service_patch_model.to_dict()
assert instance_metadata_service_patch_model_json2 == instance_metadata_service_patch_model_json
-class TestModel_InstanceMetadataServicePrototype():
+
+class TestModel_InstanceMetadataServicePrototype:
"""
Test Class for InstanceMetadataServicePrototype
"""
@@ -45389,7 +48538,8 @@ def test_instance_metadata_service_prototype_serialization(self):
instance_metadata_service_prototype_model_json2 = instance_metadata_service_prototype_model.to_dict()
assert instance_metadata_service_prototype_model_json2 == instance_metadata_service_prototype_model_json
-class TestModel_InstancePatch():
+
+class TestModel_InstancePatch:
"""
Test Class for InstancePatch
"""
@@ -45401,18 +48551,18 @@ def test_instance_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_patch_model = {} # InstanceAvailabilityPolicyPatch
+ instance_availability_policy_patch_model = {} # InstanceAvailabilityPolicyPatch
instance_availability_policy_patch_model['host_failure'] = 'restart'
- instance_metadata_service_patch_model = {} # InstanceMetadataServicePatch
+ instance_metadata_service_patch_model = {} # InstanceMetadataServicePatch
instance_metadata_service_patch_model['enabled'] = True
instance_metadata_service_patch_model['protocol'] = 'http'
instance_metadata_service_patch_model['response_hop_limit'] = 1
- instance_placement_target_patch_model = {} # InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_patch_model = {} # InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_patch_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_patch_profile_model = {} # InstancePatchProfileInstanceProfileIdentityByName
+ instance_patch_profile_model = {} # InstancePatchProfileInstanceProfileIdentityByName
instance_patch_profile_model['name'] = 'bx2-4x16'
# Construct a json representation of a InstancePatch model
@@ -45439,7 +48589,8 @@ def test_instance_patch_serialization(self):
instance_patch_model_json2 = instance_patch_model.to_dict()
assert instance_patch_model_json2 == instance_patch_model_json
-class TestModel_InstanceProfile():
+
+class TestModel_InstanceProfile:
"""
Test Class for InstanceProfile
"""
@@ -45451,76 +48602,76 @@ def test_instance_profile_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_profile_bandwidth_model = {} # InstanceProfileBandwidthFixed
+ instance_profile_bandwidth_model = {} # InstanceProfileBandwidthFixed
instance_profile_bandwidth_model['type'] = 'fixed'
instance_profile_bandwidth_model['value'] = 20000
- instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed
+ instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed
instance_profile_disk_quantity_model['type'] = 'fixed'
instance_profile_disk_quantity_model['value'] = 4
- instance_profile_disk_size_model = {} # InstanceProfileDiskSizeFixed
+ instance_profile_disk_size_model = {} # InstanceProfileDiskSizeFixed
instance_profile_disk_size_model['type'] = 'fixed'
instance_profile_disk_size_model['value'] = 100
- instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces
+ instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces
instance_profile_disk_supported_interfaces_model['default'] = 'nvme'
instance_profile_disk_supported_interfaces_model['type'] = 'enum'
instance_profile_disk_supported_interfaces_model['values'] = ['nvme']
- instance_profile_disk_model = {} # InstanceProfileDisk
+ instance_profile_disk_model = {} # InstanceProfileDisk
instance_profile_disk_model['quantity'] = instance_profile_disk_quantity_model
instance_profile_disk_model['size'] = instance_profile_disk_size_model
instance_profile_disk_model['supported_interface_types'] = instance_profile_disk_supported_interfaces_model
- instance_profile_gpu_model = {} # InstanceProfileGPUFixed
+ instance_profile_gpu_model = {} # InstanceProfileGPUFixed
instance_profile_gpu_model['type'] = 'fixed'
instance_profile_gpu_model['value'] = 2
- instance_profile_gpu_manufacturer_model = {} # InstanceProfileGPUManufacturer
+ instance_profile_gpu_manufacturer_model = {} # InstanceProfileGPUManufacturer
instance_profile_gpu_manufacturer_model['type'] = 'enum'
instance_profile_gpu_manufacturer_model['values'] = ['nvidia']
- instance_profile_gpu_memory_model = {} # InstanceProfileGPUMemoryFixed
+ instance_profile_gpu_memory_model = {} # InstanceProfileGPUMemoryFixed
instance_profile_gpu_memory_model['type'] = 'fixed'
instance_profile_gpu_memory_model['value'] = 16
- instance_profile_gpu_model_model = {} # InstanceProfileGPUModel
+ instance_profile_gpu_model_model = {} # InstanceProfileGPUModel
instance_profile_gpu_model_model['type'] = 'enum'
instance_profile_gpu_model_model['values'] = ['Tesla V100']
- instance_profile_memory_model = {} # InstanceProfileMemoryFixed
+ instance_profile_memory_model = {} # InstanceProfileMemoryFixed
instance_profile_memory_model['type'] = 'fixed'
instance_profile_memory_model['value'] = 16
- instance_profile_network_interface_count_model = {} # InstanceProfileNetworkInterfaceCountRange
+ instance_profile_network_interface_count_model = {} # InstanceProfileNetworkInterfaceCountRange
instance_profile_network_interface_count_model['max'] = 5
instance_profile_network_interface_count_model['min'] = 1
instance_profile_network_interface_count_model['type'] = 'range'
- instance_profile_os_architecture_model = {} # InstanceProfileOSArchitecture
+ instance_profile_os_architecture_model = {} # InstanceProfileOSArchitecture
instance_profile_os_architecture_model['default'] = 'testString'
instance_profile_os_architecture_model['type'] = 'enum'
instance_profile_os_architecture_model['values'] = ['amd64']
- instance_profile_port_speed_model = {} # InstanceProfilePortSpeedFixed
+ instance_profile_port_speed_model = {} # InstanceProfilePortSpeedFixed
instance_profile_port_speed_model['type'] = 'fixed'
instance_profile_port_speed_model['value'] = 1000
- instance_profile_volume_bandwidth_model = {} # InstanceProfileVolumeBandwidthFixed
+ instance_profile_volume_bandwidth_model = {} # InstanceProfileVolumeBandwidthFixed
instance_profile_volume_bandwidth_model['type'] = 'fixed'
instance_profile_volume_bandwidth_model['value'] = 20000
- instance_profile_vcpu_architecture_model = {} # InstanceProfileVCPUArchitecture
+ instance_profile_vcpu_architecture_model = {} # InstanceProfileVCPUArchitecture
instance_profile_vcpu_architecture_model['default'] = 'testString'
instance_profile_vcpu_architecture_model['type'] = 'fixed'
instance_profile_vcpu_architecture_model['value'] = 'amd64'
- instance_profile_vcpu_model = {} # InstanceProfileVCPUFixed
+ instance_profile_vcpu_model = {} # InstanceProfileVCPUFixed
instance_profile_vcpu_model['type'] = 'fixed'
instance_profile_vcpu_model['value'] = 16
- instance_profile_vcpu_manufacturer_model = {} # InstanceProfileVCPUManufacturer
+ instance_profile_vcpu_manufacturer_model = {} # InstanceProfileVCPUManufacturer
instance_profile_vcpu_manufacturer_model['default'] = 'testString'
instance_profile_vcpu_manufacturer_model['type'] = 'fixed'
instance_profile_vcpu_manufacturer_model['value'] = 'intel'
@@ -45560,7 +48711,8 @@ def test_instance_profile_serialization(self):
instance_profile_model_json2 = instance_profile_model.to_dict()
assert instance_profile_model_json2 == instance_profile_model_json
-class TestModel_InstanceProfileCollection():
+
+class TestModel_InstanceProfileCollection:
"""
Test Class for InstanceProfileCollection
"""
@@ -45572,81 +48724,81 @@ def test_instance_profile_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_profile_bandwidth_model = {} # InstanceProfileBandwidthFixed
+ instance_profile_bandwidth_model = {} # InstanceProfileBandwidthFixed
instance_profile_bandwidth_model['type'] = 'fixed'
instance_profile_bandwidth_model['value'] = 20000
- instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed
+ instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed
instance_profile_disk_quantity_model['type'] = 'fixed'
instance_profile_disk_quantity_model['value'] = 4
- instance_profile_disk_size_model = {} # InstanceProfileDiskSizeFixed
+ instance_profile_disk_size_model = {} # InstanceProfileDiskSizeFixed
instance_profile_disk_size_model['type'] = 'fixed'
instance_profile_disk_size_model['value'] = 100
- instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces
+ instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces
instance_profile_disk_supported_interfaces_model['default'] = 'nvme'
instance_profile_disk_supported_interfaces_model['type'] = 'enum'
instance_profile_disk_supported_interfaces_model['values'] = ['nvme']
- instance_profile_disk_model = {} # InstanceProfileDisk
+ instance_profile_disk_model = {} # InstanceProfileDisk
instance_profile_disk_model['quantity'] = instance_profile_disk_quantity_model
instance_profile_disk_model['size'] = instance_profile_disk_size_model
instance_profile_disk_model['supported_interface_types'] = instance_profile_disk_supported_interfaces_model
- instance_profile_gpu_model = {} # InstanceProfileGPUFixed
+ instance_profile_gpu_model = {} # InstanceProfileGPUFixed
instance_profile_gpu_model['type'] = 'fixed'
instance_profile_gpu_model['value'] = 2
- instance_profile_gpu_manufacturer_model = {} # InstanceProfileGPUManufacturer
+ instance_profile_gpu_manufacturer_model = {} # InstanceProfileGPUManufacturer
instance_profile_gpu_manufacturer_model['type'] = 'enum'
instance_profile_gpu_manufacturer_model['values'] = ['nvidia']
- instance_profile_gpu_memory_model = {} # InstanceProfileGPUMemoryFixed
+ instance_profile_gpu_memory_model = {} # InstanceProfileGPUMemoryFixed
instance_profile_gpu_memory_model['type'] = 'fixed'
instance_profile_gpu_memory_model['value'] = 16
- instance_profile_gpu_model_model = {} # InstanceProfileGPUModel
+ instance_profile_gpu_model_model = {} # InstanceProfileGPUModel
instance_profile_gpu_model_model['type'] = 'enum'
instance_profile_gpu_model_model['values'] = ['Tesla V100']
- instance_profile_memory_model = {} # InstanceProfileMemoryFixed
+ instance_profile_memory_model = {} # InstanceProfileMemoryFixed
instance_profile_memory_model['type'] = 'fixed'
instance_profile_memory_model['value'] = 16
- instance_profile_network_interface_count_model = {} # InstanceProfileNetworkInterfaceCountRange
+ instance_profile_network_interface_count_model = {} # InstanceProfileNetworkInterfaceCountRange
instance_profile_network_interface_count_model['max'] = 5
instance_profile_network_interface_count_model['min'] = 1
instance_profile_network_interface_count_model['type'] = 'range'
- instance_profile_os_architecture_model = {} # InstanceProfileOSArchitecture
+ instance_profile_os_architecture_model = {} # InstanceProfileOSArchitecture
instance_profile_os_architecture_model['default'] = 'testString'
instance_profile_os_architecture_model['type'] = 'enum'
instance_profile_os_architecture_model['values'] = ['amd64']
- instance_profile_port_speed_model = {} # InstanceProfilePortSpeedFixed
+ instance_profile_port_speed_model = {} # InstanceProfilePortSpeedFixed
instance_profile_port_speed_model['type'] = 'fixed'
instance_profile_port_speed_model['value'] = 1000
- instance_profile_volume_bandwidth_model = {} # InstanceProfileVolumeBandwidthFixed
+ instance_profile_volume_bandwidth_model = {} # InstanceProfileVolumeBandwidthFixed
instance_profile_volume_bandwidth_model['type'] = 'fixed'
instance_profile_volume_bandwidth_model['value'] = 20000
- instance_profile_vcpu_architecture_model = {} # InstanceProfileVCPUArchitecture
+ instance_profile_vcpu_architecture_model = {} # InstanceProfileVCPUArchitecture
instance_profile_vcpu_architecture_model['default'] = 'testString'
instance_profile_vcpu_architecture_model['type'] = 'fixed'
instance_profile_vcpu_architecture_model['value'] = 'amd64'
- instance_profile_vcpu_model = {} # InstanceProfileVCPUFixed
+ instance_profile_vcpu_model = {} # InstanceProfileVCPUFixed
instance_profile_vcpu_model['type'] = 'fixed'
instance_profile_vcpu_model['value'] = 16
- instance_profile_vcpu_manufacturer_model = {} # InstanceProfileVCPUManufacturer
+ instance_profile_vcpu_manufacturer_model = {} # InstanceProfileVCPUManufacturer
instance_profile_vcpu_manufacturer_model['default'] = 'testString'
instance_profile_vcpu_manufacturer_model['type'] = 'fixed'
instance_profile_vcpu_manufacturer_model['value'] = 'intel'
- instance_profile_model = {} # InstanceProfile
+ instance_profile_model = {} # InstanceProfile
instance_profile_model['bandwidth'] = instance_profile_bandwidth_model
instance_profile_model['disks'] = [instance_profile_disk_model]
instance_profile_model['family'] = 'balanced'
@@ -45684,7 +48836,8 @@ def test_instance_profile_collection_serialization(self):
instance_profile_collection_model_json2 = instance_profile_collection_model.to_dict()
assert instance_profile_collection_model_json2 == instance_profile_collection_model_json
-class TestModel_InstanceProfileDisk():
+
+class TestModel_InstanceProfileDisk:
"""
Test Class for InstanceProfileDisk
"""
@@ -45696,15 +48849,15 @@ def test_instance_profile_disk_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed
+ instance_profile_disk_quantity_model = {} # InstanceProfileDiskQuantityFixed
instance_profile_disk_quantity_model['type'] = 'fixed'
instance_profile_disk_quantity_model['value'] = 4
- instance_profile_disk_size_model = {} # InstanceProfileDiskSizeFixed
+ instance_profile_disk_size_model = {} # InstanceProfileDiskSizeFixed
instance_profile_disk_size_model['type'] = 'fixed'
instance_profile_disk_size_model['value'] = 100
- instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces
+ instance_profile_disk_supported_interfaces_model = {} # InstanceProfileDiskSupportedInterfaces
instance_profile_disk_supported_interfaces_model['default'] = 'nvme'
instance_profile_disk_supported_interfaces_model['type'] = 'enum'
instance_profile_disk_supported_interfaces_model['values'] = ['nvme']
@@ -45730,7 +48883,8 @@ def test_instance_profile_disk_serialization(self):
instance_profile_disk_model_json2 = instance_profile_disk_model.to_dict()
assert instance_profile_disk_model_json2 == instance_profile_disk_model_json
-class TestModel_InstanceProfileDiskSupportedInterfaces():
+
+class TestModel_InstanceProfileDiskSupportedInterfaces:
"""
Test Class for InstanceProfileDiskSupportedInterfaces
"""
@@ -45761,7 +48915,8 @@ def test_instance_profile_disk_supported_interfaces_serialization(self):
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():
+
+class TestModel_InstanceProfileGPUManufacturer:
"""
Test Class for InstanceProfileGPUManufacturer
"""
@@ -45791,7 +48946,8 @@ def test_instance_profile_gpu_manufacturer_serialization(self):
instance_profile_gpu_manufacturer_model_json2 = instance_profile_gpu_manufacturer_model.to_dict()
assert instance_profile_gpu_manufacturer_model_json2 == instance_profile_gpu_manufacturer_model_json
-class TestModel_InstanceProfileGPUModel():
+
+class TestModel_InstanceProfileGPUModel:
"""
Test Class for InstanceProfileGPUModel
"""
@@ -45821,7 +48977,8 @@ def test_instance_profile_gpu_model_serialization(self):
instance_profile_gpu_model_model_json2 = instance_profile_gpu_model_model.to_dict()
assert instance_profile_gpu_model_model_json2 == instance_profile_gpu_model_model_json
-class TestModel_InstanceProfileOSArchitecture():
+
+class TestModel_InstanceProfileOSArchitecture:
"""
Test Class for InstanceProfileOSArchitecture
"""
@@ -45852,7 +49009,8 @@ def test_instance_profile_os_architecture_serialization(self):
instance_profile_os_architecture_model_json2 = instance_profile_os_architecture_model.to_dict()
assert instance_profile_os_architecture_model_json2 == instance_profile_os_architecture_model_json
-class TestModel_InstanceProfileReference():
+
+class TestModel_InstanceProfileReference:
"""
Test Class for InstanceProfileReference
"""
@@ -45882,7 +49040,8 @@ def test_instance_profile_reference_serialization(self):
instance_profile_reference_model_json2 = instance_profile_reference_model.to_dict()
assert instance_profile_reference_model_json2 == instance_profile_reference_model_json
-class TestModel_InstanceProfileVCPUArchitecture():
+
+class TestModel_InstanceProfileVCPUArchitecture:
"""
Test Class for InstanceProfileVCPUArchitecture
"""
@@ -45913,7 +49072,8 @@ def test_instance_profile_vcpu_architecture_serialization(self):
instance_profile_vcpu_architecture_model_json2 = instance_profile_vcpu_architecture_model.to_dict()
assert instance_profile_vcpu_architecture_model_json2 == instance_profile_vcpu_architecture_model_json
-class TestModel_InstanceProfileVCPUManufacturer():
+
+class TestModel_InstanceProfileVCPUManufacturer:
"""
Test Class for InstanceProfileVCPUManufacturer
"""
@@ -45944,7 +49104,8 @@ def test_instance_profile_vcpu_manufacturer_serialization(self):
instance_profile_vcpu_manufacturer_model_json2 = instance_profile_vcpu_manufacturer_model.to_dict()
assert instance_profile_vcpu_manufacturer_model_json2 == instance_profile_vcpu_manufacturer_model_json
-class TestModel_InstanceReference():
+
+class TestModel_InstanceReference:
"""
Test Class for InstanceReference
"""
@@ -45956,7 +49117,7 @@ def test_instance_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceReference model
@@ -45982,7 +49143,8 @@ def test_instance_reference_serialization(self):
instance_reference_model_json2 = instance_reference_model.to_dict()
assert instance_reference_model_json2 == instance_reference_model_json
-class TestModel_InstanceReferenceDeleted():
+
+class TestModel_InstanceReferenceDeleted:
"""
Test Class for InstanceReferenceDeleted
"""
@@ -46011,7 +49173,8 @@ def test_instance_reference_deleted_serialization(self):
instance_reference_deleted_model_json2 = instance_reference_deleted_model.to_dict()
assert instance_reference_deleted_model_json2 == instance_reference_deleted_model_json
-class TestModel_InstanceStatusReason():
+
+class TestModel_InstanceStatusReason:
"""
Test Class for InstanceStatusReason
"""
@@ -46042,7 +49205,8 @@ def test_instance_status_reason_serialization(self):
instance_status_reason_model_json2 = instance_status_reason_model.to_dict()
assert instance_status_reason_model_json2 == instance_status_reason_model_json
-class TestModel_InstanceTemplateCollection():
+
+class TestModel_InstanceTemplateCollection:
"""
Test Class for InstanceTemplateCollection
"""
@@ -46054,96 +49218,96 @@ def test_instance_template_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_template_collection_first_model = {} # InstanceTemplateCollectionFirst
+ instance_template_collection_first_model = {} # InstanceTemplateCollectionFirst
instance_template_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20'
- instance_template_collection_next_model = {} # InstanceTemplateCollectionNext
+ instance_template_collection_next_model = {} # InstanceTemplateCollectionNext
instance_template_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['name'] = 'my-resource-group'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- image_identity_model = {} # ImageIdentityById
- image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
+ image_identity_model = {} # ImageIdentityById
+ image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051'
+
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- instance_template_model = {} # InstanceTemplateInstanceByImage
+ instance_template_model = {} # InstanceTemplateInstanceByImageInstanceTemplateContext
instance_template_model['availability_policy'] = instance_availability_policy_prototype_model
instance_template_model['created_at'] = '2019-01-01T12:00:00Z'
instance_template_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -46153,7 +49317,6 @@ def test_instance_template_collection_serialization(self):
instance_template_model['keys'] = [key_identity_model]
instance_template_model['metadata_service'] = instance_metadata_service_prototype_model
instance_template_model['name'] = 'my-instance-template'
- instance_template_model['network_interfaces'] = [network_interface_prototype_model]
instance_template_model['placement_target'] = instance_placement_target_prototype_model
instance_template_model['profile'] = instance_profile_identity_model
instance_template_model['resource_group'] = resource_group_reference_model
@@ -46163,6 +49326,7 @@ def test_instance_template_collection_serialization(self):
instance_template_model['vpc'] = vpc_identity_model
instance_template_model['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
instance_template_model['image'] = image_identity_model
+ instance_template_model['network_interfaces'] = [network_interface_prototype_model]
instance_template_model['primary_network_interface'] = network_interface_prototype_model
instance_template_model['zone'] = zone_identity_model
@@ -46189,7 +49353,8 @@ def test_instance_template_collection_serialization(self):
instance_template_collection_model_json2 = instance_template_collection_model.to_dict()
assert instance_template_collection_model_json2 == instance_template_collection_model_json
-class TestModel_InstanceTemplateCollectionFirst():
+
+class TestModel_InstanceTemplateCollectionFirst:
"""
Test Class for InstanceTemplateCollectionFirst
"""
@@ -46218,7 +49383,8 @@ def test_instance_template_collection_first_serialization(self):
instance_template_collection_first_model_json2 = instance_template_collection_first_model.to_dict()
assert instance_template_collection_first_model_json2 == instance_template_collection_first_model_json
-class TestModel_InstanceTemplateCollectionNext():
+
+class TestModel_InstanceTemplateCollectionNext:
"""
Test Class for InstanceTemplateCollectionNext
"""
@@ -46247,7 +49413,8 @@ def test_instance_template_collection_next_serialization(self):
instance_template_collection_next_model_json2 = instance_template_collection_next_model.to_dict()
assert instance_template_collection_next_model_json2 == instance_template_collection_next_model_json
-class TestModel_InstanceTemplatePatch():
+
+class TestModel_InstanceTemplatePatch:
"""
Test Class for InstanceTemplatePatch
"""
@@ -46276,7 +49443,8 @@ def test_instance_template_patch_serialization(self):
instance_template_patch_model_json2 = instance_template_patch_model.to_dict()
assert instance_template_patch_model_json2 == instance_template_patch_model_json
-class TestModel_InstanceTemplateReference():
+
+class TestModel_InstanceTemplateReference:
"""
Test Class for InstanceTemplateReference
"""
@@ -46288,7 +49456,7 @@ def test_instance_template_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
+ instance_template_reference_deleted_model = {} # InstanceTemplateReferenceDeleted
instance_template_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceTemplateReference model
@@ -46314,7 +49482,8 @@ def test_instance_template_reference_serialization(self):
instance_template_reference_model_json2 = instance_template_reference_model.to_dict()
assert instance_template_reference_model_json2 == instance_template_reference_model_json
-class TestModel_InstanceTemplateReferenceDeleted():
+
+class TestModel_InstanceTemplateReferenceDeleted:
"""
Test Class for InstanceTemplateReferenceDeleted
"""
@@ -46343,7 +49512,8 @@ def test_instance_template_reference_deleted_serialization(self):
instance_template_reference_deleted_model_json2 = instance_template_reference_deleted_model.to_dict()
assert instance_template_reference_deleted_model_json2 == instance_template_reference_deleted_model_json
-class TestModel_InstanceVCPU():
+
+class TestModel_InstanceVCPU:
"""
Test Class for InstanceVCPU
"""
@@ -46374,7 +49544,8 @@ def test_instance_vcpu_serialization(self):
instance_vcpu_model_json2 = instance_vcpu_model.to_dict()
assert instance_vcpu_model_json2 == instance_vcpu_model_json
-class TestModel_Key():
+
+class TestModel_Key:
"""
Test Class for Key
"""
@@ -46386,7 +49557,7 @@ 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 = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771'
resource_group_reference_model['id'] = '3fad3f2204eb4998c3964d254ffcd771'
resource_group_reference_model['name'] = 'Default'
@@ -46419,7 +49590,8 @@ def test_key_serialization(self):
key_model_json2 = key_model.to_dict()
assert key_model_json2 == key_model_json
-class TestModel_KeyCollection():
+
+class TestModel_KeyCollection:
"""
Test Class for KeyCollection
"""
@@ -46431,15 +49603,15 @@ def test_key_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- key_collection_first_model = {} # KeyCollectionFirst
+ key_collection_first_model = {} # KeyCollectionFirst
key_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?limit=50'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771'
resource_group_reference_model['id'] = '3fad3f2204eb4998c3964d254ffcd771'
resource_group_reference_model['name'] = 'Default'
- key_model = {} # Key
+ key_model = {} # Key
key_model['created_at'] = '2019-01-29T03:48:11Z'
key_model['crn'] = 'crn:[...]'
key_model['fingerprint'] = 'SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E'
@@ -46451,7 +49623,7 @@ def test_key_collection_serialization(self):
key_model['resource_group'] = resource_group_reference_model
key_model['type'] = 'rsa'
- key_collection_next_model = {} # KeyCollectionNext
+ key_collection_next_model = {} # KeyCollectionNext
key_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/keys?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a KeyCollection model
@@ -46477,7 +49649,8 @@ def test_key_collection_serialization(self):
key_collection_model_json2 = key_collection_model.to_dict()
assert key_collection_model_json2 == key_collection_model_json
-class TestModel_KeyCollectionFirst():
+
+class TestModel_KeyCollectionFirst:
"""
Test Class for KeyCollectionFirst
"""
@@ -46506,7 +49679,8 @@ def test_key_collection_first_serialization(self):
key_collection_first_model_json2 = key_collection_first_model.to_dict()
assert key_collection_first_model_json2 == key_collection_first_model_json
-class TestModel_KeyCollectionNext():
+
+class TestModel_KeyCollectionNext:
"""
Test Class for KeyCollectionNext
"""
@@ -46535,7 +49709,8 @@ def test_key_collection_next_serialization(self):
key_collection_next_model_json2 = key_collection_next_model.to_dict()
assert key_collection_next_model_json2 == key_collection_next_model_json
-class TestModel_KeyPatch():
+
+class TestModel_KeyPatch:
"""
Test Class for KeyPatch
"""
@@ -46564,7 +49739,8 @@ def test_key_patch_serialization(self):
key_patch_model_json2 = key_patch_model.to_dict()
assert key_patch_model_json2 == key_patch_model_json
-class TestModel_KeyReference():
+
+class TestModel_KeyReference:
"""
Test Class for KeyReference
"""
@@ -46576,7 +49752,7 @@ def test_key_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- key_reference_deleted_model = {} # KeyReferenceDeleted
+ key_reference_deleted_model = {} # KeyReferenceDeleted
key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a KeyReference model
@@ -46603,7 +49779,8 @@ def test_key_reference_serialization(self):
key_reference_model_json2 = key_reference_model.to_dict()
assert key_reference_model_json2 == key_reference_model_json
-class TestModel_KeyReferenceDeleted():
+
+class TestModel_KeyReferenceDeleted:
"""
Test Class for KeyReferenceDeleted
"""
@@ -46632,7 +49809,8 @@ def test_key_reference_deleted_serialization(self):
key_reference_deleted_model_json2 = key_reference_deleted_model.to_dict()
assert key_reference_deleted_model_json2 == key_reference_deleted_model_json
-class TestModel_LegacyCloudObjectStorageBucketReference():
+
+class TestModel_LegacyCloudObjectStorageBucketReference:
"""
Test Class for LegacyCloudObjectStorageBucketReference
"""
@@ -46661,7 +49839,8 @@ def test_legacy_cloud_object_storage_bucket_reference_serialization(self):
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():
+
+class TestModel_LoadBalancer:
"""
Test Class for LoadBalancer
"""
@@ -46673,43 +49852,43 @@ def test_load_balancer_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dns_instance_reference_model = {} # DNSInstanceReference
+ dns_instance_reference_model = {} # DNSInstanceReference
dns_instance_reference_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e'
- dns_zone_reference_model = {} # DNSZoneReference
+ dns_zone_reference_model = {} # DNSZoneReference
dns_zone_reference_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45'
- load_balancer_dns_model = {} # LoadBalancerDNS
+ load_balancer_dns_model = {} # LoadBalancerDNS
load_balancer_dns_model['instance'] = dns_instance_reference_model
load_balancer_dns_model['zone'] = dns_zone_reference_model
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
+ load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model
load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath
+ load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath
load_balancer_logging_datapath_model['active'] = True
- load_balancer_logging_model = {} # LoadBalancerLogging
+ load_balancer_logging_model = {} # LoadBalancerLogging
load_balancer_logging_model['datapath'] = load_balancer_logging_datapath_model
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
+ load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_private_ips_item_model = {} # LoadBalancerPrivateIpsItem
+ load_balancer_private_ips_item_model = {} # LoadBalancerPrivateIpsItem
load_balancer_private_ips_item_model['address'] = '192.168.3.4'
load_balancer_private_ips_item_model['deleted'] = reserved_ip_reference_deleted_model
load_balancer_private_ips_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -46717,33 +49896,33 @@ def test_load_balancer_serialization(self):
load_balancer_private_ips_item_model['name'] = 'my-reserved-ip'
load_balancer_private_ips_item_model['resource_type'] = 'subnet_reserved_ip'
- load_balancer_profile_reference_model = {} # LoadBalancerProfileReference
+ load_balancer_profile_reference_model = {} # LoadBalancerProfileReference
load_balancer_profile_reference_model['family'] = 'network'
load_balancer_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed'
load_balancer_profile_reference_model['name'] = 'network-fixed'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -46792,7 +49971,8 @@ def test_load_balancer_serialization(self):
load_balancer_model_json2 = load_balancer_model.to_dict()
assert load_balancer_model_json2 == load_balancer_model_json
-class TestModel_LoadBalancerCollection():
+
+class TestModel_LoadBalancerCollection:
"""
Test Class for LoadBalancerCollection
"""
@@ -46804,46 +49984,46 @@ def test_load_balancer_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_collection_first_model = {} # LoadBalancerCollectionFirst
+ load_balancer_collection_first_model = {} # LoadBalancerCollectionFirst
load_balancer_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?limit=20'
- dns_instance_reference_model = {} # DNSInstanceReference
+ dns_instance_reference_model = {} # DNSInstanceReference
dns_instance_reference_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e'
- dns_zone_reference_model = {} # DNSZoneReference
+ dns_zone_reference_model = {} # DNSZoneReference
dns_zone_reference_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45'
- load_balancer_dns_model = {} # LoadBalancerDNS
+ load_balancer_dns_model = {} # LoadBalancerDNS
load_balancer_dns_model['instance'] = dns_instance_reference_model
load_balancer_dns_model['zone'] = dns_zone_reference_model
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
+ load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model
load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath
+ load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath
load_balancer_logging_datapath_model['active'] = True
- load_balancer_logging_model = {} # LoadBalancerLogging
+ load_balancer_logging_model = {} # LoadBalancerLogging
load_balancer_logging_model['datapath'] = load_balancer_logging_datapath_model
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
+ load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_private_ips_item_model = {} # LoadBalancerPrivateIpsItem
+ load_balancer_private_ips_item_model = {} # LoadBalancerPrivateIpsItem
load_balancer_private_ips_item_model['address'] = '192.168.3.4'
load_balancer_private_ips_item_model['deleted'] = reserved_ip_reference_deleted_model
load_balancer_private_ips_item_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -46851,33 +50031,33 @@ def test_load_balancer_collection_serialization(self):
load_balancer_private_ips_item_model['name'] = 'my-reserved-ip'
load_balancer_private_ips_item_model['resource_type'] = 'subnet_reserved_ip'
- load_balancer_profile_reference_model = {} # LoadBalancerProfileReference
+ load_balancer_profile_reference_model = {} # LoadBalancerProfileReference
load_balancer_profile_reference_model['family'] = 'network'
load_balancer_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed'
load_balancer_profile_reference_model['name'] = 'network-fixed'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -46885,7 +50065,7 @@ def test_load_balancer_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- load_balancer_model = {} # LoadBalancer
+ load_balancer_model = {} # LoadBalancer
load_balancer_model['created_at'] = '2019-01-01T12:00:00Z'
load_balancer_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727'
load_balancer_model['dns'] = load_balancer_dns_model
@@ -46910,7 +50090,7 @@ def test_load_balancer_collection_serialization(self):
load_balancer_model['subnets'] = [subnet_reference_model]
load_balancer_model['udp_supported'] = True
- load_balancer_collection_next_model = {} # LoadBalancerCollectionNext
+ load_balancer_collection_next_model = {} # LoadBalancerCollectionNext
load_balancer_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20'
# Construct a json representation of a LoadBalancerCollection model
@@ -46936,7 +50116,8 @@ def test_load_balancer_collection_serialization(self):
load_balancer_collection_model_json2 = load_balancer_collection_model.to_dict()
assert load_balancer_collection_model_json2 == load_balancer_collection_model_json
-class TestModel_LoadBalancerCollectionFirst():
+
+class TestModel_LoadBalancerCollectionFirst:
"""
Test Class for LoadBalancerCollectionFirst
"""
@@ -46965,7 +50146,8 @@ def test_load_balancer_collection_first_serialization(self):
load_balancer_collection_first_model_json2 = load_balancer_collection_first_model.to_dict()
assert load_balancer_collection_first_model_json2 == load_balancer_collection_first_model_json
-class TestModel_LoadBalancerCollectionNext():
+
+class TestModel_LoadBalancerCollectionNext:
"""
Test Class for LoadBalancerCollectionNext
"""
@@ -46994,7 +50176,8 @@ def test_load_balancer_collection_next_serialization(self):
load_balancer_collection_next_model_json2 = load_balancer_collection_next_model.to_dict()
assert load_balancer_collection_next_model_json2 == load_balancer_collection_next_model_json
-class TestModel_LoadBalancerDNS():
+
+class TestModel_LoadBalancerDNS:
"""
Test Class for LoadBalancerDNS
"""
@@ -47006,10 +50189,10 @@ def test_load_balancer_dns_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dns_instance_reference_model = {} # DNSInstanceReference
+ dns_instance_reference_model = {} # DNSInstanceReference
dns_instance_reference_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e'
- dns_zone_reference_model = {} # DNSZoneReference
+ dns_zone_reference_model = {} # DNSZoneReference
dns_zone_reference_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45'
# Construct a json representation of a LoadBalancerDNS model
@@ -47032,7 +50215,8 @@ def test_load_balancer_dns_serialization(self):
load_balancer_dns_model_json2 = load_balancer_dns_model.to_dict()
assert load_balancer_dns_model_json2 == load_balancer_dns_model_json
-class TestModel_LoadBalancerDNSPatch():
+
+class TestModel_LoadBalancerDNSPatch:
"""
Test Class for LoadBalancerDNSPatch
"""
@@ -47044,10 +50228,10 @@ 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 = {} # DNSInstanceIdentityByCRN
dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e'
- dns_zone_identity_model = {} # DNSZoneIdentityById
+ dns_zone_identity_model = {} # DNSZoneIdentityById
dns_zone_identity_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45'
# Construct a json representation of a LoadBalancerDNSPatch model
@@ -47070,7 +50254,8 @@ def test_load_balancer_dns_patch_serialization(self):
load_balancer_dns_patch_model_json2 = load_balancer_dns_patch_model.to_dict()
assert load_balancer_dns_patch_model_json2 == load_balancer_dns_patch_model_json
-class TestModel_LoadBalancerDNSPrototype():
+
+class TestModel_LoadBalancerDNSPrototype:
"""
Test Class for LoadBalancerDNSPrototype
"""
@@ -47082,10 +50267,10 @@ 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 = {} # DNSInstanceIdentityByCRN
dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e'
- dns_zone_identity_model = {} # DNSZoneIdentityById
+ dns_zone_identity_model = {} # DNSZoneIdentityById
dns_zone_identity_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45'
# Construct a json representation of a LoadBalancerDNSPrototype model
@@ -47108,7 +50293,8 @@ def test_load_balancer_dns_prototype_serialization(self):
load_balancer_dns_prototype_model_json2 = load_balancer_dns_prototype_model.to_dict()
assert load_balancer_dns_prototype_model_json2 == load_balancer_dns_prototype_model_json
-class TestModel_LoadBalancerListener():
+
+class TestModel_LoadBalancerListener:
"""
Test Class for LoadBalancerListener
"""
@@ -47120,35 +50306,35 @@ 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 = {} # CertificateInstanceReference
certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5'
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
+ load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool'
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
+ load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model
load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect
+ load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect
load_balancer_listener_https_redirect_model['http_status_code'] = 301
load_balancer_listener_https_redirect_model['listener'] = load_balancer_listener_reference_model
load_balancer_listener_https_redirect_model['uri'] = '/example?doc=get'
- load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted
+ load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted
load_balancer_listener_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference
+ load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference
load_balancer_listener_policy_reference_model['deleted'] = load_balancer_listener_policy_reference_deleted_model
load_balancer_listener_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278'
load_balancer_listener_policy_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
@@ -47187,7 +50373,8 @@ def test_load_balancer_listener_serialization(self):
load_balancer_listener_model_json2 = load_balancer_listener_model.to_dict()
assert load_balancer_listener_model_json2 == load_balancer_listener_model_json
-class TestModel_LoadBalancerListenerCollection():
+
+class TestModel_LoadBalancerListenerCollection:
"""
Test Class for LoadBalancerListenerCollection
"""
@@ -47199,41 +50386,41 @@ 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 = {} # CertificateInstanceReference
certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5'
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
+ load_balancer_pool_reference_model = {} # LoadBalancerPoolReference
load_balancer_pool_reference_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_pool_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_reference_model['name'] = 'my-load-balancer-pool'
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
+ load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model
load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect
+ load_balancer_listener_https_redirect_model = {} # LoadBalancerListenerHTTPSRedirect
load_balancer_listener_https_redirect_model['http_status_code'] = 301
load_balancer_listener_https_redirect_model['listener'] = load_balancer_listener_reference_model
load_balancer_listener_https_redirect_model['uri'] = '/example?doc=get'
- load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted
+ load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted
load_balancer_listener_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference
+ load_balancer_listener_policy_reference_model = {} # LoadBalancerListenerPolicyReference
load_balancer_listener_policy_reference_model['deleted'] = load_balancer_listener_policy_reference_deleted_model
load_balancer_listener_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278'
load_balancer_listener_policy_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_policy_reference_model['name'] = 'testString'
- load_balancer_listener_model = {} # LoadBalancerListener
+ load_balancer_listener_model = {} # LoadBalancerListener
load_balancer_listener_model['accept_proxy_protocol'] = True
load_balancer_listener_model['certificate_instance'] = certificate_instance_reference_model
load_balancer_listener_model['connection_limit'] = 2000
@@ -47269,7 +50456,8 @@ def test_load_balancer_listener_collection_serialization(self):
load_balancer_listener_collection_model_json2 = load_balancer_listener_collection_model.to_dict()
assert load_balancer_listener_collection_model_json2 == load_balancer_listener_collection_model_json
-class TestModel_LoadBalancerListenerHTTPSRedirect():
+
+class TestModel_LoadBalancerListenerHTTPSRedirect:
"""
Test Class for LoadBalancerListenerHTTPSRedirect
"""
@@ -47281,10 +50469,10 @@ def test_load_balancer_listener_https_redirect_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
+ load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model
load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
@@ -47310,7 +50498,8 @@ def test_load_balancer_listener_https_redirect_serialization(self):
load_balancer_listener_https_redirect_model_json2 = load_balancer_listener_https_redirect_model.to_dict()
assert load_balancer_listener_https_redirect_model_json2 == load_balancer_listener_https_redirect_model_json
-class TestModel_LoadBalancerListenerHTTPSRedirectPatch():
+
+class TestModel_LoadBalancerListenerHTTPSRedirectPatch:
"""
Test Class for LoadBalancerListenerHTTPSRedirectPatch
"""
@@ -47322,7 +50511,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 = {} # LoadBalancerListenerIdentityById
load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
# Construct a json representation of a LoadBalancerListenerHTTPSRedirectPatch model
@@ -47346,7 +50535,8 @@ def test_load_balancer_listener_https_redirect_patch_serialization(self):
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():
+
+class TestModel_LoadBalancerListenerHTTPSRedirectPrototype:
"""
Test Class for LoadBalancerListenerHTTPSRedirectPrototype
"""
@@ -47358,7 +50548,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 = {} # LoadBalancerListenerIdentityById
load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
# Construct a json representation of a LoadBalancerListenerHTTPSRedirectPrototype model
@@ -47382,7 +50572,8 @@ def test_load_balancer_listener_https_redirect_prototype_serialization(self):
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():
+
+class TestModel_LoadBalancerListenerPatch:
"""
Test Class for LoadBalancerListenerPatch
"""
@@ -47394,16 +50585,16 @@ 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 = {} # CertificateInstanceIdentityByCRN
certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5'
- load_balancer_pool_identity_model = {} # LoadBalancerPoolIdentityById
+ load_balancer_pool_identity_model = {} # LoadBalancerPoolIdentityById
load_balancer_pool_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById
+ load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById
load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_listener_https_redirect_patch_model = {} # LoadBalancerListenerHTTPSRedirectPatch
+ load_balancer_listener_https_redirect_patch_model = {} # LoadBalancerListenerHTTPSRedirectPatch
load_balancer_listener_https_redirect_patch_model['http_status_code'] = 301
load_balancer_listener_https_redirect_patch_model['listener'] = load_balancer_listener_identity_model
load_balancer_listener_https_redirect_patch_model['uri'] = '/example?doc=get'
@@ -47436,7 +50627,8 @@ def test_load_balancer_listener_patch_serialization(self):
load_balancer_listener_patch_model_json2 = load_balancer_listener_patch_model.to_dict()
assert load_balancer_listener_patch_model_json2 == load_balancer_listener_patch_model_json
-class TestModel_LoadBalancerListenerPolicy():
+
+class TestModel_LoadBalancerListenerPolicy:
"""
Test Class for LoadBalancerListenerPolicy
"""
@@ -47448,18 +50640,18 @@ def test_load_balancer_listener_policy_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted
+ load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted
load_balancer_listener_policy_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference
+ load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference
load_balancer_listener_policy_rule_reference_model['deleted'] = load_balancer_listener_policy_rule_reference_deleted_model
load_balancer_listener_policy_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762'
load_balancer_listener_policy_rule_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
+ load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
load_balancer_listener_policy_target_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_listener_policy_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_policy_target_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
@@ -47492,7 +50684,8 @@ def test_load_balancer_listener_policy_serialization(self):
load_balancer_listener_policy_model_json2 = load_balancer_listener_policy_model.to_dict()
assert load_balancer_listener_policy_model_json2 == load_balancer_listener_policy_model_json
-class TestModel_LoadBalancerListenerPolicyCollection():
+
+class TestModel_LoadBalancerListenerPolicyCollection:
"""
Test Class for LoadBalancerListenerPolicyCollection
"""
@@ -47504,24 +50697,24 @@ def test_load_balancer_listener_policy_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted
+ load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted
load_balancer_listener_policy_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference
+ load_balancer_listener_policy_rule_reference_model = {} # LoadBalancerListenerPolicyRuleReference
load_balancer_listener_policy_rule_reference_model['deleted'] = load_balancer_listener_policy_rule_reference_deleted_model
load_balancer_listener_policy_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004/policies/f3187486-7b27-4c79-990c-47d33c0e2278/rules/873a84b0-84d6-49c6-8948-1fa527b25762'
load_balancer_listener_policy_rule_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
+ load_balancer_listener_policy_target_model = {} # LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
load_balancer_listener_policy_target_model['deleted'] = load_balancer_pool_reference_deleted_model
load_balancer_listener_policy_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_policy_target_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_policy_target_model['name'] = 'my-load-balancer-pool'
- load_balancer_listener_policy_model = {} # LoadBalancerListenerPolicy
+ load_balancer_listener_policy_model = {} # 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'
@@ -47551,7 +50744,8 @@ def test_load_balancer_listener_policy_collection_serialization(self):
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
-class TestModel_LoadBalancerListenerPolicyPatch():
+
+class TestModel_LoadBalancerListenerPolicyPatch:
"""
Test Class for LoadBalancerListenerPolicyPatch
"""
@@ -47563,7 +50757,7 @@ 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 = {} # LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById
+ load_balancer_listener_policy_target_patch_model = {} # LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById
load_balancer_listener_policy_target_patch_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
# Construct a json representation of a LoadBalancerListenerPolicyPatch model
@@ -47587,7 +50781,8 @@ def test_load_balancer_listener_policy_patch_serialization(self):
load_balancer_listener_policy_patch_model_json2 = load_balancer_listener_policy_patch_model.to_dict()
assert load_balancer_listener_policy_patch_model_json2 == load_balancer_listener_policy_patch_model_json
-class TestModel_LoadBalancerListenerPolicyPrototype():
+
+class TestModel_LoadBalancerListenerPolicyPrototype:
"""
Test Class for LoadBalancerListenerPolicyPrototype
"""
@@ -47599,13 +50794,13 @@ def test_load_balancer_listener_policy_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_policy_rule_prototype_model = {} # LoadBalancerListenerPolicyRulePrototype
+ load_balancer_listener_policy_rule_prototype_model = {} # LoadBalancerListenerPolicyRulePrototype
load_balancer_listener_policy_rule_prototype_model['condition'] = 'contains'
load_balancer_listener_policy_rule_prototype_model['field'] = 'MY-APP-HEADER'
load_balancer_listener_policy_rule_prototype_model['type'] = 'body'
load_balancer_listener_policy_rule_prototype_model['value'] = 'testString'
- load_balancer_listener_policy_target_prototype_model = {} # LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById
+ load_balancer_listener_policy_target_prototype_model = {} # LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById
load_balancer_listener_policy_target_prototype_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
# Construct a json representation of a LoadBalancerListenerPolicyPrototype model
@@ -47631,7 +50826,8 @@ def test_load_balancer_listener_policy_prototype_serialization(self):
load_balancer_listener_policy_prototype_model_json2 = load_balancer_listener_policy_prototype_model.to_dict()
assert load_balancer_listener_policy_prototype_model_json2 == load_balancer_listener_policy_prototype_model_json
-class TestModel_LoadBalancerListenerPolicyReference():
+
+class TestModel_LoadBalancerListenerPolicyReference:
"""
Test Class for LoadBalancerListenerPolicyReference
"""
@@ -47643,7 +50839,7 @@ def test_load_balancer_listener_policy_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted
+ load_balancer_listener_policy_reference_deleted_model = {} # LoadBalancerListenerPolicyReferenceDeleted
load_balancer_listener_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerListenerPolicyReference model
@@ -47668,7 +50864,8 @@ def test_load_balancer_listener_policy_reference_serialization(self):
load_balancer_listener_policy_reference_model_json2 = load_balancer_listener_policy_reference_model.to_dict()
assert load_balancer_listener_policy_reference_model_json2 == load_balancer_listener_policy_reference_model_json
-class TestModel_LoadBalancerListenerPolicyReferenceDeleted():
+
+class TestModel_LoadBalancerListenerPolicyReferenceDeleted:
"""
Test Class for LoadBalancerListenerPolicyReferenceDeleted
"""
@@ -47697,7 +50894,8 @@ def test_load_balancer_listener_policy_reference_deleted_serialization(self):
load_balancer_listener_policy_reference_deleted_model_json2 = load_balancer_listener_policy_reference_deleted_model.to_dict()
assert load_balancer_listener_policy_reference_deleted_model_json2 == load_balancer_listener_policy_reference_deleted_model_json
-class TestModel_LoadBalancerListenerPolicyRule():
+
+class TestModel_LoadBalancerListenerPolicyRule:
"""
Test Class for LoadBalancerListenerPolicyRule
"""
@@ -47733,7 +50931,8 @@ def test_load_balancer_listener_policy_rule_serialization(self):
load_balancer_listener_policy_rule_model_json2 = load_balancer_listener_policy_rule_model.to_dict()
assert load_balancer_listener_policy_rule_model_json2 == load_balancer_listener_policy_rule_model_json
-class TestModel_LoadBalancerListenerPolicyRuleCollection():
+
+class TestModel_LoadBalancerListenerPolicyRuleCollection:
"""
Test Class for LoadBalancerListenerPolicyRuleCollection
"""
@@ -47745,7 +50944,7 @@ def test_load_balancer_listener_policy_rule_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_policy_rule_model = {} # LoadBalancerListenerPolicyRule
+ load_balancer_listener_policy_rule_model = {} # LoadBalancerListenerPolicyRule
load_balancer_listener_policy_rule_model['condition'] = 'contains'
load_balancer_listener_policy_rule_model['created_at'] = '2019-01-01T12:00:00Z'
load_balancer_listener_policy_rule_model['field'] = 'MY-APP-HEADER'
@@ -47774,7 +50973,8 @@ def test_load_balancer_listener_policy_rule_collection_serialization(self):
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():
+
+class TestModel_LoadBalancerListenerPolicyRulePatch:
"""
Test Class for LoadBalancerListenerPolicyRulePatch
"""
@@ -47806,7 +51006,8 @@ def test_load_balancer_listener_policy_rule_patch_serialization(self):
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
-class TestModel_LoadBalancerListenerPolicyRulePrototype():
+
+class TestModel_LoadBalancerListenerPolicyRulePrototype:
"""
Test Class for LoadBalancerListenerPolicyRulePrototype
"""
@@ -47838,7 +51039,8 @@ def test_load_balancer_listener_policy_rule_prototype_serialization(self):
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():
+
+class TestModel_LoadBalancerListenerPolicyRuleReference:
"""
Test Class for LoadBalancerListenerPolicyRuleReference
"""
@@ -47850,7 +51052,7 @@ def test_load_balancer_listener_policy_rule_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted
+ load_balancer_listener_policy_rule_reference_deleted_model = {} # LoadBalancerListenerPolicyRuleReferenceDeleted
load_balancer_listener_policy_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerListenerPolicyRuleReference model
@@ -47874,7 +51076,8 @@ def test_load_balancer_listener_policy_rule_reference_serialization(self):
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_LoadBalancerListenerPolicyRuleReferenceDeleted():
+
+class TestModel_LoadBalancerListenerPolicyRuleReferenceDeleted:
"""
Test Class for LoadBalancerListenerPolicyRuleReferenceDeleted
"""
@@ -47903,7 +51106,8 @@ def test_load_balancer_listener_policy_rule_reference_deleted_serialization(self
load_balancer_listener_policy_rule_reference_deleted_model_json2 = load_balancer_listener_policy_rule_reference_deleted_model.to_dict()
assert load_balancer_listener_policy_rule_reference_deleted_model_json2 == load_balancer_listener_policy_rule_reference_deleted_model_json
-class TestModel_LoadBalancerListenerPrototypeLoadBalancerContext():
+
+class TestModel_LoadBalancerListenerPrototypeLoadBalancerContext:
"""
Test Class for LoadBalancerListenerPrototypeLoadBalancerContext
"""
@@ -47915,16 +51119,16 @@ 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 = {} # CertificateInstanceIdentityByCRN
certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456: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 = {} # LoadBalancerPoolIdentityByName
load_balancer_pool_identity_by_name_model['name'] = 'my-load-balancer-pool'
- load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById
+ load_balancer_listener_identity_model = {} # LoadBalancerListenerIdentityById
load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_listener_https_redirect_prototype_model = {} # LoadBalancerListenerHTTPSRedirectPrototype
+ load_balancer_listener_https_redirect_prototype_model = {} # LoadBalancerListenerHTTPSRedirectPrototype
load_balancer_listener_https_redirect_prototype_model['http_status_code'] = 301
load_balancer_listener_https_redirect_prototype_model['listener'] = load_balancer_listener_identity_model
load_balancer_listener_https_redirect_prototype_model['uri'] = '/example?doc=get'
@@ -47957,7 +51161,8 @@ def test_load_balancer_listener_prototype_load_balancer_context_serialization(se
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():
+
+class TestModel_LoadBalancerListenerReference:
"""
Test Class for LoadBalancerListenerReference
"""
@@ -47969,7 +51174,7 @@ def test_load_balancer_listener_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerListenerReference model
@@ -47993,7 +51198,8 @@ def test_load_balancer_listener_reference_serialization(self):
load_balancer_listener_reference_model_json2 = load_balancer_listener_reference_model.to_dict()
assert load_balancer_listener_reference_model_json2 == load_balancer_listener_reference_model_json
-class TestModel_LoadBalancerListenerReferenceDeleted():
+
+class TestModel_LoadBalancerListenerReferenceDeleted:
"""
Test Class for LoadBalancerListenerReferenceDeleted
"""
@@ -48022,7 +51228,8 @@ def test_load_balancer_listener_reference_deleted_serialization(self):
load_balancer_listener_reference_deleted_model_json2 = load_balancer_listener_reference_deleted_model.to_dict()
assert load_balancer_listener_reference_deleted_model_json2 == load_balancer_listener_reference_deleted_model_json
-class TestModel_LoadBalancerLogging():
+
+class TestModel_LoadBalancerLogging:
"""
Test Class for LoadBalancerLogging
"""
@@ -48034,7 +51241,7 @@ def test_load_balancer_logging_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath
+ load_balancer_logging_datapath_model = {} # LoadBalancerLoggingDatapath
load_balancer_logging_datapath_model['active'] = True
# Construct a json representation of a LoadBalancerLogging model
@@ -48056,7 +51263,8 @@ def test_load_balancer_logging_serialization(self):
load_balancer_logging_model_json2 = load_balancer_logging_model.to_dict()
assert load_balancer_logging_model_json2 == load_balancer_logging_model_json
-class TestModel_LoadBalancerLoggingDatapath():
+
+class TestModel_LoadBalancerLoggingDatapath:
"""
Test Class for LoadBalancerLoggingDatapath
"""
@@ -48085,7 +51293,8 @@ def test_load_balancer_logging_datapath_serialization(self):
load_balancer_logging_datapath_model_json2 = load_balancer_logging_datapath_model.to_dict()
assert load_balancer_logging_datapath_model_json2 == load_balancer_logging_datapath_model_json
-class TestModel_LoadBalancerLoggingDatapathPatch():
+
+class TestModel_LoadBalancerLoggingDatapathPatch:
"""
Test Class for LoadBalancerLoggingDatapathPatch
"""
@@ -48114,7 +51323,8 @@ def test_load_balancer_logging_datapath_patch_serialization(self):
load_balancer_logging_datapath_patch_model_json2 = load_balancer_logging_datapath_patch_model.to_dict()
assert load_balancer_logging_datapath_patch_model_json2 == load_balancer_logging_datapath_patch_model_json
-class TestModel_LoadBalancerLoggingDatapathPrototype():
+
+class TestModel_LoadBalancerLoggingDatapathPrototype:
"""
Test Class for LoadBalancerLoggingDatapathPrototype
"""
@@ -48143,7 +51353,8 @@ def test_load_balancer_logging_datapath_prototype_serialization(self):
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
-class TestModel_LoadBalancerLoggingPatch():
+
+class TestModel_LoadBalancerLoggingPatch:
"""
Test Class for LoadBalancerLoggingPatch
"""
@@ -48155,7 +51366,7 @@ def test_load_balancer_logging_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_logging_datapath_patch_model = {} # LoadBalancerLoggingDatapathPatch
+ load_balancer_logging_datapath_patch_model = {} # LoadBalancerLoggingDatapathPatch
load_balancer_logging_datapath_patch_model['active'] = True
# Construct a json representation of a LoadBalancerLoggingPatch model
@@ -48177,7 +51388,8 @@ def test_load_balancer_logging_patch_serialization(self):
load_balancer_logging_patch_model_json2 = load_balancer_logging_patch_model.to_dict()
assert load_balancer_logging_patch_model_json2 == load_balancer_logging_patch_model_json
-class TestModel_LoadBalancerLoggingPrototype():
+
+class TestModel_LoadBalancerLoggingPrototype:
"""
Test Class for LoadBalancerLoggingPrototype
"""
@@ -48189,7 +51401,7 @@ def test_load_balancer_logging_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_logging_datapath_prototype_model = {} # LoadBalancerLoggingDatapathPrototype
+ load_balancer_logging_datapath_prototype_model = {} # LoadBalancerLoggingDatapathPrototype
load_balancer_logging_datapath_prototype_model['active'] = True
# Construct a json representation of a LoadBalancerLoggingPrototype model
@@ -48211,7 +51423,8 @@ def test_load_balancer_logging_prototype_serialization(self):
load_balancer_logging_prototype_model_json2 = load_balancer_logging_prototype_model.to_dict()
assert load_balancer_logging_prototype_model_json2 == load_balancer_logging_prototype_model_json
-class TestModel_LoadBalancerPatch():
+
+class TestModel_LoadBalancerPatch:
"""
Test Class for LoadBalancerPatch
"""
@@ -48223,23 +51436,23 @@ 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 = {} # DNSInstanceIdentityByCRN
dns_instance_identity_model['crn'] = 'crn:v1:bluemix:public:dns-svcs:global:a/fff1cdf3dc1e4ec692a5f78bbb2584bc:6860c359-b2e2-46fa-a944-b38c28201c6e'
- dns_zone_identity_model = {} # DNSZoneIdentityById
+ dns_zone_identity_model = {} # DNSZoneIdentityById
dns_zone_identity_model['id'] = 'd66662cc-aa23-4fe1-9987-858487a61f45'
- load_balancer_dns_patch_model = {} # LoadBalancerDNSPatch
+ load_balancer_dns_patch_model = {} # LoadBalancerDNSPatch
load_balancer_dns_patch_model['instance'] = dns_instance_identity_model
load_balancer_dns_patch_model['zone'] = dns_zone_identity_model
- load_balancer_logging_datapath_patch_model = {} # LoadBalancerLoggingDatapathPatch
+ load_balancer_logging_datapath_patch_model = {} # LoadBalancerLoggingDatapathPatch
load_balancer_logging_datapath_patch_model['active'] = True
- load_balancer_logging_patch_model = {} # LoadBalancerLoggingPatch
+ load_balancer_logging_patch_model = {} # LoadBalancerLoggingPatch
load_balancer_logging_patch_model['datapath'] = load_balancer_logging_datapath_patch_model
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a LoadBalancerPatch model
@@ -48264,7 +51477,8 @@ def test_load_balancer_patch_serialization(self):
load_balancer_patch_model_json2 = load_balancer_patch_model.to_dict()
assert load_balancer_patch_model_json2 == load_balancer_patch_model_json
-class TestModel_LoadBalancerPool():
+
+class TestModel_LoadBalancerPool:
"""
Test Class for LoadBalancerPool
"""
@@ -48276,7 +51490,7 @@ def test_load_balancer_pool_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_health_monitor_model = {} # LoadBalancerPoolHealthMonitor
+ load_balancer_pool_health_monitor_model = {} # LoadBalancerPoolHealthMonitor
load_balancer_pool_health_monitor_model['delay'] = 5
load_balancer_pool_health_monitor_model['max_retries'] = 2
load_balancer_pool_health_monitor_model['port'] = 22
@@ -48284,25 +51498,25 @@ def test_load_balancer_pool_serialization(self):
load_balancer_pool_health_monitor_model['type'] = 'http'
load_balancer_pool_health_monitor_model['url_path'] = '/'
- instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted
+ instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted
instance_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_reference_model = {} # InstanceGroupReference
+ instance_group_reference_model = {} # InstanceGroupReference
instance_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_reference_model['deleted'] = instance_group_reference_deleted_model
instance_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_reference_model['name'] = 'my-instance-group'
- load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
+ load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
+ load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model
load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_pool_session_persistence_model = {} # LoadBalancerPoolSessionPersistence
+ load_balancer_pool_session_persistence_model = {} # LoadBalancerPoolSessionPersistence
load_balancer_pool_session_persistence_model['cookie_name'] = 'my-cookie-name'
load_balancer_pool_session_persistence_model['type'] = 'app_cookie'
@@ -48336,7 +51550,8 @@ def test_load_balancer_pool_serialization(self):
load_balancer_pool_model_json2 = load_balancer_pool_model.to_dict()
assert load_balancer_pool_model_json2 == load_balancer_pool_model_json
-class TestModel_LoadBalancerPoolCollection():
+
+class TestModel_LoadBalancerPoolCollection:
"""
Test Class for LoadBalancerPoolCollection
"""
@@ -48348,7 +51563,7 @@ def test_load_balancer_pool_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_health_monitor_model = {} # LoadBalancerPoolHealthMonitor
+ load_balancer_pool_health_monitor_model = {} # LoadBalancerPoolHealthMonitor
load_balancer_pool_health_monitor_model['delay'] = 5
load_balancer_pool_health_monitor_model['max_retries'] = 2
load_balancer_pool_health_monitor_model['port'] = 22
@@ -48356,29 +51571,29 @@ def test_load_balancer_pool_collection_serialization(self):
load_balancer_pool_health_monitor_model['type'] = 'http'
load_balancer_pool_health_monitor_model['url_path'] = '/'
- instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted
+ instance_group_reference_deleted_model = {} # InstanceGroupReferenceDeleted
instance_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_reference_model = {} # InstanceGroupReference
+ instance_group_reference_model = {} # InstanceGroupReference
instance_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-group:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_reference_model['deleted'] = instance_group_reference_deleted_model
instance_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_reference_model['name'] = 'my-instance-group'
- load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
+ load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
+ load_balancer_pool_member_reference_model = {} # LoadBalancerPoolMemberReference
load_balancer_pool_member_reference_model['deleted'] = load_balancer_pool_member_reference_deleted_model
load_balancer_pool_member_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004/members/80294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_pool_member_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
- load_balancer_pool_session_persistence_model = {} # LoadBalancerPoolSessionPersistence
+ load_balancer_pool_session_persistence_model = {} # LoadBalancerPoolSessionPersistence
load_balancer_pool_session_persistence_model['cookie_name'] = 'my-cookie-name'
load_balancer_pool_session_persistence_model['type'] = 'app_cookie'
- load_balancer_pool_model = {} # LoadBalancerPool
+ load_balancer_pool_model = {} # LoadBalancerPool
load_balancer_pool_model['algorithm'] = 'least_connections'
load_balancer_pool_model['created_at'] = '2019-01-01T12:00:00Z'
load_balancer_pool_model['health_monitor'] = load_balancer_pool_health_monitor_model
@@ -48411,7 +51626,8 @@ def test_load_balancer_pool_collection_serialization(self):
load_balancer_pool_collection_model_json2 = load_balancer_pool_collection_model.to_dict()
assert load_balancer_pool_collection_model_json2 == load_balancer_pool_collection_model_json
-class TestModel_LoadBalancerPoolHealthMonitor():
+
+class TestModel_LoadBalancerPoolHealthMonitor:
"""
Test Class for LoadBalancerPoolHealthMonitor
"""
@@ -48445,7 +51661,8 @@ def test_load_balancer_pool_health_monitor_serialization(self):
load_balancer_pool_health_monitor_model_json2 = load_balancer_pool_health_monitor_model.to_dict()
assert load_balancer_pool_health_monitor_model_json2 == load_balancer_pool_health_monitor_model_json
-class TestModel_LoadBalancerPoolHealthMonitorPatch():
+
+class TestModel_LoadBalancerPoolHealthMonitorPatch:
"""
Test Class for LoadBalancerPoolHealthMonitorPatch
"""
@@ -48479,7 +51696,8 @@ def test_load_balancer_pool_health_monitor_patch_serialization(self):
load_balancer_pool_health_monitor_patch_model_json2 = load_balancer_pool_health_monitor_patch_model.to_dict()
assert load_balancer_pool_health_monitor_patch_model_json2 == load_balancer_pool_health_monitor_patch_model_json
-class TestModel_LoadBalancerPoolHealthMonitorPrototype():
+
+class TestModel_LoadBalancerPoolHealthMonitorPrototype:
"""
Test Class for LoadBalancerPoolHealthMonitorPrototype
"""
@@ -48513,7 +51731,8 @@ def test_load_balancer_pool_health_monitor_prototype_serialization(self):
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():
+
+class TestModel_LoadBalancerPoolIdentityByName:
"""
Test Class for LoadBalancerPoolIdentityByName
"""
@@ -48542,7 +51761,8 @@ def test_load_balancer_pool_identity_by_name_serialization(self):
load_balancer_pool_identity_by_name_model_json2 = load_balancer_pool_identity_by_name_model.to_dict()
assert load_balancer_pool_identity_by_name_model_json2 == load_balancer_pool_identity_by_name_model_json
-class TestModel_LoadBalancerPoolMember():
+
+class TestModel_LoadBalancerPoolMember:
"""
Test Class for LoadBalancerPoolMember
"""
@@ -48554,10 +51774,10 @@ def test_load_balancer_pool_member_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_member_target_model = {} # LoadBalancerPoolMemberTargetInstanceReference
+ load_balancer_pool_member_target_model = {} # LoadBalancerPoolMemberTargetInstanceReference
load_balancer_pool_member_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
load_balancer_pool_member_target_model['deleted'] = instance_reference_deleted_model
load_balancer_pool_member_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -48590,7 +51810,8 @@ def test_load_balancer_pool_member_serialization(self):
load_balancer_pool_member_model_json2 = load_balancer_pool_member_model.to_dict()
assert load_balancer_pool_member_model_json2 == load_balancer_pool_member_model_json
-class TestModel_LoadBalancerPoolMemberCollection():
+
+class TestModel_LoadBalancerPoolMemberCollection:
"""
Test Class for LoadBalancerPoolMemberCollection
"""
@@ -48602,17 +51823,17 @@ def test_load_balancer_pool_member_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_pool_member_target_model = {} # LoadBalancerPoolMemberTargetInstanceReference
+ load_balancer_pool_member_target_model = {} # LoadBalancerPoolMemberTargetInstanceReference
load_balancer_pool_member_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
load_balancer_pool_member_target_model['deleted'] = instance_reference_deleted_model
load_balancer_pool_member_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
load_balancer_pool_member_target_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
load_balancer_pool_member_target_model['name'] = 'my-instance'
- load_balancer_pool_member_model = {} # LoadBalancerPoolMember
+ 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'
@@ -48641,7 +51862,8 @@ def test_load_balancer_pool_member_collection_serialization(self):
load_balancer_pool_member_collection_model_json2 = load_balancer_pool_member_collection_model.to_dict()
assert load_balancer_pool_member_collection_model_json2 == load_balancer_pool_member_collection_model_json
-class TestModel_LoadBalancerPoolMemberPatch():
+
+class TestModel_LoadBalancerPoolMemberPatch:
"""
Test Class for LoadBalancerPoolMemberPatch
"""
@@ -48653,7 +51875,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'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
# Construct a json representation of a LoadBalancerPoolMemberPatch model
@@ -48677,7 +51899,8 @@ def test_load_balancer_pool_member_patch_serialization(self):
load_balancer_pool_member_patch_model_json2 = load_balancer_pool_member_patch_model.to_dict()
assert load_balancer_pool_member_patch_model_json2 == load_balancer_pool_member_patch_model_json
-class TestModel_LoadBalancerPoolMemberPrototype():
+
+class TestModel_LoadBalancerPoolMemberPrototype:
"""
Test Class for LoadBalancerPoolMemberPrototype
"""
@@ -48689,7 +51912,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'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
# Construct a json representation of a LoadBalancerPoolMemberPrototype model
@@ -48713,7 +51936,8 @@ def test_load_balancer_pool_member_prototype_serialization(self):
load_balancer_pool_member_prototype_model_json2 = load_balancer_pool_member_prototype_model.to_dict()
assert load_balancer_pool_member_prototype_model_json2 == load_balancer_pool_member_prototype_model_json
-class TestModel_LoadBalancerPoolMemberReference():
+
+class TestModel_LoadBalancerPoolMemberReference:
"""
Test Class for LoadBalancerPoolMemberReference
"""
@@ -48725,7 +51949,7 @@ def test_load_balancer_pool_member_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
+ load_balancer_pool_member_reference_deleted_model = {} # LoadBalancerPoolMemberReferenceDeleted
load_balancer_pool_member_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerPoolMemberReference model
@@ -48749,7 +51973,8 @@ def test_load_balancer_pool_member_reference_serialization(self):
load_balancer_pool_member_reference_model_json2 = load_balancer_pool_member_reference_model.to_dict()
assert load_balancer_pool_member_reference_model_json2 == load_balancer_pool_member_reference_model_json
-class TestModel_LoadBalancerPoolMemberReferenceDeleted():
+
+class TestModel_LoadBalancerPoolMemberReferenceDeleted:
"""
Test Class for LoadBalancerPoolMemberReferenceDeleted
"""
@@ -48778,7 +52003,8 @@ def test_load_balancer_pool_member_reference_deleted_serialization(self):
load_balancer_pool_member_reference_deleted_model_json2 = load_balancer_pool_member_reference_deleted_model.to_dict()
assert load_balancer_pool_member_reference_deleted_model_json2 == load_balancer_pool_member_reference_deleted_model_json
-class TestModel_LoadBalancerPoolPatch():
+
+class TestModel_LoadBalancerPoolPatch:
"""
Test Class for LoadBalancerPoolPatch
"""
@@ -48790,7 +52016,7 @@ def test_load_balancer_pool_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_health_monitor_patch_model = {} # LoadBalancerPoolHealthMonitorPatch
+ load_balancer_pool_health_monitor_patch_model = {} # LoadBalancerPoolHealthMonitorPatch
load_balancer_pool_health_monitor_patch_model['delay'] = 5
load_balancer_pool_health_monitor_patch_model['max_retries'] = 2
load_balancer_pool_health_monitor_patch_model['port'] = 22
@@ -48798,7 +52024,7 @@ def test_load_balancer_pool_patch_serialization(self):
load_balancer_pool_health_monitor_patch_model['type'] = 'http'
load_balancer_pool_health_monitor_patch_model['url_path'] = '/'
- load_balancer_pool_session_persistence_patch_model = {} # LoadBalancerPoolSessionPersistencePatch
+ load_balancer_pool_session_persistence_patch_model = {} # LoadBalancerPoolSessionPersistencePatch
load_balancer_pool_session_persistence_patch_model['cookie_name'] = 'my-cookie-name'
load_balancer_pool_session_persistence_patch_model['type'] = 'app_cookie'
@@ -48826,7 +52052,8 @@ def test_load_balancer_pool_patch_serialization(self):
load_balancer_pool_patch_model_json2 = load_balancer_pool_patch_model.to_dict()
assert load_balancer_pool_patch_model_json2 == load_balancer_pool_patch_model_json
-class TestModel_LoadBalancerPoolPrototype():
+
+class TestModel_LoadBalancerPoolPrototype:
"""
Test Class for LoadBalancerPoolPrototype
"""
@@ -48838,7 +52065,7 @@ def test_load_balancer_pool_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_health_monitor_prototype_model = {} # LoadBalancerPoolHealthMonitorPrototype
+ load_balancer_pool_health_monitor_prototype_model = {} # LoadBalancerPoolHealthMonitorPrototype
load_balancer_pool_health_monitor_prototype_model['delay'] = 5
load_balancer_pool_health_monitor_prototype_model['max_retries'] = 2
load_balancer_pool_health_monitor_prototype_model['port'] = 22
@@ -48846,15 +52073,15 @@ 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'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- load_balancer_pool_member_prototype_model = {} # LoadBalancerPoolMemberPrototype
+ load_balancer_pool_member_prototype_model = {} # LoadBalancerPoolMemberPrototype
load_balancer_pool_member_prototype_model['port'] = 80
load_balancer_pool_member_prototype_model['target'] = load_balancer_pool_member_target_prototype_model
load_balancer_pool_member_prototype_model['weight'] = 50
- load_balancer_pool_session_persistence_prototype_model = {} # LoadBalancerPoolSessionPersistencePrototype
+ load_balancer_pool_session_persistence_prototype_model = {} # LoadBalancerPoolSessionPersistencePrototype
load_balancer_pool_session_persistence_prototype_model['cookie_name'] = 'my-cookie-name'
load_balancer_pool_session_persistence_prototype_model['type'] = 'app_cookie'
@@ -48883,7 +52110,8 @@ def test_load_balancer_pool_prototype_serialization(self):
load_balancer_pool_prototype_model_json2 = load_balancer_pool_prototype_model.to_dict()
assert load_balancer_pool_prototype_model_json2 == load_balancer_pool_prototype_model_json
-class TestModel_LoadBalancerPoolReference():
+
+class TestModel_LoadBalancerPoolReference:
"""
Test Class for LoadBalancerPoolReference
"""
@@ -48895,7 +52123,7 @@ def test_load_balancer_pool_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerPoolReference model
@@ -48920,7 +52148,8 @@ def test_load_balancer_pool_reference_serialization(self):
load_balancer_pool_reference_model_json2 = load_balancer_pool_reference_model.to_dict()
assert load_balancer_pool_reference_model_json2 == load_balancer_pool_reference_model_json
-class TestModel_LoadBalancerPoolReferenceDeleted():
+
+class TestModel_LoadBalancerPoolReferenceDeleted:
"""
Test Class for LoadBalancerPoolReferenceDeleted
"""
@@ -48949,7 +52178,8 @@ def test_load_balancer_pool_reference_deleted_serialization(self):
load_balancer_pool_reference_deleted_model_json2 = load_balancer_pool_reference_deleted_model.to_dict()
assert load_balancer_pool_reference_deleted_model_json2 == load_balancer_pool_reference_deleted_model_json
-class TestModel_LoadBalancerPoolSessionPersistence():
+
+class TestModel_LoadBalancerPoolSessionPersistence:
"""
Test Class for LoadBalancerPoolSessionPersistence
"""
@@ -48979,7 +52209,8 @@ def test_load_balancer_pool_session_persistence_serialization(self):
load_balancer_pool_session_persistence_model_json2 = load_balancer_pool_session_persistence_model.to_dict()
assert load_balancer_pool_session_persistence_model_json2 == load_balancer_pool_session_persistence_model_json
-class TestModel_LoadBalancerPoolSessionPersistencePatch():
+
+class TestModel_LoadBalancerPoolSessionPersistencePatch:
"""
Test Class for LoadBalancerPoolSessionPersistencePatch
"""
@@ -49009,7 +52240,8 @@ def test_load_balancer_pool_session_persistence_patch_serialization(self):
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():
+
+class TestModel_LoadBalancerPoolSessionPersistencePrototype:
"""
Test Class for LoadBalancerPoolSessionPersistencePrototype
"""
@@ -49039,7 +52271,8 @@ def test_load_balancer_pool_session_persistence_prototype_serialization(self):
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_LoadBalancerPrivateIpsItem():
+
+class TestModel_LoadBalancerPrivateIpsItem:
"""
Test Class for LoadBalancerPrivateIpsItem
"""
@@ -49051,7 +52284,7 @@ def test_load_balancer_private_ips_item_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerPrivateIpsItem model
@@ -49078,7 +52311,8 @@ def test_load_balancer_private_ips_item_serialization(self):
load_balancer_private_ips_item_model_json2 = load_balancer_private_ips_item_model.to_dict()
assert load_balancer_private_ips_item_model_json2 == load_balancer_private_ips_item_model_json
-class TestModel_LoadBalancerProfile():
+
+class TestModel_LoadBalancerProfile:
"""
Test Class for LoadBalancerProfile
"""
@@ -49090,19 +52324,19 @@ def test_load_balancer_profile_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_profile_logging_supported_model = {} # LoadBalancerProfileLoggingSupported
+ load_balancer_profile_logging_supported_model = {} # LoadBalancerProfileLoggingSupported
load_balancer_profile_logging_supported_model['type'] = 'fixed'
load_balancer_profile_logging_supported_model['value'] = ['datapath']
- load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed
+ load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed
load_balancer_profile_route_mode_supported_model['type'] = 'fixed'
load_balancer_profile_route_mode_supported_model['value'] = True
- load_balancer_profile_security_groups_supported_model = {} # LoadBalancerProfileSecurityGroupsSupportedFixed
+ load_balancer_profile_security_groups_supported_model = {} # LoadBalancerProfileSecurityGroupsSupportedFixed
load_balancer_profile_security_groups_supported_model['type'] = 'fixed'
load_balancer_profile_security_groups_supported_model['value'] = True
- load_balancer_profile_udp_supported_model = {} # LoadBalancerProfileUDPSupportedFixed
+ load_balancer_profile_udp_supported_model = {} # LoadBalancerProfileUDPSupportedFixed
load_balancer_profile_udp_supported_model['type'] = 'fixed'
load_balancer_profile_udp_supported_model['value'] = True
@@ -49131,7 +52365,8 @@ def test_load_balancer_profile_serialization(self):
load_balancer_profile_model_json2 = load_balancer_profile_model.to_dict()
assert load_balancer_profile_model_json2 == load_balancer_profile_model_json
-class TestModel_LoadBalancerProfileCollection():
+
+class TestModel_LoadBalancerProfileCollection:
"""
Test Class for LoadBalancerProfileCollection
"""
@@ -49143,29 +52378,29 @@ def test_load_balancer_profile_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_profile_collection_first_model = {} # LoadBalancerProfileCollectionFirst
+ load_balancer_profile_collection_first_model = {} # LoadBalancerProfileCollectionFirst
load_balancer_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20'
- load_balancer_profile_collection_next_model = {} # LoadBalancerProfileCollectionNext
+ load_balancer_profile_collection_next_model = {} # LoadBalancerProfileCollectionNext
load_balancer_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- load_balancer_profile_logging_supported_model = {} # LoadBalancerProfileLoggingSupported
+ load_balancer_profile_logging_supported_model = {} # LoadBalancerProfileLoggingSupported
load_balancer_profile_logging_supported_model['type'] = 'fixed'
load_balancer_profile_logging_supported_model['value'] = ['datapath']
- load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed
+ load_balancer_profile_route_mode_supported_model = {} # LoadBalancerProfileRouteModeSupportedFixed
load_balancer_profile_route_mode_supported_model['type'] = 'fixed'
load_balancer_profile_route_mode_supported_model['value'] = True
- load_balancer_profile_security_groups_supported_model = {} # LoadBalancerProfileSecurityGroupsSupportedFixed
+ load_balancer_profile_security_groups_supported_model = {} # LoadBalancerProfileSecurityGroupsSupportedFixed
load_balancer_profile_security_groups_supported_model['type'] = 'fixed'
load_balancer_profile_security_groups_supported_model['value'] = True
- load_balancer_profile_udp_supported_model = {} # LoadBalancerProfileUDPSupportedFixed
+ load_balancer_profile_udp_supported_model = {} # LoadBalancerProfileUDPSupportedFixed
load_balancer_profile_udp_supported_model['type'] = 'fixed'
load_balancer_profile_udp_supported_model['value'] = True
- load_balancer_profile_model = {} # LoadBalancerProfile
+ load_balancer_profile_model = {} # LoadBalancerProfile
load_balancer_profile_model['family'] = 'network'
load_balancer_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed'
load_balancer_profile_model['logging_supported'] = load_balancer_profile_logging_supported_model
@@ -49197,7 +52432,8 @@ def test_load_balancer_profile_collection_serialization(self):
load_balancer_profile_collection_model_json2 = load_balancer_profile_collection_model.to_dict()
assert load_balancer_profile_collection_model_json2 == load_balancer_profile_collection_model_json
-class TestModel_LoadBalancerProfileCollectionFirst():
+
+class TestModel_LoadBalancerProfileCollectionFirst:
"""
Test Class for LoadBalancerProfileCollectionFirst
"""
@@ -49226,7 +52462,8 @@ def test_load_balancer_profile_collection_first_serialization(self):
load_balancer_profile_collection_first_model_json2 = load_balancer_profile_collection_first_model.to_dict()
assert load_balancer_profile_collection_first_model_json2 == load_balancer_profile_collection_first_model_json
-class TestModel_LoadBalancerProfileCollectionNext():
+
+class TestModel_LoadBalancerProfileCollectionNext:
"""
Test Class for LoadBalancerProfileCollectionNext
"""
@@ -49255,7 +52492,8 @@ def test_load_balancer_profile_collection_next_serialization(self):
load_balancer_profile_collection_next_model_json2 = load_balancer_profile_collection_next_model.to_dict()
assert load_balancer_profile_collection_next_model_json2 == load_balancer_profile_collection_next_model_json
-class TestModel_LoadBalancerProfileLoggingSupported():
+
+class TestModel_LoadBalancerProfileLoggingSupported:
"""
Test Class for LoadBalancerProfileLoggingSupported
"""
@@ -49285,7 +52523,8 @@ def test_load_balancer_profile_logging_supported_serialization(self):
load_balancer_profile_logging_supported_model_json2 = load_balancer_profile_logging_supported_model.to_dict()
assert load_balancer_profile_logging_supported_model_json2 == load_balancer_profile_logging_supported_model_json
-class TestModel_LoadBalancerProfileReference():
+
+class TestModel_LoadBalancerProfileReference:
"""
Test Class for LoadBalancerProfileReference
"""
@@ -49316,7 +52555,8 @@ def test_load_balancer_profile_reference_serialization(self):
load_balancer_profile_reference_model_json2 = load_balancer_profile_reference_model.to_dict()
assert load_balancer_profile_reference_model_json2 == load_balancer_profile_reference_model_json
-class TestModel_LoadBalancerReferenceDeleted():
+
+class TestModel_LoadBalancerReferenceDeleted:
"""
Test Class for LoadBalancerReferenceDeleted
"""
@@ -49345,7 +52585,8 @@ def test_load_balancer_reference_deleted_serialization(self):
load_balancer_reference_deleted_model_json2 = load_balancer_reference_deleted_model.to_dict()
assert load_balancer_reference_deleted_model_json2 == load_balancer_reference_deleted_model_json
-class TestModel_LoadBalancerStatistics():
+
+class TestModel_LoadBalancerStatistics:
"""
Test Class for LoadBalancerStatistics
"""
@@ -49377,7 +52618,8 @@ def test_load_balancer_statistics_serialization(self):
load_balancer_statistics_model_json2 = load_balancer_statistics_model.to_dict()
assert load_balancer_statistics_model_json2 == load_balancer_statistics_model_json
-class TestModel_NetworkACL():
+
+class TestModel_NetworkACL:
"""
Test Class for NetworkACL
"""
@@ -49389,21 +52631,21 @@ 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 = {} # 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'
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['name'] = 'my-rule-1'
- network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
+ network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
network_acl_rule_item_model['action'] = 'allow'
network_acl_rule_item_model['before'] = network_acl_rule_reference_model
network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -49420,10 +52662,10 @@ def test_network_acl_serialization(self):
network_acl_rule_item_model['source_port_max'] = 65535
network_acl_rule_item_model['source_port_min'] = 49152
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -49431,10 +52673,10 @@ def test_network_acl_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -49469,7 +52711,8 @@ def test_network_acl_serialization(self):
network_acl_model_json2 = network_acl_model.to_dict()
assert network_acl_model_json2 == network_acl_model_json
-class TestModel_NetworkACLCollection():
+
+class TestModel_NetworkACLCollection:
"""
Test Class for NetworkACLCollection
"""
@@ -49481,24 +52724,24 @@ def test_network_acl_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_collection_first_model = {} # NetworkACLCollectionFirst
+ network_acl_collection_first_model = {} # NetworkACLCollectionFirst
network_acl_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?limit=20'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['name'] = 'my-rule-1'
- network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
+ network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
network_acl_rule_item_model['action'] = 'allow'
network_acl_rule_item_model['before'] = network_acl_rule_reference_model
network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -49515,10 +52758,10 @@ def test_network_acl_collection_serialization(self):
network_acl_rule_item_model['source_port_max'] = 65535
network_acl_rule_item_model['source_port_min'] = 49152
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -49526,10 +52769,10 @@ def test_network_acl_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -49537,7 +52780,7 @@ def test_network_acl_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- network_acl_model = {} # NetworkACL
+ 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/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf'
@@ -49548,7 +52791,7 @@ def test_network_acl_collection_serialization(self):
network_acl_model['subnets'] = [subnet_reference_model]
network_acl_model['vpc'] = vpc_reference_model
- network_acl_collection_next_model = {} # NetworkACLCollectionNext
+ network_acl_collection_next_model = {} # NetworkACLCollectionNext
network_acl_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
# Construct a json representation of a NetworkACLCollection model
@@ -49574,7 +52817,8 @@ def test_network_acl_collection_serialization(self):
network_acl_collection_model_json2 = network_acl_collection_model.to_dict()
assert network_acl_collection_model_json2 == network_acl_collection_model_json
-class TestModel_NetworkACLCollectionFirst():
+
+class TestModel_NetworkACLCollectionFirst:
"""
Test Class for NetworkACLCollectionFirst
"""
@@ -49603,7 +52847,8 @@ def test_network_acl_collection_first_serialization(self):
network_acl_collection_first_model_json2 = network_acl_collection_first_model.to_dict()
assert network_acl_collection_first_model_json2 == network_acl_collection_first_model_json
-class TestModel_NetworkACLCollectionNext():
+
+class TestModel_NetworkACLCollectionNext:
"""
Test Class for NetworkACLCollectionNext
"""
@@ -49632,7 +52877,8 @@ def test_network_acl_collection_next_serialization(self):
network_acl_collection_next_model_json2 = network_acl_collection_next_model.to_dict()
assert network_acl_collection_next_model_json2 == network_acl_collection_next_model_json
-class TestModel_NetworkACLPatch():
+
+class TestModel_NetworkACLPatch:
"""
Test Class for NetworkACLPatch
"""
@@ -49661,7 +52907,8 @@ def test_network_acl_patch_serialization(self):
network_acl_patch_model_json2 = network_acl_patch_model.to_dict()
assert network_acl_patch_model_json2 == network_acl_patch_model_json
-class TestModel_NetworkACLReference():
+
+class TestModel_NetworkACLReference:
"""
Test Class for NetworkACLReference
"""
@@ -49673,7 +52920,7 @@ def test_network_acl_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
+ network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a NetworkACLReference model
@@ -49699,7 +52946,8 @@ def test_network_acl_reference_serialization(self):
network_acl_reference_model_json2 = network_acl_reference_model.to_dict()
assert network_acl_reference_model_json2 == network_acl_reference_model_json
-class TestModel_NetworkACLReferenceDeleted():
+
+class TestModel_NetworkACLReferenceDeleted:
"""
Test Class for NetworkACLReferenceDeleted
"""
@@ -49728,7 +52976,8 @@ def test_network_acl_reference_deleted_serialization(self):
network_acl_reference_deleted_model_json2 = network_acl_reference_deleted_model.to_dict()
assert network_acl_reference_deleted_model_json2 == network_acl_reference_deleted_model_json
-class TestModel_NetworkACLRuleCollection():
+
+class TestModel_NetworkACLRuleCollection:
"""
Test Class for NetworkACLRuleCollection
"""
@@ -49740,22 +52989,22 @@ def test_network_acl_rule_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_collection_first_model = {} # NetworkACLRuleCollectionFirst
+ network_acl_rule_collection_first_model = {} # NetworkACLRuleCollectionFirst
network_acl_rule_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?limit=20'
- network_acl_rule_collection_next_model = {} # NetworkACLRuleCollectionNext
+ network_acl_rule_collection_next_model = {} # NetworkACLRuleCollectionNext
network_acl_rule_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['name'] = 'my-rule-1'
- network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
+ network_acl_rule_item_model = {} # NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
network_acl_rule_item_model['action'] = 'allow'
network_acl_rule_item_model['before'] = network_acl_rule_reference_model
network_acl_rule_item_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -49795,7 +53044,8 @@ def test_network_acl_rule_collection_serialization(self):
network_acl_rule_collection_model_json2 = network_acl_rule_collection_model.to_dict()
assert network_acl_rule_collection_model_json2 == network_acl_rule_collection_model_json
-class TestModel_NetworkACLRuleCollectionFirst():
+
+class TestModel_NetworkACLRuleCollectionFirst:
"""
Test Class for NetworkACLRuleCollectionFirst
"""
@@ -49824,7 +53074,8 @@ def test_network_acl_rule_collection_first_serialization(self):
network_acl_rule_collection_first_model_json2 = network_acl_rule_collection_first_model.to_dict()
assert network_acl_rule_collection_first_model_json2 == network_acl_rule_collection_first_model_json
-class TestModel_NetworkACLRuleCollectionNext():
+
+class TestModel_NetworkACLRuleCollectionNext:
"""
Test Class for NetworkACLRuleCollectionNext
"""
@@ -49853,7 +53104,8 @@ def test_network_acl_rule_collection_next_serialization(self):
network_acl_rule_collection_next_model_json2 = network_acl_rule_collection_next_model.to_dict()
assert network_acl_rule_collection_next_model_json2 == network_acl_rule_collection_next_model_json
-class TestModel_NetworkACLRulePatch():
+
+class TestModel_NetworkACLRulePatch:
"""
Test Class for NetworkACLRulePatch
"""
@@ -49865,7 +53117,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 = {} # NetworkACLRuleBeforePatchNetworkACLRuleIdentityById
network_acl_rule_before_patch_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
# Construct a json representation of a NetworkACLRulePatch model
@@ -49899,7 +53151,8 @@ def test_network_acl_rule_patch_serialization(self):
network_acl_rule_patch_model_json2 = network_acl_rule_patch_model.to_dict()
assert network_acl_rule_patch_model_json2 == network_acl_rule_patch_model_json
-class TestModel_NetworkACLRuleReference():
+
+class TestModel_NetworkACLRuleReference:
"""
Test Class for NetworkACLRuleReference
"""
@@ -49911,7 +53164,7 @@ def test_network_acl_rule_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a NetworkACLRuleReference model
@@ -49936,7 +53189,8 @@ def test_network_acl_rule_reference_serialization(self):
network_acl_rule_reference_model_json2 = network_acl_rule_reference_model.to_dict()
assert network_acl_rule_reference_model_json2 == network_acl_rule_reference_model_json
-class TestModel_NetworkACLRuleReferenceDeleted():
+
+class TestModel_NetworkACLRuleReferenceDeleted:
"""
Test Class for NetworkACLRuleReferenceDeleted
"""
@@ -49965,7 +53219,8 @@ def test_network_acl_rule_reference_deleted_serialization(self):
network_acl_rule_reference_deleted_model_json2 = network_acl_rule_reference_deleted_model.to_dict()
assert network_acl_rule_reference_deleted_model_json2 == network_acl_rule_reference_deleted_model_json
-class TestModel_NetworkInterface():
+
+class TestModel_NetworkInterface:
"""
Test Class for NetworkInterface
"""
@@ -49977,10 +53232,10 @@ def test_network_interface_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- floating_ip_reference_model = {} # FloatingIPReference
+ floating_ip_reference_model = {} # FloatingIPReference
floating_ip_reference_model['address'] = '192.0.2.2'
floating_ip_reference_model['crn'] = 'crn:[...]'
floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model
@@ -49988,10 +53243,10 @@ def test_network_interface_serialization(self):
floating_ip_reference_model['id'] = '181b8670-52bf-47af-a5ca-7aff7f3824d1'
floating_ip_reference_model['name'] = 'my-floating-ip'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '10.0.0.32'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5'
@@ -49999,20 +53254,20 @@ def test_network_interface_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip-1'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:[...]'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589'
security_group_reference_model['id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589'
security_group_reference_model['name'] = 'before-entrance-mountain-paralegal-photo-uninstall'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:[...]'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c'
@@ -50051,7 +53306,8 @@ def test_network_interface_serialization(self):
network_interface_model_json2 = network_interface_model.to_dict()
assert network_interface_model_json2 == network_interface_model_json
-class TestModel_NetworkInterfaceBareMetalServerContextReference():
+
+class TestModel_NetworkInterfaceBareMetalServerContextReference:
"""
Test Class for NetworkInterfaceBareMetalServerContextReference
"""
@@ -50063,13 +53319,13 @@ def test_network_interface_bare_metal_server_context_reference_serialization(sel
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted
+ network_interface_bare_metal_server_context_reference_deleted_model = {} # NetworkInterfaceBareMetalServerContextReferenceDeleted
network_interface_bare_metal_server_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -50077,10 +53333,10 @@ def test_network_interface_bare_metal_server_context_reference_serialization(sel
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -50113,7 +53369,8 @@ def test_network_interface_bare_metal_server_context_reference_serialization(sel
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_NetworkInterfaceBareMetalServerContextReferenceDeleted():
+
+class TestModel_NetworkInterfaceBareMetalServerContextReferenceDeleted:
"""
Test Class for NetworkInterfaceBareMetalServerContextReferenceDeleted
"""
@@ -50142,7 +53399,8 @@ def test_network_interface_bare_metal_server_context_reference_deleted_serializa
network_interface_bare_metal_server_context_reference_deleted_model_json2 = network_interface_bare_metal_server_context_reference_deleted_model.to_dict()
assert network_interface_bare_metal_server_context_reference_deleted_model_json2 == network_interface_bare_metal_server_context_reference_deleted_model_json
-class TestModel_NetworkInterfaceInstanceContextReference():
+
+class TestModel_NetworkInterfaceInstanceContextReference:
"""
Test Class for NetworkInterfaceInstanceContextReference
"""
@@ -50154,13 +53412,13 @@ def test_network_interface_instance_context_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted
+ network_interface_instance_context_reference_deleted_model = {} # NetworkInterfaceInstanceContextReferenceDeleted
network_interface_instance_context_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -50168,10 +53426,10 @@ def test_network_interface_instance_context_reference_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -50204,7 +53462,8 @@ def test_network_interface_instance_context_reference_serialization(self):
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_NetworkInterfaceInstanceContextReferenceDeleted():
+
+class TestModel_NetworkInterfaceInstanceContextReferenceDeleted:
"""
Test Class for NetworkInterfaceInstanceContextReferenceDeleted
"""
@@ -50233,7 +53492,8 @@ def test_network_interface_instance_context_reference_deleted_serialization(self
network_interface_instance_context_reference_deleted_model_json2 = network_interface_instance_context_reference_deleted_model.to_dict()
assert network_interface_instance_context_reference_deleted_model_json2 == network_interface_instance_context_reference_deleted_model_json
-class TestModel_NetworkInterfacePatch():
+
+class TestModel_NetworkInterfacePatch:
"""
Test Class for NetworkInterfacePatch
"""
@@ -50263,7 +53523,8 @@ def test_network_interface_patch_serialization(self):
network_interface_patch_model_json2 = network_interface_patch_model.to_dict()
assert network_interface_patch_model_json2 == network_interface_patch_model_json
-class TestModel_NetworkInterfacePrototype():
+
+class TestModel_NetworkInterfacePrototype:
"""
Test Class for NetworkInterfacePrototype
"""
@@ -50275,15 +53536,15 @@ def test_network_interface_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
network_interface_ip_prototype_model['address'] = '10.0.0.5'
network_interface_ip_prototype_model['auto_delete'] = False
network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
- security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model = {} # SecurityGroupIdentityById
security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a NetworkInterfacePrototype model
@@ -50309,7 +53570,8 @@ def test_network_interface_prototype_serialization(self):
network_interface_prototype_model_json2 = network_interface_prototype_model.to_dict()
assert network_interface_prototype_model_json2 == network_interface_prototype_model_json
-class TestModel_NetworkInterfaceReferenceDeleted():
+
+class TestModel_NetworkInterfaceReferenceDeleted:
"""
Test Class for NetworkInterfaceReferenceDeleted
"""
@@ -50338,7 +53600,8 @@ def test_network_interface_reference_deleted_serialization(self):
network_interface_reference_deleted_model_json2 = network_interface_reference_deleted_model.to_dict()
assert network_interface_reference_deleted_model_json2 == network_interface_reference_deleted_model_json
-class TestModel_NetworkInterfaceReferenceTargetContextDeleted():
+
+class TestModel_NetworkInterfaceReferenceTargetContextDeleted:
"""
Test Class for NetworkInterfaceReferenceTargetContextDeleted
"""
@@ -50367,7 +53630,8 @@ def test_network_interface_reference_target_context_deleted_serialization(self):
network_interface_reference_target_context_deleted_model_json2 = network_interface_reference_target_context_deleted_model.to_dict()
assert network_interface_reference_target_context_deleted_model_json2 == network_interface_reference_target_context_deleted_model_json
-class TestModel_NetworkInterfaceUnpaginatedCollection():
+
+class TestModel_NetworkInterfaceUnpaginatedCollection:
"""
Test Class for NetworkInterfaceUnpaginatedCollection
"""
@@ -50379,10 +53643,10 @@ def test_network_interface_unpaginated_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- floating_ip_reference_model = {} # FloatingIPReference
+ floating_ip_reference_model = {} # FloatingIPReference
floating_ip_reference_model['address'] = '192.0.2.2'
floating_ip_reference_model['crn'] = 'crn:[...]'
floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model
@@ -50390,10 +53654,10 @@ def test_network_interface_unpaginated_collection_serialization(self):
floating_ip_reference_model['id'] = '181b8670-52bf-47af-a5ca-7aff7f3824d1'
floating_ip_reference_model['name'] = 'my-floating-ip'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '10.0.0.32'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5'
@@ -50401,20 +53665,20 @@ def test_network_interface_unpaginated_collection_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip-1'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:[...]'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/a929f12d-fb45-4e5e-9864-95e171ae3589'
security_group_reference_model['id'] = 'a929f12d-fb45-4e5e-9864-95e171ae3589'
security_group_reference_model['name'] = 'before-entrance-mountain-paralegal-photo-uninstall'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:[...]'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/9270d819-c05e-4352-99e4-80c4680cdb7c'
@@ -50422,7 +53686,7 @@ def test_network_interface_unpaginated_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- network_interface_model = {} # NetworkInterface
+ network_interface_model = {} # NetworkInterface
network_interface_model['allow_ip_spoofing'] = False
network_interface_model['created_at'] = '2019-01-31T03:42:32.993000Z'
network_interface_model['floating_ips'] = [floating_ip_reference_model]
@@ -50456,7 +53720,8 @@ def test_network_interface_unpaginated_collection_serialization(self):
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
-class TestModel_OperatingSystem():
+
+class TestModel_OperatingSystem:
"""
Test Class for OperatingSystem
"""
@@ -50492,7 +53757,8 @@ def test_operating_system_serialization(self):
operating_system_model_json2 = operating_system_model.to_dict()
assert operating_system_model_json2 == operating_system_model_json
-class TestModel_OperatingSystemCollection():
+
+class TestModel_OperatingSystemCollection:
"""
Test Class for OperatingSystemCollection
"""
@@ -50504,13 +53770,13 @@ def test_operating_system_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- operating_system_collection_first_model = {} # OperatingSystemCollectionFirst
+ operating_system_collection_first_model = {} # OperatingSystemCollectionFirst
operating_system_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?limit=20'
- operating_system_collection_next_model = {} # OperatingSystemCollectionNext
+ operating_system_collection_next_model = {} # OperatingSystemCollectionNext
operating_system_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/operating_systems?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -50542,7 +53808,8 @@ def test_operating_system_collection_serialization(self):
operating_system_collection_model_json2 = operating_system_collection_model.to_dict()
assert operating_system_collection_model_json2 == operating_system_collection_model_json
-class TestModel_OperatingSystemCollectionFirst():
+
+class TestModel_OperatingSystemCollectionFirst:
"""
Test Class for OperatingSystemCollectionFirst
"""
@@ -50571,7 +53838,8 @@ def test_operating_system_collection_first_serialization(self):
operating_system_collection_first_model_json2 = operating_system_collection_first_model.to_dict()
assert operating_system_collection_first_model_json2 == operating_system_collection_first_model_json
-class TestModel_OperatingSystemCollectionNext():
+
+class TestModel_OperatingSystemCollectionNext:
"""
Test Class for OperatingSystemCollectionNext
"""
@@ -50600,7 +53868,8 @@ def test_operating_system_collection_next_serialization(self):
operating_system_collection_next_model_json2 = operating_system_collection_next_model.to_dict()
assert operating_system_collection_next_model_json2 == operating_system_collection_next_model_json
-class TestModel_PlacementGroup():
+
+class TestModel_PlacementGroup:
"""
Test Class for PlacementGroup
"""
@@ -50612,7 +53881,7 @@ 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 = {} # 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['name'] = 'Default'
@@ -50644,7 +53913,8 @@ def test_placement_group_serialization(self):
placement_group_model_json2 = placement_group_model.to_dict()
assert placement_group_model_json2 == placement_group_model_json
-class TestModel_PlacementGroupCollection():
+
+class TestModel_PlacementGroupCollection:
"""
Test Class for PlacementGroupCollection
"""
@@ -50656,18 +53926,18 @@ def test_placement_group_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- placement_group_collection_first_model = {} # PlacementGroupCollectionFirst
+ placement_group_collection_first_model = {} # PlacementGroupCollectionFirst
placement_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?limit=50'
- placement_group_collection_next_model = {} # PlacementGroupCollectionNext
+ placement_group_collection_next_model = {} # PlacementGroupCollectionNext
placement_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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['name'] = 'Default'
- placement_group_model = {} # PlacementGroup
+ placement_group_model = {} # PlacementGroup
placement_group_model['created_at'] = '2020-12-29T19:55:00Z'
placement_group_model['crn'] = 'crn:[...]'
placement_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/placement_groups/r018-418fe842-a3e9-47b9-a938-1aa5bd632871'
@@ -50701,7 +53971,8 @@ def test_placement_group_collection_serialization(self):
placement_group_collection_model_json2 = placement_group_collection_model.to_dict()
assert placement_group_collection_model_json2 == placement_group_collection_model_json
-class TestModel_PlacementGroupCollectionFirst():
+
+class TestModel_PlacementGroupCollectionFirst:
"""
Test Class for PlacementGroupCollectionFirst
"""
@@ -50730,7 +54001,8 @@ def test_placement_group_collection_first_serialization(self):
placement_group_collection_first_model_json2 = placement_group_collection_first_model.to_dict()
assert placement_group_collection_first_model_json2 == placement_group_collection_first_model_json
-class TestModel_PlacementGroupCollectionNext():
+
+class TestModel_PlacementGroupCollectionNext:
"""
Test Class for PlacementGroupCollectionNext
"""
@@ -50759,7 +54031,8 @@ def test_placement_group_collection_next_serialization(self):
placement_group_collection_next_model_json2 = placement_group_collection_next_model.to_dict()
assert placement_group_collection_next_model_json2 == placement_group_collection_next_model_json
-class TestModel_PlacementGroupPatch():
+
+class TestModel_PlacementGroupPatch:
"""
Test Class for PlacementGroupPatch
"""
@@ -50788,7 +54061,8 @@ def test_placement_group_patch_serialization(self):
placement_group_patch_model_json2 = placement_group_patch_model.to_dict()
assert placement_group_patch_model_json2 == placement_group_patch_model_json
-class TestModel_PlacementGroupReferenceDeleted():
+
+class TestModel_PlacementGroupReferenceDeleted:
"""
Test Class for PlacementGroupReferenceDeleted
"""
@@ -50817,7 +54091,8 @@ def test_placement_group_reference_deleted_serialization(self):
placement_group_reference_deleted_model_json2 = placement_group_reference_deleted_model.to_dict()
assert placement_group_reference_deleted_model_json2 == placement_group_reference_deleted_model_json
-class TestModel_PublicGateway():
+
+class TestModel_PublicGateway:
"""
Test Class for PublicGateway
"""
@@ -50829,10 +54104,10 @@ def test_public_gateway_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- public_gateway_floating_ip_model = {} # PublicGatewayFloatingIp
+ public_gateway_floating_ip_model = {} # 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/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
public_gateway_floating_ip_model['deleted'] = floating_ip_reference_deleted_model
@@ -50840,15 +54115,15 @@ def test_public_gateway_serialization(self):
public_gateway_floating_ip_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689'
public_gateway_floating_ip_model['name'] = 'my-floating-ip'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -50856,7 +54131,7 @@ def test_public_gateway_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -50889,7 +54164,8 @@ def test_public_gateway_serialization(self):
public_gateway_model_json2 = public_gateway_model.to_dict()
assert public_gateway_model_json2 == public_gateway_model_json
-class TestModel_PublicGatewayCollection():
+
+class TestModel_PublicGatewayCollection:
"""
Test Class for PublicGatewayCollection
"""
@@ -50901,16 +54177,16 @@ def test_public_gateway_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- public_gateway_collection_first_model = {} # PublicGatewayCollectionFirst
+ public_gateway_collection_first_model = {} # PublicGatewayCollectionFirst
public_gateway_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?limit=20'
- public_gateway_collection_next_model = {} # PublicGatewayCollectionNext
+ public_gateway_collection_next_model = {} # PublicGatewayCollectionNext
public_gateway_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- public_gateway_floating_ip_model = {} # PublicGatewayFloatingIp
+ public_gateway_floating_ip_model = {} # 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/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
public_gateway_floating_ip_model['deleted'] = floating_ip_reference_deleted_model
@@ -50918,15 +54194,15 @@ def test_public_gateway_collection_serialization(self):
public_gateway_floating_ip_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689'
public_gateway_floating_ip_model['name'] = 'my-floating-ip'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -50934,11 +54210,11 @@ def test_public_gateway_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
- public_gateway_model = {} # PublicGateway
+ 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/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241'
public_gateway_model['floating_ip'] = public_gateway_floating_ip_model
@@ -50974,7 +54250,8 @@ def test_public_gateway_collection_serialization(self):
public_gateway_collection_model_json2 = public_gateway_collection_model.to_dict()
assert public_gateway_collection_model_json2 == public_gateway_collection_model_json
-class TestModel_PublicGatewayCollectionFirst():
+
+class TestModel_PublicGatewayCollectionFirst:
"""
Test Class for PublicGatewayCollectionFirst
"""
@@ -51003,7 +54280,8 @@ def test_public_gateway_collection_first_serialization(self):
public_gateway_collection_first_model_json2 = public_gateway_collection_first_model.to_dict()
assert public_gateway_collection_first_model_json2 == public_gateway_collection_first_model_json
-class TestModel_PublicGatewayCollectionNext():
+
+class TestModel_PublicGatewayCollectionNext:
"""
Test Class for PublicGatewayCollectionNext
"""
@@ -51032,7 +54310,8 @@ def test_public_gateway_collection_next_serialization(self):
public_gateway_collection_next_model_json2 = public_gateway_collection_next_model.to_dict()
assert public_gateway_collection_next_model_json2 == public_gateway_collection_next_model_json
-class TestModel_PublicGatewayFloatingIp():
+
+class TestModel_PublicGatewayFloatingIp:
"""
Test Class for PublicGatewayFloatingIp
"""
@@ -51044,7 +54323,7 @@ def test_public_gateway_floating_ip_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a PublicGatewayFloatingIp model
@@ -51071,7 +54350,8 @@ def test_public_gateway_floating_ip_serialization(self):
public_gateway_floating_ip_model_json2 = public_gateway_floating_ip_model.to_dict()
assert public_gateway_floating_ip_model_json2 == public_gateway_floating_ip_model_json
-class TestModel_PublicGatewayPatch():
+
+class TestModel_PublicGatewayPatch:
"""
Test Class for PublicGatewayPatch
"""
@@ -51100,7 +54380,8 @@ def test_public_gateway_patch_serialization(self):
public_gateway_patch_model_json2 = public_gateway_patch_model.to_dict()
assert public_gateway_patch_model_json2 == public_gateway_patch_model_json
-class TestModel_PublicGatewayReference():
+
+class TestModel_PublicGatewayReference:
"""
Test Class for PublicGatewayReference
"""
@@ -51112,7 +54393,7 @@ def test_public_gateway_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
+ public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a PublicGatewayReference model
@@ -51139,7 +54420,8 @@ def test_public_gateway_reference_serialization(self):
public_gateway_reference_model_json2 = public_gateway_reference_model.to_dict()
assert public_gateway_reference_model_json2 == public_gateway_reference_model_json
-class TestModel_PublicGatewayReferenceDeleted():
+
+class TestModel_PublicGatewayReferenceDeleted:
"""
Test Class for PublicGatewayReferenceDeleted
"""
@@ -51168,7 +54450,8 @@ def test_public_gateway_reference_deleted_serialization(self):
public_gateway_reference_deleted_model_json2 = public_gateway_reference_deleted_model.to_dict()
assert public_gateway_reference_deleted_model_json2 == public_gateway_reference_deleted_model_json
-class TestModel_Region():
+
+class TestModel_Region:
"""
Test Class for Region
"""
@@ -51200,7 +54483,8 @@ def test_region_serialization(self):
region_model_json2 = region_model.to_dict()
assert region_model_json2 == region_model_json
-class TestModel_RegionCollection():
+
+class TestModel_RegionCollection:
"""
Test Class for RegionCollection
"""
@@ -51212,7 +54496,7 @@ def test_region_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- region_model = {} # Region
+ region_model = {} # Region
region_model['endpoint'] = 'testString'
region_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south'
region_model['name'] = 'us-south'
@@ -51237,7 +54521,8 @@ def test_region_collection_serialization(self):
region_collection_model_json2 = region_collection_model.to_dict()
assert region_collection_model_json2 == region_collection_model_json
-class TestModel_RegionReference():
+
+class TestModel_RegionReference:
"""
Test Class for RegionReference
"""
@@ -51267,7 +54552,8 @@ def test_region_reference_serialization(self):
region_reference_model_json2 = region_reference_model.to_dict()
assert region_reference_model_json2 == region_reference_model_json
-class TestModel_ReservedIP():
+
+class TestModel_ReservedIP:
"""
Test Class for ReservedIP
"""
@@ -51279,10 +54565,10 @@ def test_reserved_ip_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
+ endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
+ reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model
reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
@@ -51318,7 +54604,8 @@ def test_reserved_ip_serialization(self):
reserved_ip_model_json2 = reserved_ip_model.to_dict()
assert reserved_ip_model_json2 == reserved_ip_model_json
-class TestModel_ReservedIPCollection():
+
+class TestModel_ReservedIPCollection:
"""
Test Class for ReservedIPCollection
"""
@@ -51330,16 +54617,16 @@ def test_reserved_ip_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_collection_first_model = {} # ReservedIPCollectionFirst
+ reserved_ip_collection_first_model = {} # ReservedIPCollectionFirst
reserved_ip_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?limit=20'
- reserved_ip_collection_next_model = {} # ReservedIPCollectionNext
+ reserved_ip_collection_next_model = {} # ReservedIPCollectionNext
reserved_ip_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
+ endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
+ reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model
reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
@@ -51347,7 +54634,7 @@ def test_reserved_ip_collection_serialization(self):
reserved_ip_target_model['name'] = 'my-endpoint-gateway'
reserved_ip_target_model['resource_type'] = 'endpoint_gateway'
- reserved_ip_model = {} # ReservedIP
+ reserved_ip_model = {} # ReservedIP
reserved_ip_model['address'] = '192.168.3.4'
reserved_ip_model['auto_delete'] = False
reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -51382,7 +54669,8 @@ def test_reserved_ip_collection_serialization(self):
reserved_ip_collection_model_json2 = reserved_ip_collection_model.to_dict()
assert reserved_ip_collection_model_json2 == reserved_ip_collection_model_json
-class TestModel_ReservedIPCollectionEndpointGatewayContext():
+
+class TestModel_ReservedIPCollectionEndpointGatewayContext:
"""
Test Class for ReservedIPCollectionEndpointGatewayContext
"""
@@ -51394,13 +54682,13 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_collection_endpoint_gateway_context_first_model = {} # ReservedIPCollectionEndpointGatewayContextFirst
+ reserved_ip_collection_endpoint_gateway_context_first_model = {} # ReservedIPCollectionEndpointGatewayContextFirst
reserved_ip_collection_endpoint_gateway_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?limit=20'
- endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
+ endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
+ reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model
reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
@@ -51408,7 +54696,7 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self):
reserved_ip_target_model['name'] = 'my-endpoint-gateway'
reserved_ip_target_model['resource_type'] = 'endpoint_gateway'
- reserved_ip_model = {} # ReservedIP
+ reserved_ip_model = {} # ReservedIP
reserved_ip_model['address'] = '192.168.3.4'
reserved_ip_model['auto_delete'] = False
reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -51420,7 +54708,7 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self):
reserved_ip_model['resource_type'] = 'subnet_reserved_ip'
reserved_ip_model['target'] = reserved_ip_target_model
- reserved_ip_collection_endpoint_gateway_context_next_model = {} # ReservedIPCollectionEndpointGatewayContextNext
+ reserved_ip_collection_endpoint_gateway_context_next_model = {} # ReservedIPCollectionEndpointGatewayContextNext
reserved_ip_collection_endpoint_gateway_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/d7cc5196-9864-48c4-82d8-3f30da41fcc5/ips?start=90ac13871b604023ab8b827178518328&limit=20'
# Construct a json representation of a ReservedIPCollectionEndpointGatewayContext model
@@ -51446,7 +54734,8 @@ def test_reserved_ip_collection_endpoint_gateway_context_serialization(self):
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_ReservedIPCollectionEndpointGatewayContextFirst():
+
+class TestModel_ReservedIPCollectionEndpointGatewayContextFirst:
"""
Test Class for ReservedIPCollectionEndpointGatewayContextFirst
"""
@@ -51475,7 +54764,8 @@ def test_reserved_ip_collection_endpoint_gateway_context_first_serialization(sel
reserved_ip_collection_endpoint_gateway_context_first_model_json2 = reserved_ip_collection_endpoint_gateway_context_first_model.to_dict()
assert reserved_ip_collection_endpoint_gateway_context_first_model_json2 == reserved_ip_collection_endpoint_gateway_context_first_model_json
-class TestModel_ReservedIPCollectionEndpointGatewayContextNext():
+
+class TestModel_ReservedIPCollectionEndpointGatewayContextNext:
"""
Test Class for ReservedIPCollectionEndpointGatewayContextNext
"""
@@ -51504,7 +54794,8 @@ def test_reserved_ip_collection_endpoint_gateway_context_next_serialization(self
reserved_ip_collection_endpoint_gateway_context_next_model_json2 = reserved_ip_collection_endpoint_gateway_context_next_model.to_dict()
assert reserved_ip_collection_endpoint_gateway_context_next_model_json2 == reserved_ip_collection_endpoint_gateway_context_next_model_json
-class TestModel_ReservedIPCollectionFirst():
+
+class TestModel_ReservedIPCollectionFirst:
"""
Test Class for ReservedIPCollectionFirst
"""
@@ -51533,7 +54824,8 @@ def test_reserved_ip_collection_first_serialization(self):
reserved_ip_collection_first_model_json2 = reserved_ip_collection_first_model.to_dict()
assert reserved_ip_collection_first_model_json2 == reserved_ip_collection_first_model_json
-class TestModel_ReservedIPCollectionNetworkInterfaceContext():
+
+class TestModel_ReservedIPCollectionNetworkInterfaceContext:
"""
Test Class for ReservedIPCollectionNetworkInterfaceContext
"""
@@ -51545,13 +54837,13 @@ def test_reserved_ip_collection_network_interface_context_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_collection_network_interface_context_first_model = {} # ReservedIPCollectionNetworkInterfaceContextFirst
+ reserved_ip_collection_network_interface_context_first_model = {} # ReservedIPCollectionNetworkInterfaceContextFirst
reserved_ip_collection_network_interface_context_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?limit=20'
- endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
+ endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
+ reserved_ip_target_model = {} # ReservedIPTargetEndpointGatewayReference
reserved_ip_target_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::endpoint-gateway:r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
reserved_ip_target_model['deleted'] = endpoint_gateway_reference_deleted_model
reserved_ip_target_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-d7cc5196-9864-48c4-82d8-3f30da41fcc5'
@@ -51559,7 +54851,7 @@ def test_reserved_ip_collection_network_interface_context_serialization(self):
reserved_ip_target_model['name'] = 'my-endpoint-gateway'
reserved_ip_target_model['resource_type'] = 'endpoint_gateway'
- reserved_ip_model = {} # ReservedIP
+ reserved_ip_model = {} # ReservedIP
reserved_ip_model['address'] = '192.168.3.4'
reserved_ip_model['auto_delete'] = False
reserved_ip_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -51571,7 +54863,7 @@ def test_reserved_ip_collection_network_interface_context_serialization(self):
reserved_ip_model['resource_type'] = 'subnet_reserved_ip'
reserved_ip_model['target'] = reserved_ip_target_model
- reserved_ip_collection_network_interface_context_next_model = {} # ReservedIPCollectionNetworkInterfaceContextNext
+ reserved_ip_collection_network_interface_context_next_model = {} # ReservedIPCollectionNetworkInterfaceContextNext
reserved_ip_collection_network_interface_context_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e/ips?start=a404e343444b4e1095c9edba76672d67&limit=20'
# Construct a json representation of a ReservedIPCollectionNetworkInterfaceContext model
@@ -51597,7 +54889,8 @@ def test_reserved_ip_collection_network_interface_context_serialization(self):
reserved_ip_collection_network_interface_context_model_json2 = reserved_ip_collection_network_interface_context_model.to_dict()
assert reserved_ip_collection_network_interface_context_model_json2 == reserved_ip_collection_network_interface_context_model_json
-class TestModel_ReservedIPCollectionNetworkInterfaceContextFirst():
+
+class TestModel_ReservedIPCollectionNetworkInterfaceContextFirst:
"""
Test Class for ReservedIPCollectionNetworkInterfaceContextFirst
"""
@@ -51626,7 +54919,8 @@ def test_reserved_ip_collection_network_interface_context_first_serialization(se
reserved_ip_collection_network_interface_context_first_model_json2 = reserved_ip_collection_network_interface_context_first_model.to_dict()
assert reserved_ip_collection_network_interface_context_first_model_json2 == reserved_ip_collection_network_interface_context_first_model_json
-class TestModel_ReservedIPCollectionNetworkInterfaceContextNext():
+
+class TestModel_ReservedIPCollectionNetworkInterfaceContextNext:
"""
Test Class for ReservedIPCollectionNetworkInterfaceContextNext
"""
@@ -51655,7 +54949,8 @@ def test_reserved_ip_collection_network_interface_context_next_serialization(sel
reserved_ip_collection_network_interface_context_next_model_json2 = reserved_ip_collection_network_interface_context_next_model.to_dict()
assert reserved_ip_collection_network_interface_context_next_model_json2 == reserved_ip_collection_network_interface_context_next_model_json
-class TestModel_ReservedIPCollectionNext():
+
+class TestModel_ReservedIPCollectionNext:
"""
Test Class for ReservedIPCollectionNext
"""
@@ -51684,7 +54979,8 @@ def test_reserved_ip_collection_next_serialization(self):
reserved_ip_collection_next_model_json2 = reserved_ip_collection_next_model.to_dict()
assert reserved_ip_collection_next_model_json2 == reserved_ip_collection_next_model_json
-class TestModel_ReservedIPPatch():
+
+class TestModel_ReservedIPPatch:
"""
Test Class for ReservedIPPatch
"""
@@ -51714,7 +55010,8 @@ def test_reserved_ip_patch_serialization(self):
reserved_ip_patch_model_json2 = reserved_ip_patch_model.to_dict()
assert reserved_ip_patch_model_json2 == reserved_ip_patch_model_json
-class TestModel_ReservedIPReference():
+
+class TestModel_ReservedIPReference:
"""
Test Class for ReservedIPReference
"""
@@ -51726,7 +55023,7 @@ def test_reserved_ip_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPReference model
@@ -51753,7 +55050,8 @@ def test_reserved_ip_reference_serialization(self):
reserved_ip_reference_model_json2 = reserved_ip_reference_model.to_dict()
assert reserved_ip_reference_model_json2 == reserved_ip_reference_model_json
-class TestModel_ReservedIPReferenceDeleted():
+
+class TestModel_ReservedIPReferenceDeleted:
"""
Test Class for ReservedIPReferenceDeleted
"""
@@ -51782,7 +55080,8 @@ def test_reserved_ip_reference_deleted_serialization(self):
reserved_ip_reference_deleted_model_json2 = reserved_ip_reference_deleted_model.to_dict()
assert reserved_ip_reference_deleted_model_json2 == reserved_ip_reference_deleted_model_json
-class TestModel_ResourceFilter():
+
+class TestModel_ResourceFilter:
"""
Test Class for ResourceFilter
"""
@@ -51811,7 +55110,8 @@ def test_resource_filter_serialization(self):
resource_filter_model_json2 = resource_filter_model.to_dict()
assert resource_filter_model_json2 == resource_filter_model_json
-class TestModel_ResourceGroupReference():
+
+class TestModel_ResourceGroupReference:
"""
Test Class for ResourceGroupReference
"""
@@ -51842,7 +55142,8 @@ def test_resource_group_reference_serialization(self):
resource_group_reference_model_json2 = resource_group_reference_model.to_dict()
assert resource_group_reference_model_json2 == resource_group_reference_model_json
-class TestModel_Route():
+
+class TestModel_Route:
"""
Test Class for Route
"""
@@ -51854,10 +55155,10 @@ def test_route_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- route_next_hop_model = {} # RouteNextHopIP
+ route_next_hop_model = {} # RouteNextHopIP
route_next_hop_model['address'] = '192.168.3.4'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -51889,7 +55190,8 @@ def test_route_serialization(self):
route_model_json2 = route_model.to_dict()
assert route_model_json2 == route_model_json
-class TestModel_RouteCollection():
+
+class TestModel_RouteCollection:
"""
Test Class for RouteCollection
"""
@@ -51901,20 +55203,20 @@ def test_route_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- route_collection_first_model = {} # RouteCollectionFirst
+ route_collection_first_model = {} # RouteCollectionFirst
route_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?limit=20'
- route_collection_next_model = {} # RouteCollectionNext
+ route_collection_next_model = {} # RouteCollectionNext
route_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/1a15dca5-7e33-45e1-b7c5-bc690e569531/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20'
- route_next_hop_model = {} # RouteNextHopIP
+ route_next_hop_model = {} # RouteNextHopIP
route_next_hop_model['address'] = '192.168.3.4'
- zone_reference_model = {} # ZoneReference
+ 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'
- route_model = {} # Route
+ route_model = {} # Route
route_model['action'] = 'delegate'
route_model['created_at'] = '2019-01-01T12:00:00Z'
route_model['destination'] = '192.168.3.0/24'
@@ -51949,7 +55251,8 @@ def test_route_collection_serialization(self):
route_collection_model_json2 = route_collection_model.to_dict()
assert route_collection_model_json2 == route_collection_model_json
-class TestModel_RouteCollectionFirst():
+
+class TestModel_RouteCollectionFirst:
"""
Test Class for RouteCollectionFirst
"""
@@ -51978,7 +55281,8 @@ def test_route_collection_first_serialization(self):
route_collection_first_model_json2 = route_collection_first_model.to_dict()
assert route_collection_first_model_json2 == route_collection_first_model_json
-class TestModel_RouteCollectionNext():
+
+class TestModel_RouteCollectionNext:
"""
Test Class for RouteCollectionNext
"""
@@ -52007,7 +55311,8 @@ def test_route_collection_next_serialization(self):
route_collection_next_model_json2 = route_collection_next_model.to_dict()
assert route_collection_next_model_json2 == route_collection_next_model_json
-class TestModel_RoutePatch():
+
+class TestModel_RoutePatch:
"""
Test Class for RoutePatch
"""
@@ -52019,8 +55324,8 @@ def test_route_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- route_next_hop_patch_model = {} # RouteNextHopPatchRouteNextHopIP
- route_next_hop_patch_model['address'] = '192.168.3.4'
+ route_next_hop_patch_model = {} # RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP
+ route_next_hop_patch_model['address'] = '0.0.0.0'
# Construct a json representation of a RoutePatch model
route_patch_model_json = {}
@@ -52043,7 +55348,8 @@ def test_route_patch_serialization(self):
route_patch_model_json2 = route_patch_model.to_dict()
assert route_patch_model_json2 == route_patch_model_json
-class TestModel_RoutePrototype():
+
+class TestModel_RoutePrototype:
"""
Test Class for RoutePrototype
"""
@@ -52055,10 +55361,10 @@ def test_route_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- route_prototype_next_hop_model = {} # RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP
- route_prototype_next_hop_model['address'] = '192.168.3.4'
+ route_prototype_next_hop_model = {} # RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP
+ route_prototype_next_hop_model['address'] = '0.0.0.0'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a RoutePrototype model
@@ -52085,7 +55391,8 @@ def test_route_prototype_serialization(self):
route_prototype_model_json2 = route_prototype_model.to_dict()
assert route_prototype_model_json2 == route_prototype_model_json
-class TestModel_RouteReference():
+
+class TestModel_RouteReference:
"""
Test Class for RouteReference
"""
@@ -52097,7 +55404,7 @@ def test_route_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- route_reference_deleted_model = {} # RouteReferenceDeleted
+ route_reference_deleted_model = {} # RouteReferenceDeleted
route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a RouteReference model
@@ -52122,7 +55429,8 @@ def test_route_reference_serialization(self):
route_reference_model_json2 = route_reference_model.to_dict()
assert route_reference_model_json2 == route_reference_model_json
-class TestModel_RouteReferenceDeleted():
+
+class TestModel_RouteReferenceDeleted:
"""
Test Class for RouteReferenceDeleted
"""
@@ -52151,7 +55459,8 @@ def test_route_reference_deleted_serialization(self):
route_reference_deleted_model_json2 = route_reference_deleted_model.to_dict()
assert route_reference_deleted_model_json2 == route_reference_deleted_model_json
-class TestModel_RoutingTable():
+
+class TestModel_RoutingTable:
"""
Test Class for RoutingTable
"""
@@ -52163,22 +55472,22 @@ def test_routing_table_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_filter_model = {} # ResourceFilter
+ resource_filter_model = {} # ResourceFilter
resource_filter_model['resource_type'] = 'vpn_server'
- route_reference_deleted_model = {} # RouteReferenceDeleted
+ route_reference_deleted_model = {} # RouteReferenceDeleted
route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- route_reference_model = {} # RouteReference
+ route_reference_model = {} # RouteReference
route_reference_model['deleted'] = route_reference_deleted_model
route_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531'
route_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
route_reference_model['name'] = 'my-route-1'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -52218,7 +55527,8 @@ def test_routing_table_serialization(self):
routing_table_model_json2 = routing_table_model.to_dict()
assert routing_table_model_json2 == routing_table_model_json
-class TestModel_RoutingTableCollection():
+
+class TestModel_RoutingTableCollection:
"""
Test Class for RoutingTableCollection
"""
@@ -52230,28 +55540,28 @@ def test_routing_table_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- routing_table_collection_first_model = {} # RoutingTableCollectionFirst
+ routing_table_collection_first_model = {} # RoutingTableCollectionFirst
routing_table_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?limit=20'
- routing_table_collection_next_model = {} # RoutingTableCollectionNext
+ routing_table_collection_next_model = {} # RoutingTableCollectionNext
routing_table_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- resource_filter_model = {} # ResourceFilter
+ resource_filter_model = {} # ResourceFilter
resource_filter_model['resource_type'] = 'vpn_server'
- route_reference_deleted_model = {} # RouteReferenceDeleted
+ route_reference_deleted_model = {} # RouteReferenceDeleted
route_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- route_reference_model = {} # RouteReference
+ route_reference_model = {} # RouteReference
route_reference_model['deleted'] = route_reference_deleted_model
route_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/8e454ead-0db7-48ac-9a8b-2698d8c470a7/routes/1a15dca5-7e33-45e1-b7c5-bc690e569531'
route_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
route_reference_model['name'] = 'my-route-1'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -52259,7 +55569,7 @@ def test_routing_table_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- routing_table_model = {} # RoutingTable
+ routing_table_model = {} # RoutingTable
routing_table_model['accept_routes_from'] = [resource_filter_model]
routing_table_model['created_at'] = '2019-01-01T12:00:00Z'
routing_table_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840'
@@ -52298,7 +55608,8 @@ def test_routing_table_collection_serialization(self):
routing_table_collection_model_json2 = routing_table_collection_model.to_dict()
assert routing_table_collection_model_json2 == routing_table_collection_model_json
-class TestModel_RoutingTableCollectionFirst():
+
+class TestModel_RoutingTableCollectionFirst:
"""
Test Class for RoutingTableCollectionFirst
"""
@@ -52327,7 +55638,8 @@ def test_routing_table_collection_first_serialization(self):
routing_table_collection_first_model_json2 = routing_table_collection_first_model.to_dict()
assert routing_table_collection_first_model_json2 == routing_table_collection_first_model_json
-class TestModel_RoutingTableCollectionNext():
+
+class TestModel_RoutingTableCollectionNext:
"""
Test Class for RoutingTableCollectionNext
"""
@@ -52356,7 +55668,8 @@ def test_routing_table_collection_next_serialization(self):
routing_table_collection_next_model_json2 = routing_table_collection_next_model.to_dict()
assert routing_table_collection_next_model_json2 == routing_table_collection_next_model_json
-class TestModel_RoutingTablePatch():
+
+class TestModel_RoutingTablePatch:
"""
Test Class for RoutingTablePatch
"""
@@ -52368,7 +55681,7 @@ def test_routing_table_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_filter_model = {} # ResourceFilter
+ resource_filter_model = {} # ResourceFilter
resource_filter_model['resource_type'] = 'vpn_server'
# Construct a json representation of a RoutingTablePatch model
@@ -52395,7 +55708,8 @@ def test_routing_table_patch_serialization(self):
routing_table_patch_model_json2 = routing_table_patch_model.to_dict()
assert routing_table_patch_model_json2 == routing_table_patch_model_json
-class TestModel_RoutingTableReference():
+
+class TestModel_RoutingTableReference:
"""
Test Class for RoutingTableReference
"""
@@ -52407,7 +55721,7 @@ def test_routing_table_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
+ routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a RoutingTableReference model
@@ -52433,7 +55747,8 @@ def test_routing_table_reference_serialization(self):
routing_table_reference_model_json2 = routing_table_reference_model.to_dict()
assert routing_table_reference_model_json2 == routing_table_reference_model_json
-class TestModel_RoutingTableReferenceDeleted():
+
+class TestModel_RoutingTableReferenceDeleted:
"""
Test Class for RoutingTableReferenceDeleted
"""
@@ -52462,7 +55777,8 @@ def test_routing_table_reference_deleted_serialization(self):
routing_table_reference_deleted_model_json2 = routing_table_reference_deleted_model.to_dict()
assert routing_table_reference_deleted_model_json2 == routing_table_reference_deleted_model_json
-class TestModel_SecurityGroup():
+
+class TestModel_SecurityGroup:
"""
Test Class for SecurityGroup
"""
@@ -52474,15 +55790,15 @@ 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 = {} # 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'
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
- security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
+ security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
security_group_rule_model['direction'] = 'inbound'
security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a'
security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a'
@@ -52490,20 +55806,20 @@ def test_security_group_serialization(self):
security_group_rule_model['remote'] = security_group_rule_remote_model
security_group_rule_model['protocol'] = 'all'
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
+ security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model
security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['name'] = 'my-network-interface'
security_group_target_reference_model['resource_type'] = 'network_interface'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -52538,7 +55854,8 @@ def test_security_group_serialization(self):
security_group_model_json2 = security_group_model.to_dict()
assert security_group_model_json2 == security_group_model_json
-class TestModel_SecurityGroupCollection():
+
+class TestModel_SecurityGroupCollection:
"""
Test Class for SecurityGroupCollection
"""
@@ -52550,21 +55867,21 @@ def test_security_group_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- security_group_collection_first_model = {} # SecurityGroupCollectionFirst
+ security_group_collection_first_model = {} # SecurityGroupCollectionFirst
security_group_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20'
- security_group_collection_next_model = {} # SecurityGroupCollectionNext
+ security_group_collection_next_model = {} # SecurityGroupCollectionNext
security_group_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # 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'
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
- security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
+ security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
security_group_rule_model['direction'] = 'inbound'
security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a'
security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a'
@@ -52572,20 +55889,20 @@ def test_security_group_collection_serialization(self):
security_group_rule_model['remote'] = security_group_rule_remote_model
security_group_rule_model['protocol'] = 'all'
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
+ security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model
security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['name'] = 'my-network-interface'
security_group_target_reference_model['resource_type'] = 'network_interface'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -52593,7 +55910,7 @@ def test_security_group_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- security_group_model = {} # SecurityGroup
+ security_group_model = {} # SecurityGroup
security_group_model['created_at'] = '2019-01-01T12:00:00Z'
security_group_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
@@ -52627,7 +55944,8 @@ def test_security_group_collection_serialization(self):
security_group_collection_model_json2 = security_group_collection_model.to_dict()
assert security_group_collection_model_json2 == security_group_collection_model_json
-class TestModel_SecurityGroupCollectionFirst():
+
+class TestModel_SecurityGroupCollectionFirst:
"""
Test Class for SecurityGroupCollectionFirst
"""
@@ -52656,7 +55974,8 @@ def test_security_group_collection_first_serialization(self):
security_group_collection_first_model_json2 = security_group_collection_first_model.to_dict()
assert security_group_collection_first_model_json2 == security_group_collection_first_model_json
-class TestModel_SecurityGroupCollectionNext():
+
+class TestModel_SecurityGroupCollectionNext:
"""
Test Class for SecurityGroupCollectionNext
"""
@@ -52685,7 +56004,8 @@ def test_security_group_collection_next_serialization(self):
security_group_collection_next_model_json2 = security_group_collection_next_model.to_dict()
assert security_group_collection_next_model_json2 == security_group_collection_next_model_json
-class TestModel_SecurityGroupPatch():
+
+class TestModel_SecurityGroupPatch:
"""
Test Class for SecurityGroupPatch
"""
@@ -52714,7 +56034,8 @@ def test_security_group_patch_serialization(self):
security_group_patch_model_json2 = security_group_patch_model.to_dict()
assert security_group_patch_model_json2 == security_group_patch_model_json
-class TestModel_SecurityGroupReference():
+
+class TestModel_SecurityGroupReference:
"""
Test Class for SecurityGroupReference
"""
@@ -52726,7 +56047,7 @@ def test_security_group_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SecurityGroupReference model
@@ -52752,7 +56073,8 @@ def test_security_group_reference_serialization(self):
security_group_reference_model_json2 = security_group_reference_model.to_dict()
assert security_group_reference_model_json2 == security_group_reference_model_json
-class TestModel_SecurityGroupReferenceDeleted():
+
+class TestModel_SecurityGroupReferenceDeleted:
"""
Test Class for SecurityGroupReferenceDeleted
"""
@@ -52781,7 +56103,8 @@ def test_security_group_reference_deleted_serialization(self):
security_group_reference_deleted_model_json2 = security_group_reference_deleted_model.to_dict()
assert security_group_reference_deleted_model_json2 == security_group_reference_deleted_model_json
-class TestModel_SecurityGroupRuleCollection():
+
+class TestModel_SecurityGroupRuleCollection:
"""
Test Class for SecurityGroupRuleCollection
"""
@@ -52793,10 +56116,10 @@ def test_security_group_rule_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
- security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
+ security_group_rule_model = {} # SecurityGroupRuleSecurityGroupRuleProtocolAll
security_group_rule_model['direction'] = 'inbound'
security_group_rule_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a'
security_group_rule_model['id'] = '6f2a6efe-21e2-401c-b237-620aa26ba16a'
@@ -52823,7 +56146,8 @@ def test_security_group_rule_collection_serialization(self):
security_group_rule_collection_model_json2 = security_group_rule_collection_model.to_dict()
assert security_group_rule_collection_model_json2 == security_group_rule_collection_model_json
-class TestModel_SecurityGroupRulePatch():
+
+class TestModel_SecurityGroupRulePatch:
"""
Test Class for SecurityGroupRulePatch
"""
@@ -52835,7 +56159,7 @@ def test_security_group_rule_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_patch_model = {} # SecurityGroupRuleRemotePatchCIDR
+ security_group_rule_remote_patch_model = {} # SecurityGroupRuleRemotePatchCIDR
security_group_rule_remote_patch_model['cidr_block'] = '10.0.0.0/16'
# Construct a json representation of a SecurityGroupRulePatch model
@@ -52863,7 +56187,8 @@ def test_security_group_rule_patch_serialization(self):
security_group_rule_patch_model_json2 = security_group_rule_patch_model.to_dict()
assert security_group_rule_patch_model_json2 == security_group_rule_patch_model_json
-class TestModel_SecurityGroupTargetCollection():
+
+class TestModel_SecurityGroupTargetCollection:
"""
Test Class for SecurityGroupTargetCollection
"""
@@ -52875,16 +56200,16 @@ def test_security_group_target_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- security_group_target_collection_first_model = {} # SecurityGroupTargetCollectionFirst
+ security_group_target_collection_first_model = {} # SecurityGroupTargetCollectionFirst
security_group_target_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20'
- security_group_target_collection_next_model = {} # SecurityGroupTargetCollectionNext
+ security_group_target_collection_next_model = {} # SecurityGroupTargetCollectionNext
security_group_target_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
+ security_group_target_reference_model = {} # SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
security_group_target_reference_model['deleted'] = network_interface_reference_target_context_deleted_model
security_group_target_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
security_group_target_reference_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
@@ -52914,7 +56239,8 @@ def test_security_group_target_collection_serialization(self):
security_group_target_collection_model_json2 = security_group_target_collection_model.to_dict()
assert security_group_target_collection_model_json2 == security_group_target_collection_model_json
-class TestModel_SecurityGroupTargetCollectionFirst():
+
+class TestModel_SecurityGroupTargetCollectionFirst:
"""
Test Class for SecurityGroupTargetCollectionFirst
"""
@@ -52943,7 +56269,8 @@ def test_security_group_target_collection_first_serialization(self):
security_group_target_collection_first_model_json2 = security_group_target_collection_first_model.to_dict()
assert security_group_target_collection_first_model_json2 == security_group_target_collection_first_model_json
-class TestModel_SecurityGroupTargetCollectionNext():
+
+class TestModel_SecurityGroupTargetCollectionNext:
"""
Test Class for SecurityGroupTargetCollectionNext
"""
@@ -52972,7 +56299,8 @@ def test_security_group_target_collection_next_serialization(self):
security_group_target_collection_next_model_json2 = security_group_target_collection_next_model.to_dict()
assert security_group_target_collection_next_model_json2 == security_group_target_collection_next_model_json
-class TestModel_Snapshot():
+
+class TestModel_Snapshot:
"""
Test Class for Snapshot
"""
@@ -52984,29 +56312,29 @@ def test_snapshot_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
+ backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model
backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['name'] = 'my-policy-plan'
backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan'
- zone_reference_model = {} # ZoneReference
+ 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'
- snapshot_clone_model = {} # SnapshotClone
+ snapshot_clone_model = {} # SnapshotClone
snapshot_clone_model['available'] = True
snapshot_clone_model['created_at'] = '2019-01-01T12:00:00Z'
snapshot_clone_model['zone'] = zone_reference_model
- encryption_key_reference_model = {} # EncryptionKeyReference
+ encryption_key_reference_model = {} # EncryptionKeyReference
encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -53016,25 +56344,25 @@ def test_snapshot_serialization(self):
operating_system_model['vendor'] = 'Canonical'
operating_system_model['version'] = '16.04 LTS'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['name'] = 'my-image'
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_model = {} # VolumeReference
+ volume_reference_model = {} # VolumeReference
volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['deleted'] = volume_reference_deleted_model
volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
@@ -53081,7 +56409,8 @@ def test_snapshot_serialization(self):
snapshot_model_json2 = snapshot_model.to_dict()
assert snapshot_model_json2 == snapshot_model_json
-class TestModel_SnapshotClone():
+
+class TestModel_SnapshotClone:
"""
Test Class for SnapshotClone
"""
@@ -53093,7 +56422,7 @@ def test_snapshot_clone_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
@@ -53118,7 +56447,8 @@ def test_snapshot_clone_serialization(self):
snapshot_clone_model_json2 = snapshot_clone_model.to_dict()
assert snapshot_clone_model_json2 == snapshot_clone_model_json
-class TestModel_SnapshotCloneCollection():
+
+class TestModel_SnapshotCloneCollection:
"""
Test Class for SnapshotCloneCollection
"""
@@ -53130,11 +56460,11 @@ def test_snapshot_clone_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
- snapshot_clone_model = {} # SnapshotClone
+ snapshot_clone_model = {} # SnapshotClone
snapshot_clone_model['available'] = True
snapshot_clone_model['created_at'] = '2019-01-01T12:00:00Z'
snapshot_clone_model['zone'] = zone_reference_model
@@ -53158,7 +56488,8 @@ def test_snapshot_clone_collection_serialization(self):
snapshot_clone_collection_model_json2 = snapshot_clone_collection_model.to_dict()
assert snapshot_clone_collection_model_json2 == snapshot_clone_collection_model_json
-class TestModel_SnapshotClonePrototype():
+
+class TestModel_SnapshotClonePrototype:
"""
Test Class for SnapshotClonePrototype
"""
@@ -53170,7 +56501,7 @@ def test_snapshot_clone_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a SnapshotClonePrototype model
@@ -53192,7 +56523,8 @@ def test_snapshot_clone_prototype_serialization(self):
snapshot_clone_prototype_model_json2 = snapshot_clone_prototype_model.to_dict()
assert snapshot_clone_prototype_model_json2 == snapshot_clone_prototype_model_json
-class TestModel_SnapshotCollection():
+
+class TestModel_SnapshotCollection:
"""
Test Class for SnapshotCollection
"""
@@ -53204,35 +56536,35 @@ def test_snapshot_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- snapshot_collection_first_model = {} # SnapshotCollectionFirst
+ snapshot_collection_first_model = {} # SnapshotCollectionFirst
snapshot_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=20'
- snapshot_collection_next_model = {} # SnapshotCollectionNext
+ snapshot_collection_next_model = {} # SnapshotCollectionNext
snapshot_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
+ backup_policy_plan_reference_deleted_model = {} # BackupPolicyPlanReferenceDeleted
backup_policy_plan_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
+ backup_policy_plan_reference_model = {} # BackupPolicyPlanReference
backup_policy_plan_reference_model['deleted'] = backup_policy_plan_reference_deleted_model
backup_policy_plan_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/backup_policies/r134-076191ba-49c2-4763-94fd-c70de73ee2e6/plans/r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['id'] = 'r134-6da51cfe-6f7b-4638-a6ba-00e9c327b178'
backup_policy_plan_reference_model['name'] = 'my-policy-plan'
backup_policy_plan_reference_model['resource_type'] = 'backup_policy_plan'
- zone_reference_model = {} # ZoneReference
+ 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'
- snapshot_clone_model = {} # SnapshotClone
+ snapshot_clone_model = {} # SnapshotClone
snapshot_clone_model['available'] = True
snapshot_clone_model['created_at'] = '2019-01-01T12:00:00Z'
snapshot_clone_model['zone'] = zone_reference_model
- encryption_key_reference_model = {} # EncryptionKeyReference
+ encryption_key_reference_model = {} # EncryptionKeyReference
encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -53242,32 +56574,32 @@ def test_snapshot_collection_serialization(self):
operating_system_model['vendor'] = 'Canonical'
operating_system_model['version'] = '16.04 LTS'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['name'] = 'my-image'
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_model = {} # VolumeReference
+ volume_reference_model = {} # VolumeReference
volume_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['deleted'] = volume_reference_deleted_model
volume_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_model['name'] = 'my-volume'
- snapshot_model = {} # Snapshot
+ snapshot_model = {} # Snapshot
snapshot_model['backup_policy_plan'] = backup_policy_plan_reference_model
snapshot_model['bootable'] = True
snapshot_model['captured_at'] = '2019-01-01T12:00:00Z'
@@ -53314,7 +56646,8 @@ def test_snapshot_collection_serialization(self):
snapshot_collection_model_json2 = snapshot_collection_model.to_dict()
assert snapshot_collection_model_json2 == snapshot_collection_model_json
-class TestModel_SnapshotCollectionFirst():
+
+class TestModel_SnapshotCollectionFirst:
"""
Test Class for SnapshotCollectionFirst
"""
@@ -53343,7 +56676,8 @@ def test_snapshot_collection_first_serialization(self):
snapshot_collection_first_model_json2 = snapshot_collection_first_model.to_dict()
assert snapshot_collection_first_model_json2 == snapshot_collection_first_model_json
-class TestModel_SnapshotCollectionNext():
+
+class TestModel_SnapshotCollectionNext:
"""
Test Class for SnapshotCollectionNext
"""
@@ -53372,7 +56706,8 @@ def test_snapshot_collection_next_serialization(self):
snapshot_collection_next_model_json2 = snapshot_collection_next_model.to_dict()
assert snapshot_collection_next_model_json2 == snapshot_collection_next_model_json
-class TestModel_SnapshotPatch():
+
+class TestModel_SnapshotPatch:
"""
Test Class for SnapshotPatch
"""
@@ -53402,7 +56737,8 @@ def test_snapshot_patch_serialization(self):
snapshot_patch_model_json2 = snapshot_patch_model.to_dict()
assert snapshot_patch_model_json2 == snapshot_patch_model_json
-class TestModel_SnapshotReference():
+
+class TestModel_SnapshotReference:
"""
Test Class for SnapshotReference
"""
@@ -53414,7 +56750,7 @@ def test_snapshot_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
+ snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SnapshotReference model
@@ -53441,7 +56777,8 @@ def test_snapshot_reference_serialization(self):
snapshot_reference_model_json2 = snapshot_reference_model.to_dict()
assert snapshot_reference_model_json2 == snapshot_reference_model_json
-class TestModel_SnapshotReferenceDeleted():
+
+class TestModel_SnapshotReferenceDeleted:
"""
Test Class for SnapshotReferenceDeleted
"""
@@ -53470,7 +56807,8 @@ def test_snapshot_reference_deleted_serialization(self):
snapshot_reference_deleted_model_json2 = snapshot_reference_deleted_model.to_dict()
assert snapshot_reference_deleted_model_json2 == snapshot_reference_deleted_model_json
-class TestModel_Subnet():
+
+class TestModel_Subnet:
"""
Test Class for Subnet
"""
@@ -53482,20 +56820,20 @@ def test_subnet_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
+ network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_reference_model = {} # NetworkACLReference
+ network_acl_reference_model = {} # NetworkACLReference
network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['deleted'] = network_acl_reference_deleted_model
network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['name'] = 'my-network-acl'
- public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
+ public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- public_gateway_reference_model = {} # PublicGatewayReference
+ public_gateway_reference_model = {} # PublicGatewayReference
public_gateway_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241'
public_gateway_reference_model['deleted'] = public_gateway_reference_deleted_model
public_gateway_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241'
@@ -53503,25 +56841,25 @@ def test_subnet_serialization(self):
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 = {} # 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'
- routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
+ routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- routing_table_reference_model = {} # RoutingTableReference
+ routing_table_reference_model = {} # RoutingTableReference
routing_table_reference_model['deleted'] = routing_table_reference_deleted_model
routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840'
routing_table_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
routing_table_reference_model['name'] = 'my-routing-table-1'
routing_table_reference_model['resource_type'] = 'routing_table'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -53529,7 +56867,7 @@ def test_subnet_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -53568,7 +56906,8 @@ def test_subnet_serialization(self):
subnet_model_json2 = subnet_model.to_dict()
assert subnet_model_json2 == subnet_model_json
-class TestModel_SubnetCollection():
+
+class TestModel_SubnetCollection:
"""
Test Class for SubnetCollection
"""
@@ -53580,26 +56919,26 @@ def test_subnet_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- subnet_collection_first_model = {} # SubnetCollectionFirst
+ subnet_collection_first_model = {} # SubnetCollectionFirst
subnet_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?limit=20'
- subnet_collection_next_model = {} # SubnetCollectionNext
+ subnet_collection_next_model = {} # SubnetCollectionNext
subnet_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
+ network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_reference_model = {} # NetworkACLReference
+ network_acl_reference_model = {} # NetworkACLReference
network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['deleted'] = network_acl_reference_deleted_model
network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['name'] = 'my-network-acl'
- public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
+ public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- public_gateway_reference_model = {} # PublicGatewayReference
+ public_gateway_reference_model = {} # PublicGatewayReference
public_gateway_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::public-gateway:dc5431ef-1fc6-4861-adc9-a59d077d1241'
public_gateway_reference_model['deleted'] = public_gateway_reference_deleted_model
public_gateway_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/public_gateways/dc5431ef-1fc6-4861-adc9-a59d077d1241'
@@ -53607,25 +56946,25 @@ def test_subnet_collection_serialization(self):
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 = {} # 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'
- routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
+ routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- routing_table_reference_model = {} # RoutingTableReference
+ routing_table_reference_model = {} # RoutingTableReference
routing_table_reference_model['deleted'] = routing_table_reference_deleted_model
routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840'
routing_table_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
routing_table_reference_model['name'] = 'my-routing-table-1'
routing_table_reference_model['resource_type'] = 'routing_table'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -53633,11 +56972,11 @@ def test_subnet_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- zone_reference_model = {} # ZoneReference
+ 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'
- subnet_model = {} # Subnet
+ subnet_model = {} # Subnet
subnet_model['available_ipv4_address_count'] = 15
subnet_model['created_at'] = '2019-01-01T12:00:00Z'
subnet_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -53679,7 +57018,8 @@ def test_subnet_collection_serialization(self):
subnet_collection_model_json2 = subnet_collection_model.to_dict()
assert subnet_collection_model_json2 == subnet_collection_model_json
-class TestModel_SubnetCollectionFirst():
+
+class TestModel_SubnetCollectionFirst:
"""
Test Class for SubnetCollectionFirst
"""
@@ -53708,7 +57048,8 @@ def test_subnet_collection_first_serialization(self):
subnet_collection_first_model_json2 = subnet_collection_first_model.to_dict()
assert subnet_collection_first_model_json2 == subnet_collection_first_model_json
-class TestModel_SubnetCollectionNext():
+
+class TestModel_SubnetCollectionNext:
"""
Test Class for SubnetCollectionNext
"""
@@ -53737,7 +57078,8 @@ def test_subnet_collection_next_serialization(self):
subnet_collection_next_model_json2 = subnet_collection_next_model.to_dict()
assert subnet_collection_next_model_json2 == subnet_collection_next_model_json
-class TestModel_SubnetPatch():
+
+class TestModel_SubnetPatch:
"""
Test Class for SubnetPatch
"""
@@ -53749,13 +57091,13 @@ def test_subnet_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_identity_model = {} # NetworkACLIdentityById
+ network_acl_identity_model = {} # NetworkACLIdentityById
network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
- subnet_public_gateway_patch_model = {} # SubnetPublicGatewayPatchPublicGatewayIdentityById
+ subnet_public_gateway_patch_model = {} # SubnetPublicGatewayPatchPublicGatewayIdentityById
subnet_public_gateway_patch_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241'
- routing_table_identity_model = {} # RoutingTableIdentityById
+ routing_table_identity_model = {} # RoutingTableIdentityById
routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840'
# Construct a json representation of a SubnetPatch model
@@ -53780,7 +57122,8 @@ def test_subnet_patch_serialization(self):
subnet_patch_model_json2 = subnet_patch_model.to_dict()
assert subnet_patch_model_json2 == subnet_patch_model_json
-class TestModel_SubnetReference():
+
+class TestModel_SubnetReference:
"""
Test Class for SubnetReference
"""
@@ -53792,7 +57135,7 @@ def test_subnet_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SubnetReference model
@@ -53819,7 +57162,8 @@ def test_subnet_reference_serialization(self):
subnet_reference_model_json2 = subnet_reference_model.to_dict()
assert subnet_reference_model_json2 == subnet_reference_model_json
-class TestModel_SubnetReferenceDeleted():
+
+class TestModel_SubnetReferenceDeleted:
"""
Test Class for SubnetReferenceDeleted
"""
@@ -53848,7 +57192,8 @@ def test_subnet_reference_deleted_serialization(self):
subnet_reference_deleted_model_json2 = subnet_reference_deleted_model.to_dict()
assert subnet_reference_deleted_model_json2 == subnet_reference_deleted_model_json
-class TestModel_TrustedProfileReference():
+
+class TestModel_TrustedProfileReference:
"""
Test Class for TrustedProfileReference
"""
@@ -53879,7 +57224,8 @@ def test_trusted_profile_reference_serialization(self):
trusted_profile_reference_model_json2 = trusted_profile_reference_model.to_dict()
assert trusted_profile_reference_model_json2 == trusted_profile_reference_model_json
-class TestModel_VCPU():
+
+class TestModel_VCPU:
"""
Test Class for VCPU
"""
@@ -53910,7 +57256,8 @@ def test_vcpu_serialization(self):
vcpu_model_json2 = vcpu_model.to_dict()
assert vcpu_model_json2 == vcpu_model_json
-class TestModel_VPC():
+
+class TestModel_VPC:
"""
Test Class for VPC
"""
@@ -53922,48 +57269,48 @@ def test_vpc_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- zone_reference_model = {} # ZoneReference
+ 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'
- vpccse_source_ip_model = {} # VPCCSESourceIP
+ vpccse_source_ip_model = {} # VPCCSESourceIP
vpccse_source_ip_model['ip'] = ip_model
vpccse_source_ip_model['zone'] = zone_reference_model
- network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
+ network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_reference_model = {} # NetworkACLReference
+ network_acl_reference_model = {} # NetworkACLReference
network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['deleted'] = network_acl_reference_deleted_model
network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['name'] = 'my-network-acl'
- routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
+ routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- routing_table_reference_model = {} # RoutingTableReference
+ routing_table_reference_model = {} # RoutingTableReference
routing_table_reference_model['deleted'] = routing_table_reference_deleted_model
routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840'
routing_table_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
routing_table_reference_model['name'] = 'my-routing-table-1'
routing_table_reference_model['resource_type'] = 'routing_table'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
@@ -53999,7 +57346,8 @@ def test_vpc_serialization(self):
vpc_model_json2 = vpc_model.to_dict()
assert vpc_model_json2 == vpc_model_json
-class TestModel_VPCCSESourceIP():
+
+class TestModel_VPCCSESourceIP:
"""
Test Class for VPCCSESourceIP
"""
@@ -54011,10 +57359,10 @@ def test_vpccse_source_ip_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- zone_reference_model = {} # ZoneReference
+ 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'
@@ -54038,7 +57386,8 @@ def test_vpccse_source_ip_serialization(self):
vpccse_source_ip_model_json2 = vpccse_source_ip_model.to_dict()
assert vpccse_source_ip_model_json2 == vpccse_source_ip_model_json
-class TestModel_VPCCollection():
+
+class TestModel_VPCCollection:
"""
Test Class for VPCCollection
"""
@@ -54050,59 +57399,59 @@ def test_vpc_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpc_collection_first_model = {} # VPCCollectionFirst
+ vpc_collection_first_model = {} # VPCCollectionFirst
vpc_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?limit=20'
- vpc_collection_next_model = {} # VPCCollectionNext
+ vpc_collection_next_model = {} # VPCCollectionNext
vpc_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- zone_reference_model = {} # ZoneReference
+ 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'
- vpccse_source_ip_model = {} # VPCCSESourceIP
+ vpccse_source_ip_model = {} # VPCCSESourceIP
vpccse_source_ip_model['ip'] = ip_model
vpccse_source_ip_model['zone'] = zone_reference_model
- network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
+ network_acl_reference_deleted_model = {} # NetworkACLReferenceDeleted
network_acl_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_reference_model = {} # NetworkACLReference
+ network_acl_reference_model = {} # NetworkACLReference
network_acl_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::network-acl:a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['deleted'] = network_acl_reference_deleted_model
network_acl_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
network_acl_reference_model['name'] = 'my-network-acl'
- routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
+ routing_table_reference_deleted_model = {} # RoutingTableReferenceDeleted
routing_table_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- routing_table_reference_model = {} # RoutingTableReference
+ routing_table_reference_model = {} # RoutingTableReference
routing_table_reference_model['deleted'] = routing_table_reference_deleted_model
routing_table_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840'
routing_table_reference_model['id'] = '1a15dca5-7e33-45e1-b7c5-bc690e569531'
routing_table_reference_model['name'] = 'my-routing-table-1'
routing_table_reference_model['resource_type'] = 'routing_table'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- vpc_model = {} # VPC
+ vpc_model = {} # VPC
vpc_model['classic_access'] = False
vpc_model['created_at'] = '2019-01-01T12:00:00Z'
vpc_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -54140,7 +57489,8 @@ def test_vpc_collection_serialization(self):
vpc_collection_model_json2 = vpc_collection_model.to_dict()
assert vpc_collection_model_json2 == vpc_collection_model_json
-class TestModel_VPCCollectionFirst():
+
+class TestModel_VPCCollectionFirst:
"""
Test Class for VPCCollectionFirst
"""
@@ -54169,7 +57519,8 @@ def test_vpc_collection_first_serialization(self):
vpc_collection_first_model_json2 = vpc_collection_first_model.to_dict()
assert vpc_collection_first_model_json2 == vpc_collection_first_model_json
-class TestModel_VPCCollectionNext():
+
+class TestModel_VPCCollectionNext:
"""
Test Class for VPCCollectionNext
"""
@@ -54198,7 +57549,8 @@ def test_vpc_collection_next_serialization(self):
vpc_collection_next_model_json2 = vpc_collection_next_model.to_dict()
assert vpc_collection_next_model_json2 == vpc_collection_next_model_json
-class TestModel_VPCPatch():
+
+class TestModel_VPCPatch:
"""
Test Class for VPCPatch
"""
@@ -54227,7 +57579,8 @@ def test_vpc_patch_serialization(self):
vpc_patch_model_json2 = vpc_patch_model.to_dict()
assert vpc_patch_model_json2 == vpc_patch_model_json
-class TestModel_VPCReference():
+
+class TestModel_VPCReference:
"""
Test Class for VPCReference
"""
@@ -54239,7 +57592,7 @@ def test_vpc_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a VPCReference model
@@ -54266,7 +57619,8 @@ def test_vpc_reference_serialization(self):
vpc_reference_model_json2 = vpc_reference_model.to_dict()
assert vpc_reference_model_json2 == vpc_reference_model_json
-class TestModel_VPCReferenceDeleted():
+
+class TestModel_VPCReferenceDeleted:
"""
Test Class for VPCReferenceDeleted
"""
@@ -54295,7 +57649,8 @@ def test_vpc_reference_deleted_serialization(self):
vpc_reference_deleted_model_json2 = vpc_reference_deleted_model.to_dict()
assert vpc_reference_deleted_model_json2 == vpc_reference_deleted_model_json
-class TestModel_VPNGatewayCollection():
+
+class TestModel_VPNGatewayCollection:
"""
Test Class for VPNGatewayCollection
"""
@@ -54307,40 +57662,40 @@ def test_vpn_gateway_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_collection_first_model = {} # VPNGatewayCollectionFirst
+ vpn_gateway_collection_first_model = {} # VPNGatewayCollectionFirst
vpn_gateway_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20'
- vpn_gateway_collection_next_model = {} # VPNGatewayCollectionNext
+ vpn_gateway_collection_next_model = {} # VPNGatewayCollectionNext
vpn_gateway_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20'
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- vpn_gateway_member_model = {} # VPNGatewayMember
+ vpn_gateway_member_model = {} # VPNGatewayMember
vpn_gateway_member_model['private_ip'] = ip_model
vpn_gateway_member_model['public_ip'] = ip_model
vpn_gateway_member_model['role'] = 'active'
vpn_gateway_member_model['status'] = 'available'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -54348,10 +57703,10 @@ def test_vpn_gateway_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -54359,7 +57714,7 @@ def test_vpn_gateway_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- vpn_gateway_model = {} # VPNGatewayRouteMode
+ 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/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b'
@@ -54397,7 +57752,8 @@ def test_vpn_gateway_collection_serialization(self):
vpn_gateway_collection_model_json2 = vpn_gateway_collection_model.to_dict()
assert vpn_gateway_collection_model_json2 == vpn_gateway_collection_model_json
-class TestModel_VPNGatewayCollectionFirst():
+
+class TestModel_VPNGatewayCollectionFirst:
"""
Test Class for VPNGatewayCollectionFirst
"""
@@ -54426,7 +57782,8 @@ def test_vpn_gateway_collection_first_serialization(self):
vpn_gateway_collection_first_model_json2 = vpn_gateway_collection_first_model.to_dict()
assert vpn_gateway_collection_first_model_json2 == vpn_gateway_collection_first_model_json
-class TestModel_VPNGatewayCollectionNext():
+
+class TestModel_VPNGatewayCollectionNext:
"""
Test Class for VPNGatewayCollectionNext
"""
@@ -54455,7 +57812,8 @@ def test_vpn_gateway_collection_next_serialization(self):
vpn_gateway_collection_next_model_json2 = vpn_gateway_collection_next_model.to_dict()
assert vpn_gateway_collection_next_model_json2 == vpn_gateway_collection_next_model_json
-class TestModel_VPNGatewayConnectionCollection():
+
+class TestModel_VPNGatewayConnectionCollection:
"""
Test Class for VPNGatewayConnectionCollection
"""
@@ -54467,39 +57825,39 @@ def test_vpn_gateway_connection_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD
+ vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD
vpn_gateway_connection_dpd_model['action'] = 'restart'
vpn_gateway_connection_dpd_model['interval'] = 30
vpn_gateway_connection_dpd_model['timeout'] = 120
- ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
+ ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- ike_policy_reference_model = {} # IKEPolicyReference
+ ike_policy_reference_model = {} # IKEPolicyReference
ike_policy_reference_model['deleted'] = ike_policy_reference_deleted_model
ike_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b'
ike_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b'
ike_policy_reference_model['name'] = 'my-ike-policy'
ike_policy_reference_model['resource_type'] = 'ike_policy'
- i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
+ i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- i_psec_policy_reference_model = {} # IPsecPolicyReference
+ i_psec_policy_reference_model = {} # IPsecPolicyReference
i_psec_policy_reference_model['deleted'] = i_psec_policy_reference_deleted_model
i_psec_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b'
i_psec_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b'
i_psec_policy_reference_model['name'] = 'my-ipsec-policy'
i_psec_policy_reference_model['resource_type'] = 'ipsec_policy'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- vpn_gateway_connection_static_route_mode_tunnel_model = {} # VPNGatewayConnectionStaticRouteModeTunnel
+ 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_model = {} # VPNGatewayConnectionStaticRouteMode
+ vpn_gateway_connection_model = {} # VPNGatewayConnectionStaticRouteMode
vpn_gateway_connection_model['admin_state_up'] = True
vpn_gateway_connection_model['authentication_mode'] = 'psk'
vpn_gateway_connection_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -54536,7 +57894,8 @@ def test_vpn_gateway_connection_collection_serialization(self):
vpn_gateway_connection_collection_model_json2 = vpn_gateway_connection_collection_model.to_dict()
assert vpn_gateway_connection_collection_model_json2 == vpn_gateway_connection_collection_model_json
-class TestModel_VPNGatewayConnectionDPD():
+
+class TestModel_VPNGatewayConnectionDPD:
"""
Test Class for VPNGatewayConnectionDPD
"""
@@ -54567,7 +57926,8 @@ def test_vpn_gateway_connection_dpd_serialization(self):
vpn_gateway_connection_dpd_model_json2 = vpn_gateway_connection_dpd_model.to_dict()
assert vpn_gateway_connection_dpd_model_json2 == vpn_gateway_connection_dpd_model_json
-class TestModel_VPNGatewayConnectionDPDPatch():
+
+class TestModel_VPNGatewayConnectionDPDPatch:
"""
Test Class for VPNGatewayConnectionDPDPatch
"""
@@ -54598,7 +57958,8 @@ def test_vpn_gateway_connection_dpd_patch_serialization(self):
vpn_gateway_connection_dpd_patch_model_json2 = vpn_gateway_connection_dpd_patch_model.to_dict()
assert vpn_gateway_connection_dpd_patch_model_json2 == vpn_gateway_connection_dpd_patch_model_json
-class TestModel_VPNGatewayConnectionDPDPrototype():
+
+class TestModel_VPNGatewayConnectionDPDPrototype:
"""
Test Class for VPNGatewayConnectionDPDPrototype
"""
@@ -54629,7 +57990,8 @@ def test_vpn_gateway_connection_dpd_prototype_serialization(self):
vpn_gateway_connection_dpd_prototype_model_json2 = vpn_gateway_connection_dpd_prototype_model.to_dict()
assert vpn_gateway_connection_dpd_prototype_model_json2 == vpn_gateway_connection_dpd_prototype_model_json
-class TestModel_VPNGatewayConnectionLocalCIDRs():
+
+class TestModel_VPNGatewayConnectionLocalCIDRs:
"""
Test Class for VPNGatewayConnectionLocalCIDRs
"""
@@ -54658,7 +58020,8 @@ def test_vpn_gateway_connection_local_cid_rs_serialization(self):
vpn_gateway_connection_local_cid_rs_model_json2 = vpn_gateway_connection_local_cid_rs_model.to_dict()
assert vpn_gateway_connection_local_cid_rs_model_json2 == vpn_gateway_connection_local_cid_rs_model_json
-class TestModel_VPNGatewayConnectionPeerCIDRs():
+
+class TestModel_VPNGatewayConnectionPeerCIDRs:
"""
Test Class for VPNGatewayConnectionPeerCIDRs
"""
@@ -54687,7 +58050,8 @@ def test_vpn_gateway_connection_peer_cid_rs_serialization(self):
vpn_gateway_connection_peer_cid_rs_model_json2 = vpn_gateway_connection_peer_cid_rs_model.to_dict()
assert vpn_gateway_connection_peer_cid_rs_model_json2 == vpn_gateway_connection_peer_cid_rs_model_json
-class TestModel_VPNGatewayConnectionReference():
+
+class TestModel_VPNGatewayConnectionReference:
"""
Test Class for VPNGatewayConnectionReference
"""
@@ -54699,7 +58063,7 @@ def test_vpn_gateway_connection_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a VPNGatewayConnectionReference model
@@ -54725,7 +58089,8 @@ def test_vpn_gateway_connection_reference_serialization(self):
vpn_gateway_connection_reference_model_json2 = vpn_gateway_connection_reference_model.to_dict()
assert vpn_gateway_connection_reference_model_json2 == vpn_gateway_connection_reference_model_json
-class TestModel_VPNGatewayConnectionReferenceDeleted():
+
+class TestModel_VPNGatewayConnectionReferenceDeleted:
"""
Test Class for VPNGatewayConnectionReferenceDeleted
"""
@@ -54754,7 +58119,8 @@ def test_vpn_gateway_connection_reference_deleted_serialization(self):
vpn_gateway_connection_reference_deleted_model_json2 = vpn_gateway_connection_reference_deleted_model.to_dict()
assert vpn_gateway_connection_reference_deleted_model_json2 == vpn_gateway_connection_reference_deleted_model_json
-class TestModel_VPNGatewayConnectionStaticRouteModeTunnel():
+
+class TestModel_VPNGatewayConnectionStaticRouteModeTunnel:
"""
Test Class for VPNGatewayConnectionStaticRouteModeTunnel
"""
@@ -54766,7 +58132,7 @@ def test_vpn_gateway_connection_static_route_mode_tunnel_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
# Construct a json representation of a VPNGatewayConnectionStaticRouteModeTunnel model
@@ -54789,7 +58155,8 @@ def test_vpn_gateway_connection_static_route_mode_tunnel_serialization(self):
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_VPNGatewayMember():
+
+class TestModel_VPNGatewayMember:
"""
Test Class for VPNGatewayMember
"""
@@ -54801,7 +58168,7 @@ def test_vpn_gateway_member_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
# Construct a json representation of a VPNGatewayMember model
@@ -54826,7 +58193,8 @@ def test_vpn_gateway_member_serialization(self):
vpn_gateway_member_model_json2 = vpn_gateway_member_model.to_dict()
assert vpn_gateway_member_model_json2 == vpn_gateway_member_model_json
-class TestModel_VPNGatewayPatch():
+
+class TestModel_VPNGatewayPatch:
"""
Test Class for VPNGatewayPatch
"""
@@ -54855,7 +58223,8 @@ def test_vpn_gateway_patch_serialization(self):
vpn_gateway_patch_model_json2 = vpn_gateway_patch_model.to_dict()
assert vpn_gateway_patch_model_json2 == vpn_gateway_patch_model_json
-class TestModel_VPNGatewayReferenceDeleted():
+
+class TestModel_VPNGatewayReferenceDeleted:
"""
Test Class for VPNGatewayReferenceDeleted
"""
@@ -54884,7 +58253,8 @@ def test_vpn_gateway_reference_deleted_serialization(self):
vpn_gateway_reference_deleted_model_json2 = vpn_gateway_reference_deleted_model.to_dict()
assert vpn_gateway_reference_deleted_model_json2 == vpn_gateway_reference_deleted_model_json
-class TestModel_VPNServer():
+
+class TestModel_VPNServer:
"""
Test Class for VPNServer
"""
@@ -54896,23 +58266,23 @@ 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 = {} # CertificateInstanceReference
certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456: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 = {} # VPNServerAuthenticationByUsernameIdProviderByIAM
vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam'
- vpn_server_authentication_model = {} # VPNServerAuthenticationByUsername
+ vpn_server_authentication_model = {} # VPNServerAuthenticationByUsername
vpn_server_authentication_model['method'] = 'certificate'
vpn_server_authentication_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -54920,25 +58290,25 @@ def test_vpn_server_serialization(self):
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 = {} # 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'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -54946,10 +58316,10 @@ def test_vpn_server_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -54999,7 +58369,8 @@ def test_vpn_server_serialization(self):
vpn_server_model_json2 = vpn_server_model.to_dict()
assert vpn_server_model_json2 == vpn_server_model_json
-class TestModel_VPNServerClient():
+
+class TestModel_VPNServerClient:
"""
Test Class for VPNServerClient
"""
@@ -55011,7 +58382,7 @@ def test_vpn_server_client_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
# Construct a json representation of a VPNServerClient model
@@ -55043,7 +58414,8 @@ def test_vpn_server_client_serialization(self):
vpn_server_client_model_json2 = vpn_server_client_model.to_dict()
assert vpn_server_client_model_json2 == vpn_server_client_model_json
-class TestModel_VPNServerClientCollection():
+
+class TestModel_VPNServerClientCollection:
"""
Test Class for VPNServerClientCollection
"""
@@ -55055,10 +58427,10 @@ def test_vpn_server_client_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- vpn_server_client_model = {} # VPNServerClient
+ vpn_server_client_model = {} # VPNServerClient
vpn_server_client_model['client_ip'] = ip_model
vpn_server_client_model['common_name'] = 'testString'
vpn_server_client_model['created_at'] = '2019-01-01T12:00:00Z'
@@ -55071,10 +58443,10 @@ def test_vpn_server_client_collection_serialization(self):
vpn_server_client_model['status'] = 'connected'
vpn_server_client_model['username'] = 'testString'
- vpn_server_client_collection_first_model = {} # VPNServerClientCollectionFirst
+ vpn_server_client_collection_first_model = {} # VPNServerClientCollectionFirst
vpn_server_client_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?limit=20'
- vpn_server_client_collection_next_model = {} # VPNServerClientCollectionNext
+ vpn_server_client_collection_next_model = {} # VPNServerClientCollectionNext
vpn_server_client_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/r006-1a15dca5-7e33-45e1-b7c5-bc690e569531/clients?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20'
# Construct a json representation of a VPNServerClientCollection model
@@ -55100,7 +58472,8 @@ def test_vpn_server_client_collection_serialization(self):
vpn_server_client_collection_model_json2 = vpn_server_client_collection_model.to_dict()
assert vpn_server_client_collection_model_json2 == vpn_server_client_collection_model_json
-class TestModel_VPNServerClientCollectionFirst():
+
+class TestModel_VPNServerClientCollectionFirst:
"""
Test Class for VPNServerClientCollectionFirst
"""
@@ -55129,7 +58502,8 @@ def test_vpn_server_client_collection_first_serialization(self):
vpn_server_client_collection_first_model_json2 = vpn_server_client_collection_first_model.to_dict()
assert vpn_server_client_collection_first_model_json2 == vpn_server_client_collection_first_model_json
-class TestModel_VPNServerClientCollectionNext():
+
+class TestModel_VPNServerClientCollectionNext:
"""
Test Class for VPNServerClientCollectionNext
"""
@@ -55158,7 +58532,8 @@ def test_vpn_server_client_collection_next_serialization(self):
vpn_server_client_collection_next_model_json2 = vpn_server_client_collection_next_model.to_dict()
assert vpn_server_client_collection_next_model_json2 == vpn_server_client_collection_next_model_json
-class TestModel_VPNServerCollection():
+
+class TestModel_VPNServerCollection:
"""
Test Class for VPNServerCollection
"""
@@ -55170,29 +58545,29 @@ def test_vpn_server_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_collection_first_model = {} # VPNServerCollectionFirst
+ vpn_server_collection_first_model = {} # VPNServerCollectionFirst
vpn_server_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?limit=20'
- vpn_server_collection_next_model = {} # VPNServerCollectionNext
+ vpn_server_collection_next_model = {} # VPNServerCollectionNext
vpn_server_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?start=ffd653466e284937896724b2dd044c9c&limit=20'
- certificate_instance_reference_model = {} # CertificateInstanceReference
+ certificate_instance_reference_model = {} # CertificateInstanceReference
certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456: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 = {} # VPNServerAuthenticationByUsernameIdProviderByIAM
vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam'
- vpn_server_authentication_model = {} # VPNServerAuthenticationByUsername
+ vpn_server_authentication_model = {} # VPNServerAuthenticationByUsername
vpn_server_authentication_model['method'] = 'certificate'
vpn_server_authentication_model['identity_provider'] = vpn_server_authentication_by_username_id_provider_model
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -55200,25 +58575,25 @@ def test_vpn_server_collection_serialization(self):
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 = {} # 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'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -55226,10 +58601,10 @@ def test_vpn_server_collection_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -55237,7 +58612,7 @@ def test_vpn_server_collection_serialization(self):
vpc_reference_model['name'] = 'my-vpc'
vpc_reference_model['resource_type'] = 'vpc'
- vpn_server_model = {} # VPNServer
+ vpn_server_model = {} # VPNServer
vpn_server_model['certificate'] = certificate_instance_reference_model
vpn_server_model['client_authentication'] = [vpn_server_authentication_model]
vpn_server_model['client_auto_delete'] = True
@@ -55286,7 +58661,8 @@ def test_vpn_server_collection_serialization(self):
vpn_server_collection_model_json2 = vpn_server_collection_model.to_dict()
assert vpn_server_collection_model_json2 == vpn_server_collection_model_json
-class TestModel_VPNServerCollectionFirst():
+
+class TestModel_VPNServerCollectionFirst:
"""
Test Class for VPNServerCollectionFirst
"""
@@ -55315,7 +58691,8 @@ def test_vpn_server_collection_first_serialization(self):
vpn_server_collection_first_model_json2 = vpn_server_collection_first_model.to_dict()
assert vpn_server_collection_first_model_json2 == vpn_server_collection_first_model_json
-class TestModel_VPNServerCollectionNext():
+
+class TestModel_VPNServerCollectionNext:
"""
Test Class for VPNServerCollectionNext
"""
@@ -55344,7 +58721,8 @@ def test_vpn_server_collection_next_serialization(self):
vpn_server_collection_next_model_json2 = vpn_server_collection_next_model.to_dict()
assert vpn_server_collection_next_model_json2 == vpn_server_collection_next_model_json
-class TestModel_VPNServerPatch():
+
+class TestModel_VPNServerPatch:
"""
Test Class for VPNServerPatch
"""
@@ -55356,20 +58734,20 @@ 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 = {} # CertificateInstanceIdentityByCRN
certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456: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 = {} # 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
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a VPNServerPatch model
@@ -55400,7 +58778,8 @@ def test_vpn_server_patch_serialization(self):
vpn_server_patch_model_json2 = vpn_server_patch_model.to_dict()
assert vpn_server_patch_model_json2 == vpn_server_patch_model_json
-class TestModel_VPNServerReferenceDeleted():
+
+class TestModel_VPNServerReferenceDeleted:
"""
Test Class for VPNServerReferenceDeleted
"""
@@ -55429,7 +58808,8 @@ def test_vpn_server_reference_deleted_serialization(self):
vpn_server_reference_deleted_model_json2 = vpn_server_reference_deleted_model.to_dict()
assert vpn_server_reference_deleted_model_json2 == vpn_server_reference_deleted_model_json
-class TestModel_VPNServerRoute():
+
+class TestModel_VPNServerRoute:
"""
Test Class for VPNServerRoute
"""
@@ -55465,7 +58845,8 @@ def test_vpn_server_route_serialization(self):
vpn_server_route_model_json2 = vpn_server_route_model.to_dict()
assert vpn_server_route_model_json2 == vpn_server_route_model_json
-class TestModel_VPNServerRouteCollection():
+
+class TestModel_VPNServerRouteCollection:
"""
Test Class for VPNServerRouteCollection
"""
@@ -55477,13 +58858,13 @@ def test_vpn_server_route_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_route_collection_first_model = {} # VPNServerRouteCollectionFirst
+ vpn_server_route_collection_first_model = {} # VPNServerRouteCollectionFirst
vpn_server_route_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?limit=20'
- vpn_server_route_collection_next_model = {} # VPNServerRouteCollectionNext
+ vpn_server_route_collection_next_model = {} # VPNServerRouteCollectionNext
vpn_server_route_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routes?start=a5e812a2-62c0-4555-86a5-907106760c56&limit=20'
- vpn_server_route_model = {} # VPNServerRoute
+ vpn_server_route_model = {} # VPNServerRoute
vpn_server_route_model['action'] = 'deliver'
vpn_server_route_model['created_at'] = '2019-01-01T12:00:00Z'
vpn_server_route_model['destination'] = '192.168.3.0/24'
@@ -55516,7 +58897,8 @@ def test_vpn_server_route_collection_serialization(self):
vpn_server_route_collection_model_json2 = vpn_server_route_collection_model.to_dict()
assert vpn_server_route_collection_model_json2 == vpn_server_route_collection_model_json
-class TestModel_VPNServerRouteCollectionFirst():
+
+class TestModel_VPNServerRouteCollectionFirst:
"""
Test Class for VPNServerRouteCollectionFirst
"""
@@ -55545,7 +58927,8 @@ def test_vpn_server_route_collection_first_serialization(self):
vpn_server_route_collection_first_model_json2 = vpn_server_route_collection_first_model.to_dict()
assert vpn_server_route_collection_first_model_json2 == vpn_server_route_collection_first_model_json
-class TestModel_VPNServerRouteCollectionNext():
+
+class TestModel_VPNServerRouteCollectionNext:
"""
Test Class for VPNServerRouteCollectionNext
"""
@@ -55574,7 +58957,8 @@ def test_vpn_server_route_collection_next_serialization(self):
vpn_server_route_collection_next_model_json2 = vpn_server_route_collection_next_model.to_dict()
assert vpn_server_route_collection_next_model_json2 == vpn_server_route_collection_next_model_json
-class TestModel_VPNServerRoutePatch():
+
+class TestModel_VPNServerRoutePatch:
"""
Test Class for VPNServerRoutePatch
"""
@@ -55603,7 +58987,8 @@ def test_vpn_server_route_patch_serialization(self):
vpn_server_route_patch_model_json2 = vpn_server_route_patch_model.to_dict()
assert vpn_server_route_patch_model_json2 == vpn_server_route_patch_model_json
-class TestModel_Volume():
+
+class TestModel_Volume:
"""
Test Class for Volume
"""
@@ -55615,15 +59000,15 @@ def test_volume_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 = {} # EncryptionKeyReference
encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_health_reason_model = {} # VolumeHealthReason
+ 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'
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -55633,29 +59018,29 @@ def test_volume_serialization(self):
operating_system_model['vendor'] = 'Canonical'
operating_system_model['version'] = '16.04 LTS'
- volume_profile_reference_model = {} # VolumeProfileReference
+ volume_profile_reference_model = {} # VolumeProfileReference
volume_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose'
volume_profile_reference_model['name'] = 'general-purpose'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['name'] = 'my-image'
- snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
+ snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- snapshot_reference_model = {} # SnapshotReference
+ snapshot_reference_model = {} # SnapshotReference
snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
snapshot_reference_model['deleted'] = snapshot_reference_deleted_model
snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
@@ -55663,28 +59048,28 @@ def test_volume_serialization(self):
snapshot_reference_model['name'] = 'my-snapshot'
snapshot_reference_model['resource_type'] = 'snapshot'
- volume_status_reason_model = {} # VolumeStatusReason
+ 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_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted
+ volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted
volume_attachment_reference_volume_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['name'] = 'my-instance'
- volume_attachment_reference_volume_context_model = {} # VolumeAttachmentReferenceVolumeContext
+ volume_attachment_reference_volume_context_model = {} # VolumeAttachmentReferenceVolumeContext
volume_attachment_reference_volume_context_model['delete_volume_on_instance_delete'] = True
volume_attachment_reference_volume_context_model['deleted'] = volume_attachment_reference_volume_context_deleted_model
volume_attachment_reference_volume_context_model['device'] = volume_attachment_device_model
@@ -55694,7 +59079,7 @@ def test_volume_serialization(self):
volume_attachment_reference_volume_context_model['name'] = 'my-volume-attachment'
volume_attachment_reference_volume_context_model['type'] = 'boot'
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
@@ -55741,7 +59126,8 @@ def test_volume_serialization(self):
volume_model_json2 = volume_model.to_dict()
assert volume_model_json2 == volume_model_json
-class TestModel_VolumeAttachment():
+
+class TestModel_VolumeAttachment:
"""
Test Class for VolumeAttachment
"""
@@ -55753,13 +59139,13 @@ def test_volume_attachment_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
+ volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
+ volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
volume_reference_volume_attachment_context_model['crn'] = 'crn:[...]'
volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model
volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/ca4b6df3-f5a8-4667-b5f2-f3b9b4160781'
@@ -55794,7 +59180,8 @@ def test_volume_attachment_serialization(self):
volume_attachment_model_json2 = volume_attachment_model.to_dict()
assert volume_attachment_model_json2 == volume_attachment_model_json
-class TestModel_VolumeAttachmentCollection():
+
+class TestModel_VolumeAttachmentCollection:
"""
Test Class for VolumeAttachmentCollection
"""
@@ -55806,20 +59193,20 @@ def test_volume_attachment_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
+ volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
+ volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
volume_reference_volume_attachment_context_model['crn'] = 'crn:[...]'
volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model
volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/ac0b16a5-ccc2-47dd-90e2-b9e5f367b6c6'
volume_reference_volume_attachment_context_model['id'] = 'ac0b16a5-ccc2-47dd-90e2-b9e5f367b6c6'
volume_reference_volume_attachment_context_model['name'] = 'my-boot-volume'
- volume_attachment_model = {} # VolumeAttachment
+ volume_attachment_model = {} # VolumeAttachment
volume_attachment_model['bandwidth'] = 250
volume_attachment_model['created_at'] = '2019-02-28T16:32:05Z'
volume_attachment_model['delete_volume_on_instance_delete'] = False
@@ -55850,7 +59237,8 @@ def test_volume_attachment_collection_serialization(self):
volume_attachment_collection_model_json2 = volume_attachment_collection_model.to_dict()
assert volume_attachment_collection_model_json2 == volume_attachment_collection_model_json
-class TestModel_VolumeAttachmentDevice():
+
+class TestModel_VolumeAttachmentDevice:
"""
Test Class for VolumeAttachmentDevice
"""
@@ -55879,7 +59267,8 @@ def test_volume_attachment_device_serialization(self):
volume_attachment_device_model_json2 = volume_attachment_device_model.to_dict()
assert volume_attachment_device_model_json2 == volume_attachment_device_model_json
-class TestModel_VolumeAttachmentPatch():
+
+class TestModel_VolumeAttachmentPatch:
"""
Test Class for VolumeAttachmentPatch
"""
@@ -55909,7 +59298,8 @@ def test_volume_attachment_patch_serialization(self):
volume_attachment_patch_model_json2 = volume_attachment_patch_model.to_dict()
assert volume_attachment_patch_model_json2 == volume_attachment_patch_model_json
-class TestModel_VolumeAttachmentPrototype():
+
+class TestModel_VolumeAttachmentPrototype:
"""
Test Class for VolumeAttachmentPrototype
"""
@@ -55921,7 +59311,7 @@ def test_volume_attachment_prototype_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
# Construct a json representation of a VolumeAttachmentPrototype model
@@ -55945,7 +59335,8 @@ def test_volume_attachment_prototype_serialization(self):
volume_attachment_prototype_model_json2 = volume_attachment_prototype_model.to_dict()
assert volume_attachment_prototype_model_json2 == volume_attachment_prototype_model_json
-class TestModel_VolumeAttachmentPrototypeInstanceByImageContext():
+
+class TestModel_VolumeAttachmentPrototypeInstanceByImageContext:
"""
Test Class for VolumeAttachmentPrototypeInstanceByImageContext
"""
@@ -55957,14 +59348,14 @@ 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 = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
@@ -55992,7 +59383,8 @@ def test_volume_attachment_prototype_instance_by_image_context_serialization(sel
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():
+
+class TestModel_VolumeAttachmentPrototypeInstanceBySourceSnapshotContext:
"""
Test Class for VolumeAttachmentPrototypeInstanceBySourceSnapshotContext
"""
@@ -56004,16 +59396,16 @@ 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 = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
- volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext
+ volume_prototype_instance_by_source_snapshot_context_model = {} # 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
@@ -56043,7 +59435,8 @@ def test_volume_attachment_prototype_instance_by_source_snapshot_context_seriali
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():
+
+class TestModel_VolumeAttachmentPrototypeInstanceByVolumeContext:
"""
Test Class for VolumeAttachmentPrototypeInstanceByVolumeContext
"""
@@ -56055,7 +59448,7 @@ def test_volume_attachment_prototype_instance_by_volume_context_serialization(se
# Construct dict forms of any model objects needed in order to build this model.
- volume_identity_model = {} # VolumeIdentityById
+ volume_identity_model = {} # VolumeIdentityById
volume_identity_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
# Construct a json representation of a VolumeAttachmentPrototypeInstanceByVolumeContext model
@@ -56079,7 +59472,8 @@ def test_volume_attachment_prototype_instance_by_volume_context_serialization(se
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():
+
+class TestModel_VolumeAttachmentReferenceInstanceContext:
"""
Test Class for VolumeAttachmentReferenceInstanceContext
"""
@@ -56091,16 +59485,16 @@ def test_volume_attachment_reference_instance_context_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted
+ volume_attachment_reference_instance_context_deleted_model = {} # VolumeAttachmentReferenceInstanceContextDeleted
volume_attachment_reference_instance_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
+ volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
+ volume_reference_volume_attachment_context_model = {} # VolumeReferenceVolumeAttachmentContext
volume_reference_volume_attachment_context_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
volume_reference_volume_attachment_context_model['deleted'] = volume_reference_volume_attachment_context_deleted_model
volume_reference_volume_attachment_context_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
@@ -56131,7 +59525,8 @@ def test_volume_attachment_reference_instance_context_serialization(self):
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_VolumeAttachmentReferenceInstanceContextDeleted():
+
+class TestModel_VolumeAttachmentReferenceInstanceContextDeleted:
"""
Test Class for VolumeAttachmentReferenceInstanceContextDeleted
"""
@@ -56160,7 +59555,8 @@ def test_volume_attachment_reference_instance_context_deleted_serialization(self
volume_attachment_reference_instance_context_deleted_model_json2 = volume_attachment_reference_instance_context_deleted_model.to_dict()
assert volume_attachment_reference_instance_context_deleted_model_json2 == volume_attachment_reference_instance_context_deleted_model_json
-class TestModel_VolumeAttachmentReferenceVolumeContext():
+
+class TestModel_VolumeAttachmentReferenceVolumeContext:
"""
Test Class for VolumeAttachmentReferenceVolumeContext
"""
@@ -56172,16 +59568,16 @@ def test_volume_attachment_reference_volume_context_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted
+ volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted
volume_attachment_reference_volume_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -56214,7 +59610,8 @@ def test_volume_attachment_reference_volume_context_serialization(self):
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_VolumeAttachmentReferenceVolumeContextDeleted():
+
+class TestModel_VolumeAttachmentReferenceVolumeContextDeleted:
"""
Test Class for VolumeAttachmentReferenceVolumeContextDeleted
"""
@@ -56243,7 +59640,8 @@ def test_volume_attachment_reference_volume_context_deleted_serialization(self):
volume_attachment_reference_volume_context_deleted_model_json2 = volume_attachment_reference_volume_context_deleted_model.to_dict()
assert volume_attachment_reference_volume_context_deleted_model_json2 == volume_attachment_reference_volume_context_deleted_model_json
-class TestModel_VolumeCollection():
+
+class TestModel_VolumeCollection:
"""
Test Class for VolumeCollection
"""
@@ -56255,21 +59653,21 @@ def test_volume_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_collection_first_model = {} # VolumeCollectionFirst
+ volume_collection_first_model = {} # VolumeCollectionFirst
volume_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20'
- volume_collection_next_model = {} # VolumeCollectionNext
+ volume_collection_next_model = {} # VolumeCollectionNext
volume_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- encryption_key_reference_model = {} # EncryptionKeyReference
+ encryption_key_reference_model = {} # EncryptionKeyReference
encryption_key_reference_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_health_reason_model = {} # VolumeHealthReason
+ 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'
- operating_system_model = {} # OperatingSystem
+ operating_system_model = {} # OperatingSystem
operating_system_model['architecture'] = 'amd64'
operating_system_model['dedicated_host_only'] = False
operating_system_model['display_name'] = 'Ubuntu Server 16.04 LTS amd64'
@@ -56279,29 +59677,29 @@ def test_volume_collection_serialization(self):
operating_system_model['vendor'] = 'Canonical'
operating_system_model['version'] = '16.04 LTS'
- volume_profile_reference_model = {} # VolumeProfileReference
+ volume_profile_reference_model = {} # VolumeProfileReference
volume_profile_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose'
volume_profile_reference_model['name'] = 'general-purpose'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- image_reference_deleted_model = {} # ImageReferenceDeleted
+ image_reference_deleted_model = {} # ImageReferenceDeleted
image_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- image_reference_model = {} # ImageReference
+ image_reference_model = {} # ImageReference
image_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['deleted'] = image_reference_deleted_model
image_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
image_reference_model['name'] = 'my-image'
- snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
+ snapshot_reference_deleted_model = {} # SnapshotReferenceDeleted
snapshot_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- snapshot_reference_model = {} # SnapshotReference
+ snapshot_reference_model = {} # SnapshotReference
snapshot_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::snapshot:r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
snapshot_reference_model['deleted'] = snapshot_reference_deleted_model
snapshot_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/snapshots/r134-f6bfa329-0e36-433f-a3bb-0df632e79263'
@@ -56309,28 +59707,28 @@ def test_volume_collection_serialization(self):
snapshot_reference_model['name'] = 'my-snapshot'
snapshot_reference_model['resource_type'] = 'snapshot'
- volume_status_reason_model = {} # VolumeStatusReason
+ 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_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted
+ volume_attachment_reference_volume_context_deleted_model = {} # VolumeAttachmentReferenceVolumeContextDeleted
volume_attachment_reference_volume_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- volume_attachment_device_model = {} # VolumeAttachmentDevice
+ volume_attachment_device_model = {} # VolumeAttachmentDevice
volume_attachment_device_model['id'] = '80b3e36e-41f4-40e9-bd56-beae81792a68'
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_reference_model = {} # InstanceReference
+ instance_reference_model = {} # InstanceReference
instance_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['deleted'] = instance_reference_deleted_model
instance_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_reference_model['name'] = 'my-instance'
- volume_attachment_reference_volume_context_model = {} # VolumeAttachmentReferenceVolumeContext
+ volume_attachment_reference_volume_context_model = {} # VolumeAttachmentReferenceVolumeContext
volume_attachment_reference_volume_context_model['delete_volume_on_instance_delete'] = True
volume_attachment_reference_volume_context_model['deleted'] = volume_attachment_reference_volume_context_deleted_model
volume_attachment_reference_volume_context_model['device'] = volume_attachment_device_model
@@ -56340,11 +59738,11 @@ def test_volume_collection_serialization(self):
volume_attachment_reference_volume_context_model['name'] = 'my-volume-attachment'
volume_attachment_reference_volume_context_model['type'] = 'boot'
- zone_reference_model = {} # ZoneReference
+ zone_reference_model = {} # 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'
- volume_model = {} # Volume
+ volume_model = {} # Volume
volume_model['active'] = True
volume_model['attachment_state'] = 'attached'
volume_model['bandwidth'] = 1000
@@ -56393,7 +59791,8 @@ def test_volume_collection_serialization(self):
volume_collection_model_json2 = volume_collection_model.to_dict()
assert volume_collection_model_json2 == volume_collection_model_json
-class TestModel_VolumeCollectionFirst():
+
+class TestModel_VolumeCollectionFirst:
"""
Test Class for VolumeCollectionFirst
"""
@@ -56422,7 +59821,8 @@ def test_volume_collection_first_serialization(self):
volume_collection_first_model_json2 = volume_collection_first_model.to_dict()
assert volume_collection_first_model_json2 == volume_collection_first_model_json
-class TestModel_VolumeCollectionNext():
+
+class TestModel_VolumeCollectionNext:
"""
Test Class for VolumeCollectionNext
"""
@@ -56451,7 +59851,8 @@ def test_volume_collection_next_serialization(self):
volume_collection_next_model_json2 = volume_collection_next_model.to_dict()
assert volume_collection_next_model_json2 == volume_collection_next_model_json
-class TestModel_VolumeHealthReason():
+
+class TestModel_VolumeHealthReason:
"""
Test Class for VolumeHealthReason
"""
@@ -56482,7 +59883,8 @@ def test_volume_health_reason_serialization(self):
volume_health_reason_model_json2 = volume_health_reason_model.to_dict()
assert volume_health_reason_model_json2 == volume_health_reason_model_json
-class TestModel_VolumePatch():
+
+class TestModel_VolumePatch:
"""
Test Class for VolumePatch
"""
@@ -56494,7 +59896,7 @@ def test_volume_patch_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
# Construct a json representation of a VolumePatch model
@@ -56520,7 +59922,8 @@ def test_volume_patch_serialization(self):
volume_patch_model_json2 = volume_patch_model.to_dict()
assert volume_patch_model_json2 == volume_patch_model_json
-class TestModel_VolumeProfile():
+
+class TestModel_VolumeProfile:
"""
Test Class for VolumeProfile
"""
@@ -56551,7 +59954,8 @@ def test_volume_profile_serialization(self):
volume_profile_model_json2 = volume_profile_model.to_dict()
assert volume_profile_model_json2 == volume_profile_model_json
-class TestModel_VolumeProfileCollection():
+
+class TestModel_VolumeProfileCollection:
"""
Test Class for VolumeProfileCollection
"""
@@ -56563,13 +59967,13 @@ def test_volume_profile_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_profile_collection_first_model = {} # VolumeProfileCollectionFirst
+ volume_profile_collection_first_model = {} # VolumeProfileCollectionFirst
volume_profile_collection_first_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?limit=20'
- volume_profile_collection_next_model = {} # VolumeProfileCollectionNext
+ volume_profile_collection_next_model = {} # VolumeProfileCollectionNext
volume_profile_collection_next_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20'
- volume_profile_model = {} # VolumeProfile
+ volume_profile_model = {} # VolumeProfile
volume_profile_model['family'] = 'tiered'
volume_profile_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose'
volume_profile_model['name'] = 'general-purpose'
@@ -56597,7 +60001,8 @@ def test_volume_profile_collection_serialization(self):
volume_profile_collection_model_json2 = volume_profile_collection_model.to_dict()
assert volume_profile_collection_model_json2 == volume_profile_collection_model_json
-class TestModel_VolumeProfileCollectionFirst():
+
+class TestModel_VolumeProfileCollectionFirst:
"""
Test Class for VolumeProfileCollectionFirst
"""
@@ -56626,7 +60031,8 @@ def test_volume_profile_collection_first_serialization(self):
volume_profile_collection_first_model_json2 = volume_profile_collection_first_model.to_dict()
assert volume_profile_collection_first_model_json2 == volume_profile_collection_first_model_json
-class TestModel_VolumeProfileCollectionNext():
+
+class TestModel_VolumeProfileCollectionNext:
"""
Test Class for VolumeProfileCollectionNext
"""
@@ -56655,7 +60061,8 @@ def test_volume_profile_collection_next_serialization(self):
volume_profile_collection_next_model_json2 = volume_profile_collection_next_model.to_dict()
assert volume_profile_collection_next_model_json2 == volume_profile_collection_next_model_json
-class TestModel_VolumeProfileReference():
+
+class TestModel_VolumeProfileReference:
"""
Test Class for VolumeProfileReference
"""
@@ -56685,7 +60092,8 @@ def test_volume_profile_reference_serialization(self):
volume_profile_reference_model_json2 = volume_profile_reference_model.to_dict()
assert volume_profile_reference_model_json2 == volume_profile_reference_model_json
-class TestModel_VolumePrototypeInstanceByImageContext():
+
+class TestModel_VolumePrototypeInstanceByImageContext:
"""
Test Class for VolumePrototypeInstanceByImageContext
"""
@@ -56697,15 +60105,15 @@ 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 = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
# Construct a json representation of a VolumePrototypeInstanceByImageContext model
volume_prototype_instance_by_image_context_model_json = {}
- volume_prototype_instance_by_image_context_model_json['capacity'] = 250
+ volume_prototype_instance_by_image_context_model_json['capacity'] = 100
volume_prototype_instance_by_image_context_model_json['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model_json['iops'] = 10000
volume_prototype_instance_by_image_context_model_json['name'] = 'my-volume'
@@ -56727,7 +60135,8 @@ def test_volume_prototype_instance_by_image_context_serialization(self):
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():
+
+class TestModel_VolumePrototypeInstanceBySourceSnapshotContext:
"""
Test Class for VolumePrototypeInstanceBySourceSnapshotContext
"""
@@ -56739,13 +60148,13 @@ 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 = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
# Construct a json representation of a VolumePrototypeInstanceBySourceSnapshotContext model
@@ -56773,7 +60182,8 @@ def test_volume_prototype_instance_by_source_snapshot_context_serialization(self
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():
+
+class TestModel_VolumeReference:
"""
Test Class for VolumeReference
"""
@@ -56785,7 +60195,7 @@ def test_volume_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a VolumeReference model
@@ -56811,7 +60221,8 @@ def test_volume_reference_serialization(self):
volume_reference_model_json2 = volume_reference_model.to_dict()
assert volume_reference_model_json2 == volume_reference_model_json
-class TestModel_VolumeReferenceDeleted():
+
+class TestModel_VolumeReferenceDeleted:
"""
Test Class for VolumeReferenceDeleted
"""
@@ -56840,7 +60251,8 @@ def test_volume_reference_deleted_serialization(self):
volume_reference_deleted_model_json2 = volume_reference_deleted_model.to_dict()
assert volume_reference_deleted_model_json2 == volume_reference_deleted_model_json
-class TestModel_VolumeReferenceVolumeAttachmentContext():
+
+class TestModel_VolumeReferenceVolumeAttachmentContext:
"""
Test Class for VolumeReferenceVolumeAttachmentContext
"""
@@ -56852,7 +60264,7 @@ def test_volume_reference_volume_attachment_context_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
+ volume_reference_volume_attachment_context_deleted_model = {} # VolumeReferenceVolumeAttachmentContextDeleted
volume_reference_volume_attachment_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a VolumeReferenceVolumeAttachmentContext model
@@ -56878,7 +60290,8 @@ def test_volume_reference_volume_attachment_context_serialization(self):
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_VolumeReferenceVolumeAttachmentContextDeleted():
+
+class TestModel_VolumeReferenceVolumeAttachmentContextDeleted:
"""
Test Class for VolumeReferenceVolumeAttachmentContextDeleted
"""
@@ -56907,7 +60320,8 @@ def test_volume_reference_volume_attachment_context_deleted_serialization(self):
volume_reference_volume_attachment_context_deleted_model_json2 = volume_reference_volume_attachment_context_deleted_model.to_dict()
assert volume_reference_volume_attachment_context_deleted_model_json2 == volume_reference_volume_attachment_context_deleted_model_json
-class TestModel_VolumeStatusReason():
+
+class TestModel_VolumeStatusReason:
"""
Test Class for VolumeStatusReason
"""
@@ -56938,7 +60352,8 @@ def test_volume_status_reason_serialization(self):
volume_status_reason_model_json2 = volume_status_reason_model.to_dict()
assert volume_status_reason_model_json2 == volume_status_reason_model_json
-class TestModel_Zone():
+
+class TestModel_Zone:
"""
Test Class for Zone
"""
@@ -56950,7 +60365,7 @@ def test_zone_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- region_reference_model = {} # RegionReference
+ region_reference_model = {} # RegionReference
region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south'
region_reference_model['name'] = 'us-south'
@@ -56976,7 +60391,8 @@ def test_zone_serialization(self):
zone_model_json2 = zone_model.to_dict()
assert zone_model_json2 == zone_model_json
-class TestModel_ZoneCollection():
+
+class TestModel_ZoneCollection:
"""
Test Class for ZoneCollection
"""
@@ -56988,11 +60404,11 @@ def test_zone_collection_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- region_reference_model = {} # RegionReference
+ region_reference_model = {} # RegionReference
region_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south'
region_reference_model['name'] = 'us-south'
- zone_model = {} # Zone
+ zone_model = {} # Zone
zone_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1'
zone_model['name'] = 'us-south-1'
zone_model['region'] = region_reference_model
@@ -57017,7 +60433,8 @@ def test_zone_collection_serialization(self):
zone_collection_model_json2 = zone_collection_model.to_dict()
assert zone_collection_model_json2 == zone_collection_model_json
-class TestModel_ZoneReference():
+
+class TestModel_ZoneReference:
"""
Test Class for ZoneReference
"""
@@ -57047,7 +60464,8 @@ def test_zone_reference_serialization(self):
zone_reference_model_json2 = zone_reference_model.to_dict()
assert zone_reference_model_json2 == zone_reference_model_json
-class TestModel_BackupPolicyJobSourceVolumeReference():
+
+class TestModel_BackupPolicyJobSourceVolumeReference:
"""
Test Class for BackupPolicyJobSourceVolumeReference
"""
@@ -57059,7 +60477,7 @@ def test_backup_policy_job_source_volume_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_reference_deleted_model = {} # VolumeReferenceDeleted
+ volume_reference_deleted_model = {} # VolumeReferenceDeleted
volume_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a BackupPolicyJobSourceVolumeReference model
@@ -57085,7 +60503,8 @@ def test_backup_policy_job_source_volume_reference_serialization(self):
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_BareMetalServerBootTargetBareMetalServerDiskReference():
+
+class TestModel_BareMetalServerBootTargetBareMetalServerDiskReference:
"""
Test Class for BareMetalServerBootTargetBareMetalServerDiskReference
"""
@@ -57097,7 +60516,7 @@ def test_bare_metal_server_boot_target_bare_metal_server_disk_reference_serializ
# Construct dict forms of any model objects needed in order to build this model.
- bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted
+ bare_metal_server_disk_reference_deleted_model = {} # BareMetalServerDiskReferenceDeleted
bare_metal_server_disk_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a BareMetalServerBootTargetBareMetalServerDiskReference model
@@ -57123,7 +60542,8 @@ def test_bare_metal_server_boot_target_bare_metal_server_disk_reference_serializ
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():
+
+class TestModel_BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount:
"""
Test Class for BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount
"""
@@ -57135,10 +60555,10 @@ def test_bare_metal_server_initialization_user_account_bare_metal_server_initial
# Construct dict forms of any model objects needed in order to build this model.
- key_reference_deleted_model = {} # KeyReferenceDeleted
+ key_reference_deleted_model = {} # KeyReferenceDeleted
key_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- key_reference_model = {} # KeyReference
+ key_reference_model = {} # KeyReference
key_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::key:a6b1a881-2ce8-41a3-80fc-36316a73f803'
key_reference_model['deleted'] = key_reference_deleted_model
key_reference_model['fingerprint'] = 'SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY'
@@ -57168,7 +60588,8 @@ def test_bare_metal_server_initialization_user_account_bare_metal_server_initial
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_BareMetalServerNetworkInterfaceByHiperSocket():
+
+class TestModel_BareMetalServerNetworkInterfaceByHiperSocket:
"""
Test Class for BareMetalServerNetworkInterfaceByHiperSocket
"""
@@ -57180,10 +60601,10 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self)
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- floating_ip_reference_model = {} # FloatingIPReference
+ 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/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model
@@ -57191,10 +60612,10 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self)
floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['name'] = 'my-floating-ip'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -57202,20 +60623,20 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self)
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -57257,7 +60678,8 @@ def test_bare_metal_server_network_interface_by_hiper_socket_serialization(self)
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():
+
+class TestModel_BareMetalServerNetworkInterfaceByPCI:
"""
Test Class for BareMetalServerNetworkInterfaceByPCI
"""
@@ -57269,10 +60691,10 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- floating_ip_reference_model = {} # FloatingIPReference
+ 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/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model
@@ -57280,10 +60702,10 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self):
floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['name'] = 'my-floating-ip'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -57291,20 +60713,20 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -57347,7 +60769,8 @@ def test_bare_metal_server_network_interface_by_pci_serialization(self):
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():
+
+class TestModel_BareMetalServerNetworkInterfaceByVLAN:
"""
Test Class for BareMetalServerNetworkInterfaceByVLAN
"""
@@ -57359,10 +60782,10 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
+ floating_ip_reference_deleted_model = {} # FloatingIPReferenceDeleted
floating_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- floating_ip_reference_model = {} # FloatingIPReference
+ 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/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['deleted'] = floating_ip_reference_deleted_model
@@ -57370,10 +60793,10 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self):
floating_ip_reference_model['id'] = '39300233-9995-4806-89a5-3c1b6eb88689'
floating_ip_reference_model['name'] = 'my-floating-ip'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -57381,20 +60804,20 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self):
reserved_ip_reference_model['name'] = 'my-reserved-ip'
reserved_ip_reference_model['resource_type'] = 'subnet_reserved_ip'
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- security_group_reference_model = {} # SecurityGroupReference
+ security_group_reference_model = {} # SecurityGroupReference
security_group_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['deleted'] = security_group_reference_deleted_model
security_group_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
security_group_reference_model['name'] = 'my-security-group'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -57438,7 +60861,8 @@ def test_bare_metal_server_network_interface_by_vlan_serialization(self):
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():
+
+class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype:
"""
Test Class for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype
"""
@@ -57450,15 +60874,15 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
network_interface_ip_prototype_model['address'] = '10.0.0.5'
network_interface_ip_prototype_model['auto_delete'] = False
network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
- security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model = {} # SecurityGroupIdentityById
security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype model
@@ -57486,7 +60910,8 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network
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():
+
+class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype:
"""
Test Class for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype
"""
@@ -57498,15 +60923,15 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
network_interface_ip_prototype_model['address'] = '10.0.0.5'
network_interface_ip_prototype_model['auto_delete'] = False
network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
- security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model = {} # SecurityGroupIdentityById
security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPCIPrototype model
@@ -57535,7 +60960,8 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network
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():
+
+class TestModel_BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype:
"""
Test Class for BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype
"""
@@ -57547,15 +60973,15 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
network_interface_ip_prototype_model['address'] = '10.0.0.5'
network_interface_ip_prototype_model['auto_delete'] = False
network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
- security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model = {} # SecurityGroupIdentityById
security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVLANPrototype model
@@ -57585,7 +61011,8 @@ def test_bare_metal_server_network_interface_prototype_bare_metal_server_network
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_BareMetalServerProfileBandwidthDependent():
+
+class TestModel_BareMetalServerProfileBandwidthDependent:
"""
Test Class for BareMetalServerProfileBandwidthDependent
"""
@@ -57614,7 +61041,8 @@ def test_bare_metal_server_profile_bandwidth_dependent_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileBandwidthEnum:
"""
Test Class for BareMetalServerProfileBandwidthEnum
"""
@@ -57645,7 +61073,8 @@ def test_bare_metal_server_profile_bandwidth_enum_serialization(self):
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
-class TestModel_BareMetalServerProfileBandwidthFixed():
+
+class TestModel_BareMetalServerProfileBandwidthFixed:
"""
Test Class for BareMetalServerProfileBandwidthFixed
"""
@@ -57675,7 +61104,8 @@ def test_bare_metal_server_profile_bandwidth_fixed_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileBandwidthRange:
"""
Test Class for BareMetalServerProfileBandwidthRange
"""
@@ -57708,7 +61138,8 @@ def test_bare_metal_server_profile_bandwidth_range_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUCoreCountDependent:
"""
Test Class for BareMetalServerProfileCPUCoreCountDependent
"""
@@ -57737,7 +61168,8 @@ def test_bare_metal_server_profile_cpu_core_count_dependent_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUCoreCountEnum:
"""
Test Class for BareMetalServerProfileCPUCoreCountEnum
"""
@@ -57768,7 +61200,8 @@ def test_bare_metal_server_profile_cpu_core_count_enum_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUCoreCountFixed:
"""
Test Class for BareMetalServerProfileCPUCoreCountFixed
"""
@@ -57798,7 +61231,8 @@ def test_bare_metal_server_profile_cpu_core_count_fixed_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUCoreCountRange:
"""
Test Class for BareMetalServerProfileCPUCoreCountRange
"""
@@ -57831,7 +61265,8 @@ def test_bare_metal_server_profile_cpu_core_count_range_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUSocketCountDependent:
"""
Test Class for BareMetalServerProfileCPUSocketCountDependent
"""
@@ -57860,7 +61295,8 @@ def test_bare_metal_server_profile_cpu_socket_count_dependent_serialization(self
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():
+
+class TestModel_BareMetalServerProfileCPUSocketCountEnum:
"""
Test Class for BareMetalServerProfileCPUSocketCountEnum
"""
@@ -57891,7 +61327,8 @@ def test_bare_metal_server_profile_cpu_socket_count_enum_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUSocketCountFixed:
"""
Test Class for BareMetalServerProfileCPUSocketCountFixed
"""
@@ -57921,7 +61358,8 @@ def test_bare_metal_server_profile_cpu_socket_count_fixed_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileCPUSocketCountRange:
"""
Test Class for BareMetalServerProfileCPUSocketCountRange
"""
@@ -57954,7 +61392,8 @@ def test_bare_metal_server_profile_cpu_socket_count_range_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskQuantityDependent:
"""
Test Class for BareMetalServerProfileDiskQuantityDependent
"""
@@ -57983,7 +61422,8 @@ def test_bare_metal_server_profile_disk_quantity_dependent_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskQuantityEnum:
"""
Test Class for BareMetalServerProfileDiskQuantityEnum
"""
@@ -58014,7 +61454,8 @@ def test_bare_metal_server_profile_disk_quantity_enum_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskQuantityFixed:
"""
Test Class for BareMetalServerProfileDiskQuantityFixed
"""
@@ -58044,7 +61485,8 @@ def test_bare_metal_server_profile_disk_quantity_fixed_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskQuantityRange:
"""
Test Class for BareMetalServerProfileDiskQuantityRange
"""
@@ -58077,7 +61519,8 @@ def test_bare_metal_server_profile_disk_quantity_range_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskSizeDependent:
"""
Test Class for BareMetalServerProfileDiskSizeDependent
"""
@@ -58106,7 +61549,8 @@ def test_bare_metal_server_profile_disk_size_dependent_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskSizeEnum:
"""
Test Class for BareMetalServerProfileDiskSizeEnum
"""
@@ -58137,7 +61581,8 @@ def test_bare_metal_server_profile_disk_size_enum_serialization(self):
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
-class TestModel_BareMetalServerProfileDiskSizeFixed():
+
+class TestModel_BareMetalServerProfileDiskSizeFixed:
"""
Test Class for BareMetalServerProfileDiskSizeFixed
"""
@@ -58167,7 +61612,8 @@ def test_bare_metal_server_profile_disk_size_fixed_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileDiskSizeRange:
"""
Test Class for BareMetalServerProfileDiskSizeRange
"""
@@ -58200,7 +61646,8 @@ def test_bare_metal_server_profile_disk_size_range_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileIdentityByHref:
"""
Test Class for BareMetalServerProfileIdentityByHref
"""
@@ -58229,7 +61676,8 @@ def test_bare_metal_server_profile_identity_by_href_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileIdentityByName:
"""
Test Class for BareMetalServerProfileIdentityByName
"""
@@ -58258,7 +61706,8 @@ def test_bare_metal_server_profile_identity_by_name_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileMemoryDependent:
"""
Test Class for BareMetalServerProfileMemoryDependent
"""
@@ -58287,7 +61736,8 @@ def test_bare_metal_server_profile_memory_dependent_serialization(self):
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():
+
+class TestModel_BareMetalServerProfileMemoryEnum:
"""
Test Class for BareMetalServerProfileMemoryEnum
"""
@@ -58318,7 +61768,8 @@ def test_bare_metal_server_profile_memory_enum_serialization(self):
bare_metal_server_profile_memory_enum_model_json2 = bare_metal_server_profile_memory_enum_model.to_dict()
assert bare_metal_server_profile_memory_enum_model_json2 == bare_metal_server_profile_memory_enum_model_json
-class TestModel_BareMetalServerProfileMemoryFixed():
+
+class TestModel_BareMetalServerProfileMemoryFixed:
"""
Test Class for BareMetalServerProfileMemoryFixed
"""
@@ -58348,7 +61799,8 @@ def test_bare_metal_server_profile_memory_fixed_serialization(self):
bare_metal_server_profile_memory_fixed_model_json2 = bare_metal_server_profile_memory_fixed_model.to_dict()
assert bare_metal_server_profile_memory_fixed_model_json2 == bare_metal_server_profile_memory_fixed_model_json
-class TestModel_BareMetalServerProfileMemoryRange():
+
+class TestModel_BareMetalServerProfileMemoryRange:
"""
Test Class for BareMetalServerProfileMemoryRange
"""
@@ -58381,7 +61833,70 @@ def test_bare_metal_server_profile_memory_range_serialization(self):
bare_metal_server_profile_memory_range_model_json2 = bare_metal_server_profile_memory_range_model.to_dict()
assert bare_metal_server_profile_memory_range_model_json2 == bare_metal_server_profile_memory_range_model_json
-class TestModel_CatalogOfferingIdentityCatalogOfferingByCRN():
+
+class TestModel_BareMetalServerProfileNetworkInterfaceCountDependent:
+ """
+ Test Class for BareMetalServerProfileNetworkInterfaceCountDependent
+ """
+
+ def test_bare_metal_server_profile_network_interface_count_dependent_serialization(self):
+ """
+ Test serialization/deserialization for BareMetalServerProfileNetworkInterfaceCountDependent
+ """
+
+ # Construct a json representation of a BareMetalServerProfileNetworkInterfaceCountDependent model
+ bare_metal_server_profile_network_interface_count_dependent_model_json = {}
+ bare_metal_server_profile_network_interface_count_dependent_model_json['type'] = 'dependent'
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert bare_metal_server_profile_network_interface_count_dependent_model == bare_metal_server_profile_network_interface_count_dependent_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ bare_metal_server_profile_network_interface_count_dependent_model_json2 = bare_metal_server_profile_network_interface_count_dependent_model.to_dict()
+ assert bare_metal_server_profile_network_interface_count_dependent_model_json2 == bare_metal_server_profile_network_interface_count_dependent_model_json
+
+
+class TestModel_BareMetalServerProfileNetworkInterfaceCountRange:
+ """
+ Test Class for BareMetalServerProfileNetworkInterfaceCountRange
+ """
+
+ def test_bare_metal_server_profile_network_interface_count_range_serialization(self):
+ """
+ Test serialization/deserialization for BareMetalServerProfileNetworkInterfaceCountRange
+ """
+
+ # Construct a json representation of a BareMetalServerProfileNetworkInterfaceCountRange model
+ bare_metal_server_profile_network_interface_count_range_model_json = {}
+ bare_metal_server_profile_network_interface_count_range_model_json['max'] = 128
+ bare_metal_server_profile_network_interface_count_range_model_json['min'] = 1
+ bare_metal_server_profile_network_interface_count_range_model_json['type'] = 'range'
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert bare_metal_server_profile_network_interface_count_range_model == bare_metal_server_profile_network_interface_count_range_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ bare_metal_server_profile_network_interface_count_range_model_json2 = bare_metal_server_profile_network_interface_count_range_model.to_dict()
+ assert bare_metal_server_profile_network_interface_count_range_model_json2 == bare_metal_server_profile_network_interface_count_range_model_json
+
+
+class TestModel_CatalogOfferingIdentityCatalogOfferingByCRN:
"""
Test Class for CatalogOfferingIdentityCatalogOfferingByCRN
"""
@@ -58410,7 +61925,8 @@ def test_catalog_offering_identity_catalog_offering_by_crn_serialization(self):
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():
+
+class TestModel_CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN:
"""
Test Class for CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN
"""
@@ -58439,7 +61955,8 @@ def test_catalog_offering_version_identity_catalog_offering_version_by_crn_seria
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_CertificateInstanceIdentityByCRN():
+
+class TestModel_CertificateInstanceIdentityByCRN:
"""
Test Class for CertificateInstanceIdentityByCRN
"""
@@ -58468,7 +61985,68 @@ def test_certificate_instance_identity_by_crn_serialization(self):
certificate_instance_identity_by_crn_model_json2 = certificate_instance_identity_by_crn_model.to_dict()
assert certificate_instance_identity_by_crn_model_json2 == certificate_instance_identity_by_crn_model_json
-class TestModel_DNSInstanceIdentityByCRN():
+
+class TestModel_CloudObjectStorageBucketIdentityByCRN:
+ """
+ Test Class for CloudObjectStorageBucketIdentityByCRN
+ """
+
+ def test_cloud_object_storage_bucket_identity_by_crn_serialization(self):
+ """
+ Test serialization/deserialization for CloudObjectStorageBucketIdentityByCRN
+ """
+
+ # 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/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4:bucket:my-bucket'
+
+ # Construct a model instance of CloudObjectStorageBucketIdentityByCRN by calling from_dict on the json representation
+ cloud_object_storage_bucket_identity_by_crn_model = CloudObjectStorageBucketIdentityByCRN.from_dict(cloud_object_storage_bucket_identity_by_crn_model_json)
+ 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)
+
+ # 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
+
+
+class TestModel_CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName:
+ """
+ Test Class for CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName
+ """
+
+ def test_cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_serialization(self):
+ """
+ Test serialization/deserialization for CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName
+ """
+
+ # Construct a json representation of a CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName model
+ cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json = {}
+ cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json['name'] = 'bucket-27200-lwx4cfvcue'
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model == cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model_json2 = cloud_object_storage_bucket_identity_cloud_object_storage_bucket_identity_by_name_model.to_dict()
+ 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_DNSInstanceIdentityByCRN:
"""
Test Class for DNSInstanceIdentityByCRN
"""
@@ -58497,7 +62075,8 @@ def test_dns_instance_identity_by_crn_serialization(self):
dns_instance_identity_by_crn_model_json2 = dns_instance_identity_by_crn_model.to_dict()
assert dns_instance_identity_by_crn_model_json2 == dns_instance_identity_by_crn_model_json
-class TestModel_DNSZoneIdentityById():
+
+class TestModel_DNSZoneIdentityById:
"""
Test Class for DNSZoneIdentityById
"""
@@ -58526,7 +62105,8 @@ def test_dns_zone_identity_by_id_serialization(self):
dns_zone_identity_by_id_model_json2 = dns_zone_identity_by_id_model.to_dict()
assert dns_zone_identity_by_id_model_json2 == dns_zone_identity_by_id_model_json
-class TestModel_DedicatedHostGroupIdentityByCRN():
+
+class TestModel_DedicatedHostGroupIdentityByCRN:
"""
Test Class for DedicatedHostGroupIdentityByCRN
"""
@@ -58555,7 +62135,8 @@ def test_dedicated_host_group_identity_by_crn_serialization(self):
dedicated_host_group_identity_by_crn_model_json2 = dedicated_host_group_identity_by_crn_model.to_dict()
assert dedicated_host_group_identity_by_crn_model_json2 == dedicated_host_group_identity_by_crn_model_json
-class TestModel_DedicatedHostGroupIdentityByHref():
+
+class TestModel_DedicatedHostGroupIdentityByHref:
"""
Test Class for DedicatedHostGroupIdentityByHref
"""
@@ -58584,7 +62165,8 @@ def test_dedicated_host_group_identity_by_href_serialization(self):
dedicated_host_group_identity_by_href_model_json2 = dedicated_host_group_identity_by_href_model.to_dict()
assert dedicated_host_group_identity_by_href_model_json2 == dedicated_host_group_identity_by_href_model_json
-class TestModel_DedicatedHostGroupIdentityById():
+
+class TestModel_DedicatedHostGroupIdentityById:
"""
Test Class for DedicatedHostGroupIdentityById
"""
@@ -58613,7 +62195,8 @@ def test_dedicated_host_group_identity_by_id_serialization(self):
dedicated_host_group_identity_by_id_model_json2 = dedicated_host_group_identity_by_id_model.to_dict()
assert dedicated_host_group_identity_by_id_model_json2 == dedicated_host_group_identity_by_id_model_json
-class TestModel_DedicatedHostProfileIdentityByHref():
+
+class TestModel_DedicatedHostProfileIdentityByHref:
"""
Test Class for DedicatedHostProfileIdentityByHref
"""
@@ -58642,7 +62225,8 @@ def test_dedicated_host_profile_identity_by_href_serialization(self):
dedicated_host_profile_identity_by_href_model_json2 = dedicated_host_profile_identity_by_href_model.to_dict()
assert dedicated_host_profile_identity_by_href_model_json2 == dedicated_host_profile_identity_by_href_model_json
-class TestModel_DedicatedHostProfileIdentityByName():
+
+class TestModel_DedicatedHostProfileIdentityByName:
"""
Test Class for DedicatedHostProfileIdentityByName
"""
@@ -58671,7 +62255,8 @@ def test_dedicated_host_profile_identity_by_name_serialization(self):
dedicated_host_profile_identity_by_name_model_json2 = dedicated_host_profile_identity_by_name_model.to_dict()
assert dedicated_host_profile_identity_by_name_model_json2 == dedicated_host_profile_identity_by_name_model_json
-class TestModel_DedicatedHostProfileMemoryDependent():
+
+class TestModel_DedicatedHostProfileMemoryDependent:
"""
Test Class for DedicatedHostProfileMemoryDependent
"""
@@ -58700,7 +62285,8 @@ def test_dedicated_host_profile_memory_dependent_serialization(self):
dedicated_host_profile_memory_dependent_model_json2 = dedicated_host_profile_memory_dependent_model.to_dict()
assert dedicated_host_profile_memory_dependent_model_json2 == dedicated_host_profile_memory_dependent_model_json
-class TestModel_DedicatedHostProfileMemoryEnum():
+
+class TestModel_DedicatedHostProfileMemoryEnum:
"""
Test Class for DedicatedHostProfileMemoryEnum
"""
@@ -58731,7 +62317,8 @@ def test_dedicated_host_profile_memory_enum_serialization(self):
dedicated_host_profile_memory_enum_model_json2 = dedicated_host_profile_memory_enum_model.to_dict()
assert dedicated_host_profile_memory_enum_model_json2 == dedicated_host_profile_memory_enum_model_json
-class TestModel_DedicatedHostProfileMemoryFixed():
+
+class TestModel_DedicatedHostProfileMemoryFixed:
"""
Test Class for DedicatedHostProfileMemoryFixed
"""
@@ -58761,7 +62348,8 @@ def test_dedicated_host_profile_memory_fixed_serialization(self):
dedicated_host_profile_memory_fixed_model_json2 = dedicated_host_profile_memory_fixed_model.to_dict()
assert dedicated_host_profile_memory_fixed_model_json2 == dedicated_host_profile_memory_fixed_model_json
-class TestModel_DedicatedHostProfileMemoryRange():
+
+class TestModel_DedicatedHostProfileMemoryRange:
"""
Test Class for DedicatedHostProfileMemoryRange
"""
@@ -58794,7 +62382,8 @@ def test_dedicated_host_profile_memory_range_serialization(self):
dedicated_host_profile_memory_range_model_json2 = dedicated_host_profile_memory_range_model.to_dict()
assert dedicated_host_profile_memory_range_model_json2 == dedicated_host_profile_memory_range_model_json
-class TestModel_DedicatedHostProfileSocketDependent():
+
+class TestModel_DedicatedHostProfileSocketDependent:
"""
Test Class for DedicatedHostProfileSocketDependent
"""
@@ -58823,7 +62412,8 @@ def test_dedicated_host_profile_socket_dependent_serialization(self):
dedicated_host_profile_socket_dependent_model_json2 = dedicated_host_profile_socket_dependent_model.to_dict()
assert dedicated_host_profile_socket_dependent_model_json2 == dedicated_host_profile_socket_dependent_model_json
-class TestModel_DedicatedHostProfileSocketEnum():
+
+class TestModel_DedicatedHostProfileSocketEnum:
"""
Test Class for DedicatedHostProfileSocketEnum
"""
@@ -58854,7 +62444,8 @@ def test_dedicated_host_profile_socket_enum_serialization(self):
dedicated_host_profile_socket_enum_model_json2 = dedicated_host_profile_socket_enum_model.to_dict()
assert dedicated_host_profile_socket_enum_model_json2 == dedicated_host_profile_socket_enum_model_json
-class TestModel_DedicatedHostProfileSocketFixed():
+
+class TestModel_DedicatedHostProfileSocketFixed:
"""
Test Class for DedicatedHostProfileSocketFixed
"""
@@ -58884,7 +62475,8 @@ def test_dedicated_host_profile_socket_fixed_serialization(self):
dedicated_host_profile_socket_fixed_model_json2 = dedicated_host_profile_socket_fixed_model.to_dict()
assert dedicated_host_profile_socket_fixed_model_json2 == dedicated_host_profile_socket_fixed_model_json
-class TestModel_DedicatedHostProfileSocketRange():
+
+class TestModel_DedicatedHostProfileSocketRange:
"""
Test Class for DedicatedHostProfileSocketRange
"""
@@ -58917,7 +62509,8 @@ def test_dedicated_host_profile_socket_range_serialization(self):
dedicated_host_profile_socket_range_model_json2 = dedicated_host_profile_socket_range_model.to_dict()
assert dedicated_host_profile_socket_range_model_json2 == dedicated_host_profile_socket_range_model_json
-class TestModel_DedicatedHostProfileVCPUDependent():
+
+class TestModel_DedicatedHostProfileVCPUDependent:
"""
Test Class for DedicatedHostProfileVCPUDependent
"""
@@ -58946,7 +62539,8 @@ def test_dedicated_host_profile_vcpu_dependent_serialization(self):
dedicated_host_profile_vcpu_dependent_model_json2 = dedicated_host_profile_vcpu_dependent_model.to_dict()
assert dedicated_host_profile_vcpu_dependent_model_json2 == dedicated_host_profile_vcpu_dependent_model_json
-class TestModel_DedicatedHostProfileVCPUEnum():
+
+class TestModel_DedicatedHostProfileVCPUEnum:
"""
Test Class for DedicatedHostProfileVCPUEnum
"""
@@ -58977,7 +62571,8 @@ def test_dedicated_host_profile_vcpu_enum_serialization(self):
dedicated_host_profile_vcpu_enum_model_json2 = dedicated_host_profile_vcpu_enum_model.to_dict()
assert dedicated_host_profile_vcpu_enum_model_json2 == dedicated_host_profile_vcpu_enum_model_json
-class TestModel_DedicatedHostProfileVCPUFixed():
+
+class TestModel_DedicatedHostProfileVCPUFixed:
"""
Test Class for DedicatedHostProfileVCPUFixed
"""
@@ -59007,7 +62602,8 @@ def test_dedicated_host_profile_vcpu_fixed_serialization(self):
dedicated_host_profile_vcpu_fixed_model_json2 = dedicated_host_profile_vcpu_fixed_model.to_dict()
assert dedicated_host_profile_vcpu_fixed_model_json2 == dedicated_host_profile_vcpu_fixed_model_json
-class TestModel_DedicatedHostProfileVCPURange():
+
+class TestModel_DedicatedHostProfileVCPURange:
"""
Test Class for DedicatedHostProfileVCPURange
"""
@@ -59040,7 +62636,8 @@ def test_dedicated_host_profile_vcpu_range_serialization(self):
dedicated_host_profile_vcpu_range_model_json2 = dedicated_host_profile_vcpu_range_model.to_dict()
assert dedicated_host_profile_vcpu_range_model_json2 == dedicated_host_profile_vcpu_range_model_json
-class TestModel_DedicatedHostPrototypeDedicatedHostByGroup():
+
+class TestModel_DedicatedHostPrototypeDedicatedHostByGroup:
"""
Test Class for DedicatedHostPrototypeDedicatedHostByGroup
"""
@@ -59052,13 +62649,13 @@ def test_dedicated_host_prototype_dedicated_host_by_group_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_profile_identity_model = {} # DedicatedHostProfileIdentityByName
+ dedicated_host_profile_identity_model = {} # DedicatedHostProfileIdentityByName
dedicated_host_profile_identity_model['name'] = 'mx2-host-152x1216'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- dedicated_host_group_identity_model = {} # DedicatedHostGroupIdentityById
+ dedicated_host_group_identity_model = {} # DedicatedHostGroupIdentityById
dedicated_host_group_identity_model['id'] = 'bcc5b834-1258-4b9c-c3b4-43bc9cf5cde0'
# Construct a json representation of a DedicatedHostPrototypeDedicatedHostByGroup model
@@ -59084,7 +62681,8 @@ def test_dedicated_host_prototype_dedicated_host_by_group_serialization(self):
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():
+
+class TestModel_DedicatedHostPrototypeDedicatedHostByZone:
"""
Test Class for DedicatedHostPrototypeDedicatedHostByZone
"""
@@ -59096,17 +62694,17 @@ def test_dedicated_host_prototype_dedicated_host_by_zone_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_profile_identity_model = {} # DedicatedHostProfileIdentityByName
+ dedicated_host_profile_identity_model = {} # DedicatedHostProfileIdentityByName
dedicated_host_profile_identity_model['name'] = 'mx2-host-152x1216'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # 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-host-group'
dedicated_host_group_prototype_dedicated_host_by_zone_context_model['resource_group'] = resource_group_identity_model
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a DedicatedHostPrototypeDedicatedHostByZone model
@@ -59133,7 +62731,8 @@ def test_dedicated_host_prototype_dedicated_host_by_zone_serialization(self):
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():
+
+class TestModel_EncryptionKeyIdentityByCRN:
"""
Test Class for EncryptionKeyIdentityByCRN
"""
@@ -59162,7 +62761,8 @@ def test_encryption_key_identity_by_crn_serialization(self):
encryption_key_identity_by_crn_model_json2 = encryption_key_identity_by_crn_model.to_dict()
assert encryption_key_identity_by_crn_model_json2 == encryption_key_identity_by_crn_model_json
-class TestModel_EndpointGatewayReservedIPReservedIPPrototypeTargetContext():
+
+class TestModel_EndpointGatewayReservedIPReservedIPPrototypeTargetContext:
"""
Test Class for EndpointGatewayReservedIPReservedIPPrototypeTargetContext
"""
@@ -59174,7 +62774,7 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_seria
# Construct dict forms of any model objects needed in order to build this model.
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a EndpointGatewayReservedIPReservedIPPrototypeTargetContext model
@@ -59199,7 +62799,8 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_prototype_target_context_seria
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_EndpointGatewayTargetProviderCloudServiceReference():
+
+class TestModel_EndpointGatewayTargetProviderCloudServiceReference:
"""
Test Class for EndpointGatewayTargetProviderCloudServiceReference
"""
@@ -59229,7 +62830,8 @@ def test_endpoint_gateway_target_provider_cloud_service_reference_serialization(
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():
+
+class TestModel_EndpointGatewayTargetProviderInfrastructureServiceReference:
"""
Test Class for EndpointGatewayTargetProviderInfrastructureServiceReference
"""
@@ -59259,65 +62861,8 @@ def test_endpoint_gateway_target_provider_infrastructure_service_reference_seria
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_FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref():
- """
- Test Class for FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
- """
-
- def test_floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_serialization(self):
- """
- Test serialization/deserialization for FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
- """
-
- # Construct a json representation of a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json = {}
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
-
- # Construct a model instance of FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model = FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json)
- assert floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model != False
-
- # Construct a model instance of FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_dict = FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json).__dict__
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model2 = FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(**floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_dict)
-
- # Verify the model instances are equivalent
- assert floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model == floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model2
-
- # Convert model instance back to dict and verify no loss of data
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model.to_dict()
- assert floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json2 == floating_ip_by_target_network_interface_identity_network_interface_identity_by_href_model_json
-
-class TestModel_FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById():
- """
- Test Class for FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById
- """
-
- def test_floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_serialization(self):
- """
- Test serialization/deserialization for FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById
- """
-
- # Construct a json representation of a FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById model
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json = {}
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
-
- # Construct a model instance of FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model = FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json)
- assert floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model != False
-
- # Construct a model instance of FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_dict = FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json).__dict__
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model2 = FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById(**floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_dict)
-
- # Verify the model instances are equivalent
- assert floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model == floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model2
-
- # Convert model instance back to dict and verify no loss of data
- floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model.to_dict()
- assert floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json2 == floating_ip_by_target_network_interface_identity_network_interface_identity_by_id_model_json
-class TestModel_FloatingIPPrototypeFloatingIPByTarget():
+class TestModel_FloatingIPPrototypeFloatingIPByTarget:
"""
Test Class for FloatingIPPrototypeFloatingIPByTarget
"""
@@ -59329,17 +62874,17 @@ def test_floating_ip_prototype_floating_ip_by_target_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- floating_ip_by_target_network_interface_identity_model = {} # FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityById
- floating_ip_by_target_network_interface_identity_model['id'] = '69e55145-cc7d-4d8e-9e1f-cc3fb60b1793'
+ floating_ip_target_prototype_model = {} # FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById
+ floating_ip_target_prototype_model['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
# Construct a json representation of a FloatingIPPrototypeFloatingIPByTarget model
floating_ip_prototype_floating_ip_by_target_model_json = {}
floating_ip_prototype_floating_ip_by_target_model_json['name'] = 'my-floating-ip'
floating_ip_prototype_floating_ip_by_target_model_json['resource_group'] = resource_group_identity_model
- floating_ip_prototype_floating_ip_by_target_model_json['target'] = floating_ip_by_target_network_interface_identity_model
+ floating_ip_prototype_floating_ip_by_target_model_json['target'] = floating_ip_target_prototype_model
# Construct a model instance of FloatingIPPrototypeFloatingIPByTarget by calling from_dict on the json representation
floating_ip_prototype_floating_ip_by_target_model = FloatingIPPrototypeFloatingIPByTarget.from_dict(floating_ip_prototype_floating_ip_by_target_model_json)
@@ -59356,7 +62901,8 @@ def test_floating_ip_prototype_floating_ip_by_target_serialization(self):
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():
+
+class TestModel_FloatingIPPrototypeFloatingIPByZone:
"""
Test Class for FloatingIPPrototypeFloatingIPByZone
"""
@@ -59368,10 +62914,10 @@ def test_floating_ip_prototype_floating_ip_by_zone_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a FloatingIPPrototypeFloatingIPByZone model
@@ -59395,65 +62941,8 @@ def test_floating_ip_prototype_floating_ip_by_zone_serialization(self):
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_FloatingIPTargetPatchNetworkInterfaceIdentityByHref():
- """
- Test Class for FloatingIPTargetPatchNetworkInterfaceIdentityByHref
- """
-
- def test_floating_ip_target_patch_network_interface_identity_by_href_serialization(self):
- """
- Test serialization/deserialization for FloatingIPTargetPatchNetworkInterfaceIdentityByHref
- """
-
- # Construct a json representation of a FloatingIPTargetPatchNetworkInterfaceIdentityByHref model
- floating_ip_target_patch_network_interface_identity_by_href_model_json = {}
- floating_ip_target_patch_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
-
- # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityByHref by calling from_dict on the json representation
- floating_ip_target_patch_network_interface_identity_by_href_model = FloatingIPTargetPatchNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_network_interface_identity_by_href_model_json)
- assert floating_ip_target_patch_network_interface_identity_by_href_model != False
-
- # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityByHref by calling from_dict on the json representation
- floating_ip_target_patch_network_interface_identity_by_href_model_dict = FloatingIPTargetPatchNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_network_interface_identity_by_href_model_json).__dict__
- floating_ip_target_patch_network_interface_identity_by_href_model2 = FloatingIPTargetPatchNetworkInterfaceIdentityByHref(**floating_ip_target_patch_network_interface_identity_by_href_model_dict)
-
- # Verify the model instances are equivalent
- assert floating_ip_target_patch_network_interface_identity_by_href_model == floating_ip_target_patch_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_by_href_model_json2 = floating_ip_target_patch_network_interface_identity_by_href_model.to_dict()
- assert floating_ip_target_patch_network_interface_identity_by_href_model_json2 == floating_ip_target_patch_network_interface_identity_by_href_model_json
-class TestModel_FloatingIPTargetPatchNetworkInterfaceIdentityById():
- """
- Test Class for FloatingIPTargetPatchNetworkInterfaceIdentityById
- """
-
- def test_floating_ip_target_patch_network_interface_identity_by_id_serialization(self):
- """
- Test serialization/deserialization for FloatingIPTargetPatchNetworkInterfaceIdentityById
- """
-
- # Construct a json representation of a FloatingIPTargetPatchNetworkInterfaceIdentityById model
- floating_ip_target_patch_network_interface_identity_by_id_model_json = {}
- floating_ip_target_patch_network_interface_identity_by_id_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
-
- # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityById by calling from_dict on the json representation
- floating_ip_target_patch_network_interface_identity_by_id_model = FloatingIPTargetPatchNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_network_interface_identity_by_id_model_json)
- assert floating_ip_target_patch_network_interface_identity_by_id_model != False
-
- # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityById by calling from_dict on the json representation
- floating_ip_target_patch_network_interface_identity_by_id_model_dict = FloatingIPTargetPatchNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_network_interface_identity_by_id_model_json).__dict__
- floating_ip_target_patch_network_interface_identity_by_id_model2 = FloatingIPTargetPatchNetworkInterfaceIdentityById(**floating_ip_target_patch_network_interface_identity_by_id_model_dict)
-
- # Verify the model instances are equivalent
- assert floating_ip_target_patch_network_interface_identity_by_id_model == floating_ip_target_patch_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_by_id_model_json2 = floating_ip_target_patch_network_interface_identity_by_id_model.to_dict()
- assert floating_ip_target_patch_network_interface_identity_by_id_model_json2 == floating_ip_target_patch_network_interface_identity_by_id_model_json
-
-class TestModel_FloatingIPTargetNetworkInterfaceReference():
+class TestModel_FloatingIPTargetNetworkInterfaceReference:
"""
Test Class for FloatingIPTargetNetworkInterfaceReference
"""
@@ -59465,13 +62954,13 @@ def test_floating_ip_target_network_interface_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
+ network_interface_reference_deleted_model = {} # NetworkInterfaceReferenceDeleted
network_interface_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
+ reserved_ip_reference_deleted_model = {} # ReservedIPReferenceDeleted
reserved_ip_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- reserved_ip_reference_model = {} # ReservedIPReference
+ reserved_ip_reference_model = {} # ReservedIPReference
reserved_ip_reference_model['address'] = '192.168.3.4'
reserved_ip_reference_model['deleted'] = reserved_ip_reference_deleted_model
reserved_ip_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e/reserved_ips/6d353a0f-aeb1-4ae1-832e-1110d10981bb'
@@ -59503,7 +62992,8 @@ def test_floating_ip_target_network_interface_reference_serialization(self):
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():
+
+class TestModel_FloatingIPTargetPublicGatewayReference:
"""
Test Class for FloatingIPTargetPublicGatewayReference
"""
@@ -59515,7 +63005,7 @@ def test_floating_ip_target_public_gateway_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
+ public_gateway_reference_deleted_model = {} # PublicGatewayReferenceDeleted
public_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a FloatingIPTargetPublicGatewayReference model
@@ -59542,7 +63032,8 @@ def test_floating_ip_target_public_gateway_reference_serialization(self):
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_FlowLogCollectorTargetInstanceReference():
+
+class TestModel_FlowLogCollectorTargetInstanceReference:
"""
Test Class for FlowLogCollectorTargetInstanceReference
"""
@@ -59554,7 +63045,7 @@ def test_flow_log_collector_target_instance_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a FlowLogCollectorTargetInstanceReference model
@@ -59580,7 +63071,8 @@ def test_flow_log_collector_target_instance_reference_serialization(self):
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():
+
+class TestModel_FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext:
"""
Test Class for FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext
"""
@@ -59592,7 +63084,7 @@ def test_flow_log_collector_target_network_interface_reference_target_context_se
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext model
@@ -59618,7 +63110,8 @@ def test_flow_log_collector_target_network_interface_reference_target_context_se
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():
+
+class TestModel_FlowLogCollectorTargetSubnetReference:
"""
Test Class for FlowLogCollectorTargetSubnetReference
"""
@@ -59630,7 +63123,7 @@ def test_flow_log_collector_target_subnet_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a FlowLogCollectorTargetSubnetReference model
@@ -59657,7 +63150,8 @@ def test_flow_log_collector_target_subnet_reference_serialization(self):
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():
+
+class TestModel_FlowLogCollectorTargetVPCReference:
"""
Test Class for FlowLogCollectorTargetVPCReference
"""
@@ -59669,7 +63163,7 @@ def test_flow_log_collector_target_vpc_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a FlowLogCollectorTargetVPCReference model
@@ -59696,7 +63190,8 @@ def test_flow_log_collector_target_vpc_reference_serialization(self):
flow_log_collector_target_vpc_reference_model_json2 = flow_log_collector_target_vpc_reference_model.to_dict()
assert flow_log_collector_target_vpc_reference_model_json2 == flow_log_collector_target_vpc_reference_model_json
-class TestModel_ImageIdentityByCRN():
+
+class TestModel_ImageIdentityByCRN:
"""
Test Class for ImageIdentityByCRN
"""
@@ -59725,7 +63220,8 @@ def test_image_identity_by_crn_serialization(self):
image_identity_by_crn_model_json2 = image_identity_by_crn_model.to_dict()
assert image_identity_by_crn_model_json2 == image_identity_by_crn_model_json
-class TestModel_ImageIdentityByHref():
+
+class TestModel_ImageIdentityByHref:
"""
Test Class for ImageIdentityByHref
"""
@@ -59754,7 +63250,8 @@ def test_image_identity_by_href_serialization(self):
image_identity_by_href_model_json2 = image_identity_by_href_model.to_dict()
assert image_identity_by_href_model_json2 == image_identity_by_href_model_json
-class TestModel_ImageIdentityById():
+
+class TestModel_ImageIdentityById:
"""
Test Class for ImageIdentityById
"""
@@ -59783,7 +63280,8 @@ def test_image_identity_by_id_serialization(self):
image_identity_by_id_model_json2 = image_identity_by_id_model.to_dict()
assert image_identity_by_id_model_json2 == image_identity_by_id_model_json
-class TestModel_ImagePrototypeImageByFile():
+
+class TestModel_ImagePrototypeImageByFile:
"""
Test Class for ImagePrototypeImageByFile
"""
@@ -59795,16 +63293,16 @@ def test_image_prototype_image_by_file_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- image_file_prototype_model = {} # ImageFilePrototype
+ image_file_prototype_model = {} # ImageFilePrototype
image_file_prototype_model['href'] = 'cos://us-south/custom-image-vpc-bucket/customImage-0.vhd'
- operating_system_identity_model = {} # OperatingSystemIdentityByName
+ operating_system_identity_model = {} # OperatingSystemIdentityByName
operating_system_identity_model['name'] = 'ubuntu-16-amd64'
# Construct a json representation of a ImagePrototypeImageByFile model
@@ -59831,7 +63329,8 @@ def test_image_prototype_image_by_file_serialization(self):
image_prototype_image_by_file_model_json2 = image_prototype_image_by_file_model.to_dict()
assert image_prototype_image_by_file_model_json2 == image_prototype_image_by_file_model_json
-class TestModel_ImagePrototypeImageBySourceVolume():
+
+class TestModel_ImagePrototypeImageBySourceVolume:
"""
Test Class for ImagePrototypeImageBySourceVolume
"""
@@ -59843,13 +63342,13 @@ def test_image_prototype_image_by_source_volume_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_identity_model = {} # VolumeIdentityById
+ volume_identity_model = {} # VolumeIdentityById
volume_identity_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
# Construct a json representation of a ImagePrototypeImageBySourceVolume model
@@ -59874,7 +63373,8 @@ def test_image_prototype_image_by_source_volume_serialization(self):
image_prototype_image_by_source_volume_model_json2 = image_prototype_image_by_source_volume_model.to_dict()
assert image_prototype_image_by_source_volume_model_json2 == image_prototype_image_by_source_volume_model_json
-class TestModel_InstanceCatalogOfferingPrototypeCatalogOfferingByOffering():
+
+class TestModel_InstanceCatalogOfferingPrototypeCatalogOfferingByOffering:
"""
Test Class for InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
"""
@@ -59886,7 +63386,7 @@ 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_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
+ catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442'
# Construct a json representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByOffering model
@@ -59908,7 +63408,8 @@ def test_instance_catalog_offering_prototype_catalog_offering_by_offering_serial
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():
+
+class TestModel_InstanceCatalogOfferingPrototypeCatalogOfferingByVersion:
"""
Test Class for InstanceCatalogOfferingPrototypeCatalogOfferingByVersion
"""
@@ -59920,7 +63421,7 @@ 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_identity_model = {} # CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN
+ catalog_offering_version_identity_model = {} # CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN
catalog_offering_version_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:00111601-0ec5-41ac-b142-96d1e64e6442/ec66bec2-6a33-42d6-9323-26dd4dc8875d'
# Construct a json representation of a InstanceCatalogOfferingPrototypeCatalogOfferingByVersion model
@@ -59942,7 +63443,8 @@ def test_instance_catalog_offering_prototype_catalog_offering_by_version_seriali
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_InstanceGroupManagerAutoScale():
+
+class TestModel_InstanceGroupManagerAutoScale:
"""
Test Class for InstanceGroupManagerAutoScale
"""
@@ -59954,10 +63456,10 @@ def test_instance_group_manager_auto_scale_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted
+ instance_group_manager_policy_reference_deleted_model = {} # InstanceGroupManagerPolicyReferenceDeleted
instance_group_manager_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference
+ instance_group_manager_policy_reference_model = {} # InstanceGroupManagerPolicyReference
instance_group_manager_policy_reference_model['deleted'] = instance_group_manager_policy_reference_deleted_model
instance_group_manager_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_manager_policy_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -59993,7 +63495,8 @@ def test_instance_group_manager_auto_scale_serialization(self):
instance_group_manager_auto_scale_model_json2 = instance_group_manager_auto_scale_model.to_dict()
assert instance_group_manager_auto_scale_model_json2 == instance_group_manager_auto_scale_model_json
-class TestModel_InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype():
+
+class TestModel_InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype:
"""
Test Class for InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype
"""
@@ -60025,7 +63528,8 @@ def test_instance_group_manager_policy_prototype_instance_group_manager_target_p
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():
+
+class TestModel_InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy:
"""
Test Class for InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy
"""
@@ -60061,7 +63565,8 @@ def test_instance_group_manager_policy_instance_group_manager_target_policy_seri
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():
+
+class TestModel_InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype:
"""
Test Class for InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype
"""
@@ -60096,7 +63601,8 @@ def test_instance_group_manager_prototype_instance_group_manager_auto_scale_prot
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():
+
+class TestModel_InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype:
"""
Test Class for InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype
"""
@@ -60127,7 +63633,8 @@ def test_instance_group_manager_prototype_instance_group_manager_scheduled_proto
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():
+
+class TestModel_InstanceGroupManagerScheduled:
"""
Test Class for InstanceGroupManagerScheduled
"""
@@ -60139,10 +63646,10 @@ def test_instance_group_manager_scheduled_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_action_reference_deleted_model = {} # InstanceGroupManagerActionReferenceDeleted
+ instance_group_manager_action_reference_deleted_model = {} # InstanceGroupManagerActionReferenceDeleted
instance_group_manager_action_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_manager_action_reference_model = {} # InstanceGroupManagerActionReference
+ instance_group_manager_action_reference_model = {} # InstanceGroupManagerActionReference
instance_group_manager_action_reference_model['deleted'] = instance_group_manager_action_reference_deleted_model
instance_group_manager_action_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/actions/1e09281b-f177-46fb-baf1-bc152b2e391a'
instance_group_manager_action_reference_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -60175,7 +63682,8 @@ def test_instance_group_manager_scheduled_serialization(self):
instance_group_manager_scheduled_model_json2 = instance_group_manager_scheduled_model.to_dict()
assert instance_group_manager_scheduled_model_json2 == instance_group_manager_scheduled_model_json
-class TestModel_InstanceGroupManagerScheduledActionManagerAutoScale():
+
+class TestModel_InstanceGroupManagerScheduledActionManagerAutoScale:
"""
Test Class for InstanceGroupManagerScheduledActionManagerAutoScale
"""
@@ -60187,7 +63695,7 @@ def test_instance_group_manager_scheduled_action_manager_auto_scale_serializatio
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
+ instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstanceGroupManagerScheduledActionManagerAutoScale model
@@ -60214,7 +63722,8 @@ def test_instance_group_manager_scheduled_action_manager_auto_scale_serializatio
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_InstancePatchProfileInstanceProfileIdentityByHref():
+
+class TestModel_InstancePatchProfileInstanceProfileIdentityByHref:
"""
Test Class for InstancePatchProfileInstanceProfileIdentityByHref
"""
@@ -60243,7 +63752,8 @@ def test_instance_patch_profile_instance_profile_identity_by_href_serialization(
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():
+
+class TestModel_InstancePatchProfileInstanceProfileIdentityByName:
"""
Test Class for InstancePatchProfileInstanceProfileIdentityByName
"""
@@ -60272,7 +63782,8 @@ def test_instance_patch_profile_instance_profile_identity_by_name_serialization(
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():
+
+class TestModel_InstancePlacementTargetDedicatedHostGroupReference:
"""
Test Class for InstancePlacementTargetDedicatedHostGroupReference
"""
@@ -60284,7 +63795,7 @@ def test_instance_placement_target_dedicated_host_group_reference_serialization(
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
+ dedicated_host_group_reference_deleted_model = {} # DedicatedHostGroupReferenceDeleted
dedicated_host_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstancePlacementTargetDedicatedHostGroupReference model
@@ -60311,7 +63822,8 @@ def test_instance_placement_target_dedicated_host_group_reference_serialization(
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():
+
+class TestModel_InstancePlacementTargetDedicatedHostReference:
"""
Test Class for InstancePlacementTargetDedicatedHostReference
"""
@@ -60323,7 +63835,7 @@ def test_instance_placement_target_dedicated_host_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
+ dedicated_host_reference_deleted_model = {} # DedicatedHostReferenceDeleted
dedicated_host_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstancePlacementTargetDedicatedHostReference model
@@ -60350,7 +63862,8 @@ def test_instance_placement_target_dedicated_host_reference_serialization(self):
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():
+
+class TestModel_InstancePlacementTargetPlacementGroupReference:
"""
Test Class for InstancePlacementTargetPlacementGroupReference
"""
@@ -60362,7 +63875,7 @@ def test_instance_placement_target_placement_group_reference_serialization(self)
# Construct dict forms of any model objects needed in order to build this model.
- placement_group_reference_deleted_model = {} # PlacementGroupReferenceDeleted
+ placement_group_reference_deleted_model = {} # PlacementGroupReferenceDeleted
placement_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a InstancePlacementTargetPlacementGroupReference model
@@ -60389,7 +63902,8 @@ def test_instance_placement_target_placement_group_reference_serialization(self)
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():
+
+class TestModel_InstanceProfileBandwidthDependent:
"""
Test Class for InstanceProfileBandwidthDependent
"""
@@ -60418,7 +63932,8 @@ def test_instance_profile_bandwidth_dependent_serialization(self):
instance_profile_bandwidth_dependent_model_json2 = instance_profile_bandwidth_dependent_model.to_dict()
assert instance_profile_bandwidth_dependent_model_json2 == instance_profile_bandwidth_dependent_model_json
-class TestModel_InstanceProfileBandwidthEnum():
+
+class TestModel_InstanceProfileBandwidthEnum:
"""
Test Class for InstanceProfileBandwidthEnum
"""
@@ -60449,7 +63964,8 @@ def test_instance_profile_bandwidth_enum_serialization(self):
instance_profile_bandwidth_enum_model_json2 = instance_profile_bandwidth_enum_model.to_dict()
assert instance_profile_bandwidth_enum_model_json2 == instance_profile_bandwidth_enum_model_json
-class TestModel_InstanceProfileBandwidthFixed():
+
+class TestModel_InstanceProfileBandwidthFixed:
"""
Test Class for InstanceProfileBandwidthFixed
"""
@@ -60479,7 +63995,8 @@ def test_instance_profile_bandwidth_fixed_serialization(self):
instance_profile_bandwidth_fixed_model_json2 = instance_profile_bandwidth_fixed_model.to_dict()
assert instance_profile_bandwidth_fixed_model_json2 == instance_profile_bandwidth_fixed_model_json
-class TestModel_InstanceProfileBandwidthRange():
+
+class TestModel_InstanceProfileBandwidthRange:
"""
Test Class for InstanceProfileBandwidthRange
"""
@@ -60512,7 +64029,8 @@ def test_instance_profile_bandwidth_range_serialization(self):
instance_profile_bandwidth_range_model_json2 = instance_profile_bandwidth_range_model.to_dict()
assert instance_profile_bandwidth_range_model_json2 == instance_profile_bandwidth_range_model_json
-class TestModel_InstanceProfileDiskQuantityDependent():
+
+class TestModel_InstanceProfileDiskQuantityDependent:
"""
Test Class for InstanceProfileDiskQuantityDependent
"""
@@ -60541,7 +64059,8 @@ def test_instance_profile_disk_quantity_dependent_serialization(self):
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
-class TestModel_InstanceProfileDiskQuantityEnum():
+
+class TestModel_InstanceProfileDiskQuantityEnum:
"""
Test Class for InstanceProfileDiskQuantityEnum
"""
@@ -60572,7 +64091,8 @@ def test_instance_profile_disk_quantity_enum_serialization(self):
instance_profile_disk_quantity_enum_model_json2 = instance_profile_disk_quantity_enum_model.to_dict()
assert instance_profile_disk_quantity_enum_model_json2 == instance_profile_disk_quantity_enum_model_json
-class TestModel_InstanceProfileDiskQuantityFixed():
+
+class TestModel_InstanceProfileDiskQuantityFixed:
"""
Test Class for InstanceProfileDiskQuantityFixed
"""
@@ -60602,7 +64122,8 @@ def test_instance_profile_disk_quantity_fixed_serialization(self):
instance_profile_disk_quantity_fixed_model_json2 = instance_profile_disk_quantity_fixed_model.to_dict()
assert instance_profile_disk_quantity_fixed_model_json2 == instance_profile_disk_quantity_fixed_model_json
-class TestModel_InstanceProfileDiskQuantityRange():
+
+class TestModel_InstanceProfileDiskQuantityRange:
"""
Test Class for InstanceProfileDiskQuantityRange
"""
@@ -60635,7 +64156,8 @@ def test_instance_profile_disk_quantity_range_serialization(self):
instance_profile_disk_quantity_range_model_json2 = instance_profile_disk_quantity_range_model.to_dict()
assert instance_profile_disk_quantity_range_model_json2 == instance_profile_disk_quantity_range_model_json
-class TestModel_InstanceProfileDiskSizeDependent():
+
+class TestModel_InstanceProfileDiskSizeDependent:
"""
Test Class for InstanceProfileDiskSizeDependent
"""
@@ -60664,7 +64186,8 @@ def test_instance_profile_disk_size_dependent_serialization(self):
instance_profile_disk_size_dependent_model_json2 = instance_profile_disk_size_dependent_model.to_dict()
assert instance_profile_disk_size_dependent_model_json2 == instance_profile_disk_size_dependent_model_json
-class TestModel_InstanceProfileDiskSizeEnum():
+
+class TestModel_InstanceProfileDiskSizeEnum:
"""
Test Class for InstanceProfileDiskSizeEnum
"""
@@ -60695,7 +64218,8 @@ def test_instance_profile_disk_size_enum_serialization(self):
instance_profile_disk_size_enum_model_json2 = instance_profile_disk_size_enum_model.to_dict()
assert instance_profile_disk_size_enum_model_json2 == instance_profile_disk_size_enum_model_json
-class TestModel_InstanceProfileDiskSizeFixed():
+
+class TestModel_InstanceProfileDiskSizeFixed:
"""
Test Class for InstanceProfileDiskSizeFixed
"""
@@ -60725,7 +64249,8 @@ def test_instance_profile_disk_size_fixed_serialization(self):
instance_profile_disk_size_fixed_model_json2 = instance_profile_disk_size_fixed_model.to_dict()
assert instance_profile_disk_size_fixed_model_json2 == instance_profile_disk_size_fixed_model_json
-class TestModel_InstanceProfileDiskSizeRange():
+
+class TestModel_InstanceProfileDiskSizeRange:
"""
Test Class for InstanceProfileDiskSizeRange
"""
@@ -60758,7 +64283,8 @@ def test_instance_profile_disk_size_range_serialization(self):
instance_profile_disk_size_range_model_json2 = instance_profile_disk_size_range_model.to_dict()
assert instance_profile_disk_size_range_model_json2 == instance_profile_disk_size_range_model_json
-class TestModel_InstanceProfileGPUDependent():
+
+class TestModel_InstanceProfileGPUDependent:
"""
Test Class for InstanceProfileGPUDependent
"""
@@ -60787,7 +64313,8 @@ def test_instance_profile_gpu_dependent_serialization(self):
instance_profile_gpu_dependent_model_json2 = instance_profile_gpu_dependent_model.to_dict()
assert instance_profile_gpu_dependent_model_json2 == instance_profile_gpu_dependent_model_json
-class TestModel_InstanceProfileGPUEnum():
+
+class TestModel_InstanceProfileGPUEnum:
"""
Test Class for InstanceProfileGPUEnum
"""
@@ -60818,7 +64345,8 @@ def test_instance_profile_gpu_enum_serialization(self):
instance_profile_gpu_enum_model_json2 = instance_profile_gpu_enum_model.to_dict()
assert instance_profile_gpu_enum_model_json2 == instance_profile_gpu_enum_model_json
-class TestModel_InstanceProfileGPUFixed():
+
+class TestModel_InstanceProfileGPUFixed:
"""
Test Class for InstanceProfileGPUFixed
"""
@@ -60848,7 +64376,8 @@ def test_instance_profile_gpu_fixed_serialization(self):
instance_profile_gpu_fixed_model_json2 = instance_profile_gpu_fixed_model.to_dict()
assert instance_profile_gpu_fixed_model_json2 == instance_profile_gpu_fixed_model_json
-class TestModel_InstanceProfileGPUMemoryDependent():
+
+class TestModel_InstanceProfileGPUMemoryDependent:
"""
Test Class for InstanceProfileGPUMemoryDependent
"""
@@ -60877,7 +64406,8 @@ def test_instance_profile_gpu_memory_dependent_serialization(self):
instance_profile_gpu_memory_dependent_model_json2 = instance_profile_gpu_memory_dependent_model.to_dict()
assert instance_profile_gpu_memory_dependent_model_json2 == instance_profile_gpu_memory_dependent_model_json
-class TestModel_InstanceProfileGPUMemoryEnum():
+
+class TestModel_InstanceProfileGPUMemoryEnum:
"""
Test Class for InstanceProfileGPUMemoryEnum
"""
@@ -60908,7 +64438,8 @@ def test_instance_profile_gpu_memory_enum_serialization(self):
instance_profile_gpu_memory_enum_model_json2 = instance_profile_gpu_memory_enum_model.to_dict()
assert instance_profile_gpu_memory_enum_model_json2 == instance_profile_gpu_memory_enum_model_json
-class TestModel_InstanceProfileGPUMemoryFixed():
+
+class TestModel_InstanceProfileGPUMemoryFixed:
"""
Test Class for InstanceProfileGPUMemoryFixed
"""
@@ -60938,7 +64469,8 @@ def test_instance_profile_gpu_memory_fixed_serialization(self):
instance_profile_gpu_memory_fixed_model_json2 = instance_profile_gpu_memory_fixed_model.to_dict()
assert instance_profile_gpu_memory_fixed_model_json2 == instance_profile_gpu_memory_fixed_model_json
-class TestModel_InstanceProfileGPUMemoryRange():
+
+class TestModel_InstanceProfileGPUMemoryRange:
"""
Test Class for InstanceProfileGPUMemoryRange
"""
@@ -60971,7 +64503,8 @@ def test_instance_profile_gpu_memory_range_serialization(self):
instance_profile_gpu_memory_range_model_json2 = instance_profile_gpu_memory_range_model.to_dict()
assert instance_profile_gpu_memory_range_model_json2 == instance_profile_gpu_memory_range_model_json
-class TestModel_InstanceProfileGPURange():
+
+class TestModel_InstanceProfileGPURange:
"""
Test Class for InstanceProfileGPURange
"""
@@ -61004,7 +64537,8 @@ def test_instance_profile_gpu_range_serialization(self):
instance_profile_gpu_range_model_json2 = instance_profile_gpu_range_model.to_dict()
assert instance_profile_gpu_range_model_json2 == instance_profile_gpu_range_model_json
-class TestModel_InstanceProfileIdentityByHref():
+
+class TestModel_InstanceProfileIdentityByHref:
"""
Test Class for InstanceProfileIdentityByHref
"""
@@ -61033,7 +64567,8 @@ def test_instance_profile_identity_by_href_serialization(self):
instance_profile_identity_by_href_model_json2 = instance_profile_identity_by_href_model.to_dict()
assert instance_profile_identity_by_href_model_json2 == instance_profile_identity_by_href_model_json
-class TestModel_InstanceProfileIdentityByName():
+
+class TestModel_InstanceProfileIdentityByName:
"""
Test Class for InstanceProfileIdentityByName
"""
@@ -61062,7 +64597,8 @@ def test_instance_profile_identity_by_name_serialization(self):
instance_profile_identity_by_name_model_json2 = instance_profile_identity_by_name_model.to_dict()
assert instance_profile_identity_by_name_model_json2 == instance_profile_identity_by_name_model_json
-class TestModel_InstanceProfileMemoryDependent():
+
+class TestModel_InstanceProfileMemoryDependent:
"""
Test Class for InstanceProfileMemoryDependent
"""
@@ -61091,7 +64627,8 @@ def test_instance_profile_memory_dependent_serialization(self):
instance_profile_memory_dependent_model_json2 = instance_profile_memory_dependent_model.to_dict()
assert instance_profile_memory_dependent_model_json2 == instance_profile_memory_dependent_model_json
-class TestModel_InstanceProfileMemoryEnum():
+
+class TestModel_InstanceProfileMemoryEnum:
"""
Test Class for InstanceProfileMemoryEnum
"""
@@ -61122,7 +64659,8 @@ def test_instance_profile_memory_enum_serialization(self):
instance_profile_memory_enum_model_json2 = instance_profile_memory_enum_model.to_dict()
assert instance_profile_memory_enum_model_json2 == instance_profile_memory_enum_model_json
-class TestModel_InstanceProfileMemoryFixed():
+
+class TestModel_InstanceProfileMemoryFixed:
"""
Test Class for InstanceProfileMemoryFixed
"""
@@ -61152,7 +64690,8 @@ def test_instance_profile_memory_fixed_serialization(self):
instance_profile_memory_fixed_model_json2 = instance_profile_memory_fixed_model.to_dict()
assert instance_profile_memory_fixed_model_json2 == instance_profile_memory_fixed_model_json
-class TestModel_InstanceProfileMemoryRange():
+
+class TestModel_InstanceProfileMemoryRange:
"""
Test Class for InstanceProfileMemoryRange
"""
@@ -61185,7 +64724,8 @@ def test_instance_profile_memory_range_serialization(self):
instance_profile_memory_range_model_json2 = instance_profile_memory_range_model.to_dict()
assert instance_profile_memory_range_model_json2 == instance_profile_memory_range_model_json
-class TestModel_InstanceProfileNetworkInterfaceCountDependent():
+
+class TestModel_InstanceProfileNetworkInterfaceCountDependent:
"""
Test Class for InstanceProfileNetworkInterfaceCountDependent
"""
@@ -61214,7 +64754,8 @@ def test_instance_profile_network_interface_count_dependent_serialization(self):
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():
+
+class TestModel_InstanceProfileNetworkInterfaceCountRange:
"""
Test Class for InstanceProfileNetworkInterfaceCountRange
"""
@@ -61245,7 +64786,8 @@ def test_instance_profile_network_interface_count_range_serialization(self):
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():
+
+class TestModel_InstanceProfilePortSpeedDependent:
"""
Test Class for InstanceProfilePortSpeedDependent
"""
@@ -61274,7 +64816,8 @@ def test_instance_profile_port_speed_dependent_serialization(self):
instance_profile_port_speed_dependent_model_json2 = instance_profile_port_speed_dependent_model.to_dict()
assert instance_profile_port_speed_dependent_model_json2 == instance_profile_port_speed_dependent_model_json
-class TestModel_InstanceProfilePortSpeedFixed():
+
+class TestModel_InstanceProfilePortSpeedFixed:
"""
Test Class for InstanceProfilePortSpeedFixed
"""
@@ -61304,7 +64847,8 @@ def test_instance_profile_port_speed_fixed_serialization(self):
instance_profile_port_speed_fixed_model_json2 = instance_profile_port_speed_fixed_model.to_dict()
assert instance_profile_port_speed_fixed_model_json2 == instance_profile_port_speed_fixed_model_json
-class TestModel_InstanceProfileVCPUDependent():
+
+class TestModel_InstanceProfileVCPUDependent:
"""
Test Class for InstanceProfileVCPUDependent
"""
@@ -61333,7 +64877,8 @@ def test_instance_profile_vcpu_dependent_serialization(self):
instance_profile_vcpu_dependent_model_json2 = instance_profile_vcpu_dependent_model.to_dict()
assert instance_profile_vcpu_dependent_model_json2 == instance_profile_vcpu_dependent_model_json
-class TestModel_InstanceProfileVCPUEnum():
+
+class TestModel_InstanceProfileVCPUEnum:
"""
Test Class for InstanceProfileVCPUEnum
"""
@@ -61364,7 +64909,8 @@ def test_instance_profile_vcpu_enum_serialization(self):
instance_profile_vcpu_enum_model_json2 = instance_profile_vcpu_enum_model.to_dict()
assert instance_profile_vcpu_enum_model_json2 == instance_profile_vcpu_enum_model_json
-class TestModel_InstanceProfileVCPUFixed():
+
+class TestModel_InstanceProfileVCPUFixed:
"""
Test Class for InstanceProfileVCPUFixed
"""
@@ -61394,7 +64940,8 @@ def test_instance_profile_vcpu_fixed_serialization(self):
instance_profile_vcpu_fixed_model_json2 = instance_profile_vcpu_fixed_model.to_dict()
assert instance_profile_vcpu_fixed_model_json2 == instance_profile_vcpu_fixed_model_json
-class TestModel_InstanceProfileVCPURange():
+
+class TestModel_InstanceProfileVCPURange:
"""
Test Class for InstanceProfileVCPURange
"""
@@ -61427,7 +64974,8 @@ def test_instance_profile_vcpu_range_serialization(self):
instance_profile_vcpu_range_model_json2 = instance_profile_vcpu_range_model.to_dict()
assert instance_profile_vcpu_range_model_json2 == instance_profile_vcpu_range_model_json
-class TestModel_InstanceProfileVolumeBandwidthDependent():
+
+class TestModel_InstanceProfileVolumeBandwidthDependent:
"""
Test Class for InstanceProfileVolumeBandwidthDependent
"""
@@ -61456,7 +65004,8 @@ def test_instance_profile_volume_bandwidth_dependent_serialization(self):
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():
+
+class TestModel_InstanceProfileVolumeBandwidthEnum:
"""
Test Class for InstanceProfileVolumeBandwidthEnum
"""
@@ -61487,7 +65036,8 @@ def test_instance_profile_volume_bandwidth_enum_serialization(self):
instance_profile_volume_bandwidth_enum_model_json2 = instance_profile_volume_bandwidth_enum_model.to_dict()
assert instance_profile_volume_bandwidth_enum_model_json2 == instance_profile_volume_bandwidth_enum_model_json
-class TestModel_InstanceProfileVolumeBandwidthFixed():
+
+class TestModel_InstanceProfileVolumeBandwidthFixed:
"""
Test Class for InstanceProfileVolumeBandwidthFixed
"""
@@ -61517,7 +65067,8 @@ def test_instance_profile_volume_bandwidth_fixed_serialization(self):
instance_profile_volume_bandwidth_fixed_model_json2 = instance_profile_volume_bandwidth_fixed_model.to_dict()
assert instance_profile_volume_bandwidth_fixed_model_json2 == instance_profile_volume_bandwidth_fixed_model_json
-class TestModel_InstanceProfileVolumeBandwidthRange():
+
+class TestModel_InstanceProfileVolumeBandwidthRange:
"""
Test Class for InstanceProfileVolumeBandwidthRange
"""
@@ -61550,7 +65101,8 @@ def test_instance_profile_volume_bandwidth_range_serialization(self):
instance_profile_volume_bandwidth_range_model_json2 = instance_profile_volume_bandwidth_range_model.to_dict()
assert instance_profile_volume_bandwidth_range_model_json2 == instance_profile_volume_bandwidth_range_model_json
-class TestModel_InstancePrototypeInstanceByCatalogOffering():
+
+class TestModel_InstancePrototypeInstanceByCatalogOffering:
"""
Test Class for InstancePrototypeInstanceByCatalogOffering
"""
@@ -61562,88 +65114,88 @@ def test_instance_prototype_instance_by_catalog_offering_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
+ catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442'
- instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
+ instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a InstancePrototypeInstanceByCatalogOffering model
@@ -61653,7 +65205,6 @@ def test_instance_prototype_instance_by_catalog_offering_serialization(self):
instance_prototype_instance_by_catalog_offering_model_json['keys'] = [key_identity_model]
instance_prototype_instance_by_catalog_offering_model_json['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_instance_by_catalog_offering_model_json['name'] = 'my-instance'
- instance_prototype_instance_by_catalog_offering_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_catalog_offering_model_json['placement_target'] = instance_placement_target_prototype_model
instance_prototype_instance_by_catalog_offering_model_json['profile'] = instance_profile_identity_model
instance_prototype_instance_by_catalog_offering_model_json['resource_group'] = resource_group_identity_model
@@ -61663,6 +65214,7 @@ def test_instance_prototype_instance_by_catalog_offering_serialization(self):
instance_prototype_instance_by_catalog_offering_model_json['vpc'] = vpc_identity_model
instance_prototype_instance_by_catalog_offering_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
instance_prototype_instance_by_catalog_offering_model_json['catalog_offering'] = instance_catalog_offering_prototype_model
+ instance_prototype_instance_by_catalog_offering_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_catalog_offering_model_json['primary_network_interface'] = network_interface_prototype_model
instance_prototype_instance_by_catalog_offering_model_json['zone'] = zone_identity_model
@@ -61681,7 +65233,8 @@ def test_instance_prototype_instance_by_catalog_offering_serialization(self):
instance_prototype_instance_by_catalog_offering_model_json2 = instance_prototype_instance_by_catalog_offering_model.to_dict()
assert instance_prototype_instance_by_catalog_offering_model_json2 == instance_prototype_instance_by_catalog_offering_model_json
-class TestModel_InstancePrototypeInstanceByImage():
+
+class TestModel_InstancePrototypeInstanceByImage:
"""
Test Class for InstancePrototypeInstanceByImage
"""
@@ -61693,85 +65246,85 @@ def test_instance_prototype_instance_by_image_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- image_identity_model = {} # ImageIdentityById
- image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
+ image_identity_model = {} # ImageIdentityById
+ image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051'
+
+ 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'
- zone_identity_model = {} # ZoneIdentityByName
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a InstancePrototypeInstanceByImage model
@@ -61781,7 +65334,6 @@ def test_instance_prototype_instance_by_image_serialization(self):
instance_prototype_instance_by_image_model_json['keys'] = [key_identity_model]
instance_prototype_instance_by_image_model_json['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_instance_by_image_model_json['name'] = 'my-instance'
- instance_prototype_instance_by_image_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_image_model_json['placement_target'] = instance_placement_target_prototype_model
instance_prototype_instance_by_image_model_json['profile'] = instance_profile_identity_model
instance_prototype_instance_by_image_model_json['resource_group'] = resource_group_identity_model
@@ -61791,6 +65343,7 @@ def test_instance_prototype_instance_by_image_serialization(self):
instance_prototype_instance_by_image_model_json['vpc'] = vpc_identity_model
instance_prototype_instance_by_image_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
instance_prototype_instance_by_image_model_json['image'] = image_identity_model
+ instance_prototype_instance_by_image_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_image_model_json['primary_network_interface'] = network_interface_prototype_model
instance_prototype_instance_by_image_model_json['zone'] = zone_identity_model
@@ -61809,7 +65362,8 @@ def test_instance_prototype_instance_by_image_serialization(self):
instance_prototype_instance_by_image_model_json2 = instance_prototype_instance_by_image_model.to_dict()
assert instance_prototype_instance_by_image_model_json2 == instance_prototype_instance_by_image_model_json
-class TestModel_InstancePrototypeInstanceBySourceSnapshot():
+
+class TestModel_InstancePrototypeInstanceBySourceSnapshot:
"""
Test Class for InstancePrototypeInstanceBySourceSnapshot
"""
@@ -61821,72 +65375,54 @@ def test_instance_prototype_instance_by_source_snapshot_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
- volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext
+ volume_prototype_instance_by_source_snapshot_context_model = {} # 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
@@ -61895,12 +65431,30 @@ def test_instance_prototype_instance_by_source_snapshot_serialization(self):
volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model
volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = ['testString']
- 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
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a InstancePrototypeInstanceBySourceSnapshot model
@@ -61910,7 +65464,6 @@ def test_instance_prototype_instance_by_source_snapshot_serialization(self):
instance_prototype_instance_by_source_snapshot_model_json['keys'] = [key_identity_model]
instance_prototype_instance_by_source_snapshot_model_json['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_instance_by_source_snapshot_model_json['name'] = 'my-instance'
- instance_prototype_instance_by_source_snapshot_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_source_snapshot_model_json['placement_target'] = instance_placement_target_prototype_model
instance_prototype_instance_by_source_snapshot_model_json['profile'] = instance_profile_identity_model
instance_prototype_instance_by_source_snapshot_model_json['resource_group'] = resource_group_identity_model
@@ -61919,6 +65472,7 @@ def test_instance_prototype_instance_by_source_snapshot_serialization(self):
instance_prototype_instance_by_source_snapshot_model_json['volume_attachments'] = [volume_attachment_prototype_model]
instance_prototype_instance_by_source_snapshot_model_json['vpc'] = vpc_identity_model
instance_prototype_instance_by_source_snapshot_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model
+ instance_prototype_instance_by_source_snapshot_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_source_snapshot_model_json['primary_network_interface'] = network_interface_prototype_model
instance_prototype_instance_by_source_snapshot_model_json['zone'] = zone_identity_model
@@ -61937,7 +65491,8 @@ def test_instance_prototype_instance_by_source_snapshot_serialization(self):
instance_prototype_instance_by_source_snapshot_model_json2 = instance_prototype_instance_by_source_snapshot_model.to_dict()
assert instance_prototype_instance_by_source_snapshot_model_json2 == instance_prototype_instance_by_source_snapshot_model_json
-class TestModel_InstancePrototypeInstanceBySourceTemplate():
+
+class TestModel_InstancePrototypeInstanceBySourceTemplate:
"""
Test Class for InstancePrototypeInstanceBySourceTemplate
"""
@@ -61949,94 +65504,94 @@ def test_instance_prototype_instance_by_source_template_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
+ catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442'
- instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
+ instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model
- image_identity_model = {} # ImageIdentityById
- image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
+ image_identity_model = {} # ImageIdentityById
+ image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051'
+
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
- instance_template_identity_model = {} # InstanceTemplateIdentityById
+ instance_template_identity_model = {} # InstanceTemplateIdentityById
instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a InstancePrototypeInstanceBySourceTemplate model
@@ -62046,7 +65601,6 @@ def test_instance_prototype_instance_by_source_template_serialization(self):
instance_prototype_instance_by_source_template_model_json['keys'] = [key_identity_model]
instance_prototype_instance_by_source_template_model_json['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_instance_by_source_template_model_json['name'] = 'my-instance'
- instance_prototype_instance_by_source_template_model_json['network_interfaces'] = [network_interface_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['resource_group'] = resource_group_identity_model
@@ -62057,6 +65611,7 @@ def test_instance_prototype_instance_by_source_template_serialization(self):
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_interfaces'] = [network_interface_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
@@ -62076,7 +65631,8 @@ def test_instance_prototype_instance_by_source_template_serialization(self):
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_InstancePrototypeInstanceByVolume():
+
+class TestModel_InstancePrototypeInstanceByVolume:
"""
Test Class for InstancePrototypeInstanceByVolume
"""
@@ -62088,71 +65644,71 @@ def test_instance_prototype_instance_by_volume_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- volume_identity_model = {} # VolumeIdentityById
+ volume_identity_model = {} # VolumeIdentityById
volume_identity_model['id'] = '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
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a InstancePrototypeInstanceByVolume model
@@ -62162,7 +65718,6 @@ def test_instance_prototype_instance_by_volume_serialization(self):
instance_prototype_instance_by_volume_model_json['keys'] = [key_identity_model]
instance_prototype_instance_by_volume_model_json['metadata_service'] = instance_metadata_service_prototype_model
instance_prototype_instance_by_volume_model_json['name'] = 'my-instance'
- instance_prototype_instance_by_volume_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_volume_model_json['placement_target'] = instance_placement_target_prototype_model
instance_prototype_instance_by_volume_model_json['profile'] = instance_profile_identity_model
instance_prototype_instance_by_volume_model_json['resource_group'] = resource_group_identity_model
@@ -62171,6 +65726,7 @@ def test_instance_prototype_instance_by_volume_serialization(self):
instance_prototype_instance_by_volume_model_json['volume_attachments'] = [volume_attachment_prototype_model]
instance_prototype_instance_by_volume_model_json['vpc'] = vpc_identity_model
instance_prototype_instance_by_volume_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_volume_context_model
+ instance_prototype_instance_by_volume_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_prototype_instance_by_volume_model_json['primary_network_interface'] = network_interface_prototype_model
instance_prototype_instance_by_volume_model_json['zone'] = zone_identity_model
@@ -62189,7 +65745,8 @@ def test_instance_prototype_instance_by_volume_serialization(self):
instance_prototype_instance_by_volume_model_json2 = instance_prototype_instance_by_volume_model.to_dict()
assert instance_prototype_instance_by_volume_model_json2 == instance_prototype_instance_by_volume_model_json
-class TestModel_InstanceTemplateIdentityByCRN():
+
+class TestModel_InstanceTemplateIdentityByCRN:
"""
Test Class for InstanceTemplateIdentityByCRN
"""
@@ -62218,7 +65775,8 @@ def test_instance_template_identity_by_crn_serialization(self):
instance_template_identity_by_crn_model_json2 = instance_template_identity_by_crn_model.to_dict()
assert instance_template_identity_by_crn_model_json2 == instance_template_identity_by_crn_model_json
-class TestModel_InstanceTemplateIdentityByHref():
+
+class TestModel_InstanceTemplateIdentityByHref:
"""
Test Class for InstanceTemplateIdentityByHref
"""
@@ -62247,7 +65805,8 @@ def test_instance_template_identity_by_href_serialization(self):
instance_template_identity_by_href_model_json2 = instance_template_identity_by_href_model.to_dict()
assert instance_template_identity_by_href_model_json2 == instance_template_identity_by_href_model_json
-class TestModel_InstanceTemplateIdentityById():
+
+class TestModel_InstanceTemplateIdentityById:
"""
Test Class for InstanceTemplateIdentityById
"""
@@ -62276,343 +65835,328 @@ def test_instance_template_identity_by_id_serialization(self):
instance_template_identity_by_id_model_json2 = instance_template_identity_by_id_model.to_dict()
assert instance_template_identity_by_id_model_json2 == instance_template_identity_by_id_model_json
-class TestModel_InstanceTemplatePrototypeInstanceByCatalogOffering():
+
+class TestModel_InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext:
"""
- Test Class for InstanceTemplatePrototypeInstanceByCatalogOffering
+ Test Class for InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext
"""
- def test_instance_template_prototype_instance_by_catalog_offering_serialization(self):
+ def test_instance_template_prototype_instance_by_catalog_offering_instance_template_context_serialization(self):
"""
- Test serialization/deserialization for InstanceTemplatePrototypeInstanceByCatalogOffering
+ Test serialization/deserialization for InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext
"""
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
+ catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442'
- instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
+ instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- # Construct a json representation of a InstanceTemplatePrototypeInstanceByCatalogOffering model
- instance_template_prototype_instance_by_catalog_offering_model_json = {}
- instance_template_prototype_instance_by_catalog_offering_model_json['availability_policy'] = instance_availability_policy_prototype_model
- instance_template_prototype_instance_by_catalog_offering_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
- instance_template_prototype_instance_by_catalog_offering_model_json['keys'] = [key_identity_model]
- instance_template_prototype_instance_by_catalog_offering_model_json['metadata_service'] = instance_metadata_service_prototype_model
- instance_template_prototype_instance_by_catalog_offering_model_json['name'] = 'my-instance'
- instance_template_prototype_instance_by_catalog_offering_model_json['network_interfaces'] = [network_interface_prototype_model]
- instance_template_prototype_instance_by_catalog_offering_model_json['placement_target'] = instance_placement_target_prototype_model
- instance_template_prototype_instance_by_catalog_offering_model_json['profile'] = instance_profile_identity_model
- instance_template_prototype_instance_by_catalog_offering_model_json['resource_group'] = resource_group_identity_model
- instance_template_prototype_instance_by_catalog_offering_model_json['total_volume_bandwidth'] = 500
- instance_template_prototype_instance_by_catalog_offering_model_json['user_data'] = 'testString'
- instance_template_prototype_instance_by_catalog_offering_model_json['volume_attachments'] = [volume_attachment_prototype_model]
- instance_template_prototype_instance_by_catalog_offering_model_json['vpc'] = vpc_identity_model
- instance_template_prototype_instance_by_catalog_offering_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
- instance_template_prototype_instance_by_catalog_offering_model_json['catalog_offering'] = instance_catalog_offering_prototype_model
- instance_template_prototype_instance_by_catalog_offering_model_json['primary_network_interface'] = network_interface_prototype_model
- instance_template_prototype_instance_by_catalog_offering_model_json['zone'] = zone_identity_model
+ # Construct a json representation of a InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json = {}
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['availability_policy'] = instance_availability_policy_prototype_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['keys'] = [key_identity_model]
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['metadata_service'] = instance_metadata_service_prototype_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['name'] = 'my-instance'
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['placement_target'] = instance_placement_target_prototype_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['profile'] = instance_profile_identity_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['resource_group'] = resource_group_identity_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['total_volume_bandwidth'] = 500
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['user_data'] = 'testString'
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['volume_attachments'] = [volume_attachment_prototype_model]
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['vpc'] = vpc_identity_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['catalog_offering'] = instance_catalog_offering_prototype_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['network_interfaces'] = [network_interface_prototype_model]
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['primary_network_interface'] = network_interface_prototype_model
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json['zone'] = zone_identity_model
- # Construct a model instance of InstanceTemplatePrototypeInstanceByCatalogOffering by calling from_dict on the json representation
- instance_template_prototype_instance_by_catalog_offering_model = InstanceTemplatePrototypeInstanceByCatalogOffering.from_dict(instance_template_prototype_instance_by_catalog_offering_model_json)
- assert instance_template_prototype_instance_by_catalog_offering_model != False
+ # Construct a model instance of InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model = InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext.from_dict(instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json)
+ assert instance_template_prototype_instance_by_catalog_offering_instance_template_context_model != False
- # Construct a model instance of InstanceTemplatePrototypeInstanceByCatalogOffering by calling from_dict on the json representation
- instance_template_prototype_instance_by_catalog_offering_model_dict = InstanceTemplatePrototypeInstanceByCatalogOffering.from_dict(instance_template_prototype_instance_by_catalog_offering_model_json).__dict__
- instance_template_prototype_instance_by_catalog_offering_model2 = InstanceTemplatePrototypeInstanceByCatalogOffering(**instance_template_prototype_instance_by_catalog_offering_model_dict)
+ # Construct a model instance of InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_dict = InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext.from_dict(instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json).__dict__
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model2 = InstanceTemplatePrototypeInstanceByCatalogOfferingInstanceTemplateContext(**instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_dict)
# Verify the model instances are equivalent
- assert instance_template_prototype_instance_by_catalog_offering_model == instance_template_prototype_instance_by_catalog_offering_model2
+ assert instance_template_prototype_instance_by_catalog_offering_instance_template_context_model == instance_template_prototype_instance_by_catalog_offering_instance_template_context_model2
# Convert model instance back to dict and verify no loss of data
- instance_template_prototype_instance_by_catalog_offering_model_json2 = instance_template_prototype_instance_by_catalog_offering_model.to_dict()
- assert instance_template_prototype_instance_by_catalog_offering_model_json2 == instance_template_prototype_instance_by_catalog_offering_model_json
+ instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json2 = instance_template_prototype_instance_by_catalog_offering_instance_template_context_model.to_dict()
+ assert instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json2 == instance_template_prototype_instance_by_catalog_offering_instance_template_context_model_json
+
-class TestModel_InstanceTemplatePrototypeInstanceByImage():
+class TestModel_InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext:
"""
- Test Class for InstanceTemplatePrototypeInstanceByImage
+ Test Class for InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext
"""
- def test_instance_template_prototype_instance_by_image_serialization(self):
+ def test_instance_template_prototype_instance_by_image_instance_template_context_serialization(self):
"""
- Test serialization/deserialization for InstanceTemplatePrototypeInstanceByImage
+ Test serialization/deserialization for InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext
"""
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- image_identity_model = {} # ImageIdentityById
- image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
+ image_identity_model = {} # ImageIdentityById
+ image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051'
+
+ 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'
- zone_identity_model = {} # ZoneIdentityByName
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- # Construct a json representation of a InstanceTemplatePrototypeInstanceByImage model
- instance_template_prototype_instance_by_image_model_json = {}
- instance_template_prototype_instance_by_image_model_json['availability_policy'] = instance_availability_policy_prototype_model
- instance_template_prototype_instance_by_image_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
- instance_template_prototype_instance_by_image_model_json['keys'] = [key_identity_model]
- instance_template_prototype_instance_by_image_model_json['metadata_service'] = instance_metadata_service_prototype_model
- instance_template_prototype_instance_by_image_model_json['name'] = 'my-instance'
- instance_template_prototype_instance_by_image_model_json['network_interfaces'] = [network_interface_prototype_model]
- instance_template_prototype_instance_by_image_model_json['placement_target'] = instance_placement_target_prototype_model
- instance_template_prototype_instance_by_image_model_json['profile'] = instance_profile_identity_model
- instance_template_prototype_instance_by_image_model_json['resource_group'] = resource_group_identity_model
- instance_template_prototype_instance_by_image_model_json['total_volume_bandwidth'] = 500
- instance_template_prototype_instance_by_image_model_json['user_data'] = 'testString'
- instance_template_prototype_instance_by_image_model_json['volume_attachments'] = [volume_attachment_prototype_model]
- instance_template_prototype_instance_by_image_model_json['vpc'] = vpc_identity_model
- instance_template_prototype_instance_by_image_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
- instance_template_prototype_instance_by_image_model_json['image'] = image_identity_model
- instance_template_prototype_instance_by_image_model_json['primary_network_interface'] = network_interface_prototype_model
- instance_template_prototype_instance_by_image_model_json['zone'] = zone_identity_model
+ # Construct a json representation of a InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json = {}
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['availability_policy'] = instance_availability_policy_prototype_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['keys'] = [key_identity_model]
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['metadata_service'] = instance_metadata_service_prototype_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['name'] = 'my-instance'
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['placement_target'] = instance_placement_target_prototype_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['profile'] = instance_profile_identity_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['resource_group'] = resource_group_identity_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['total_volume_bandwidth'] = 500
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['user_data'] = 'testString'
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['volume_attachments'] = [volume_attachment_prototype_model]
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['vpc'] = vpc_identity_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['image'] = image_identity_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['network_interfaces'] = [network_interface_prototype_model]
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['primary_network_interface'] = network_interface_prototype_model
+ instance_template_prototype_instance_by_image_instance_template_context_model_json['zone'] = zone_identity_model
- # Construct a model instance of InstanceTemplatePrototypeInstanceByImage by calling from_dict on the json representation
- instance_template_prototype_instance_by_image_model = InstanceTemplatePrototypeInstanceByImage.from_dict(instance_template_prototype_instance_by_image_model_json)
- assert instance_template_prototype_instance_by_image_model != False
+ # Construct a model instance of InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_prototype_instance_by_image_instance_template_context_model = InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext.from_dict(instance_template_prototype_instance_by_image_instance_template_context_model_json)
+ assert instance_template_prototype_instance_by_image_instance_template_context_model != False
- # Construct a model instance of InstanceTemplatePrototypeInstanceByImage by calling from_dict on the json representation
- instance_template_prototype_instance_by_image_model_dict = InstanceTemplatePrototypeInstanceByImage.from_dict(instance_template_prototype_instance_by_image_model_json).__dict__
- instance_template_prototype_instance_by_image_model2 = InstanceTemplatePrototypeInstanceByImage(**instance_template_prototype_instance_by_image_model_dict)
+ # Construct a model instance of InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_prototype_instance_by_image_instance_template_context_model_dict = InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext.from_dict(instance_template_prototype_instance_by_image_instance_template_context_model_json).__dict__
+ instance_template_prototype_instance_by_image_instance_template_context_model2 = InstanceTemplatePrototypeInstanceByImageInstanceTemplateContext(**instance_template_prototype_instance_by_image_instance_template_context_model_dict)
# Verify the model instances are equivalent
- assert instance_template_prototype_instance_by_image_model == instance_template_prototype_instance_by_image_model2
+ assert instance_template_prototype_instance_by_image_instance_template_context_model == instance_template_prototype_instance_by_image_instance_template_context_model2
# Convert model instance back to dict and verify no loss of data
- instance_template_prototype_instance_by_image_model_json2 = instance_template_prototype_instance_by_image_model.to_dict()
- assert instance_template_prototype_instance_by_image_model_json2 == instance_template_prototype_instance_by_image_model_json
+ instance_template_prototype_instance_by_image_instance_template_context_model_json2 = instance_template_prototype_instance_by_image_instance_template_context_model.to_dict()
+ assert instance_template_prototype_instance_by_image_instance_template_context_model_json2 == instance_template_prototype_instance_by_image_instance_template_context_model_json
+
-class TestModel_InstanceTemplatePrototypeInstanceBySourceSnapshot():
+class TestModel_InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext:
"""
- Test Class for InstanceTemplatePrototypeInstanceBySourceSnapshot
+ Test Class for InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext
"""
- def test_instance_template_prototype_instance_by_source_snapshot_serialization(self):
+ def test_instance_template_prototype_instance_by_source_snapshot_instance_template_context_serialization(self):
"""
- Test serialization/deserialization for InstanceTemplatePrototypeInstanceBySourceSnapshot
+ Test serialization/deserialization for InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext
"""
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
- volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext
+ volume_prototype_instance_by_source_snapshot_context_model = {} # 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
@@ -62621,49 +66165,68 @@ def test_instance_template_prototype_instance_by_source_snapshot_serialization(s
volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model
volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = ['testString']
- 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
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- # Construct a json representation of a InstanceTemplatePrototypeInstanceBySourceSnapshot model
- instance_template_prototype_instance_by_source_snapshot_model_json = {}
- instance_template_prototype_instance_by_source_snapshot_model_json['availability_policy'] = instance_availability_policy_prototype_model
- instance_template_prototype_instance_by_source_snapshot_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
- instance_template_prototype_instance_by_source_snapshot_model_json['keys'] = [key_identity_model]
- instance_template_prototype_instance_by_source_snapshot_model_json['metadata_service'] = instance_metadata_service_prototype_model
- instance_template_prototype_instance_by_source_snapshot_model_json['name'] = 'my-instance'
- instance_template_prototype_instance_by_source_snapshot_model_json['network_interfaces'] = [network_interface_prototype_model]
- instance_template_prototype_instance_by_source_snapshot_model_json['placement_target'] = instance_placement_target_prototype_model
- instance_template_prototype_instance_by_source_snapshot_model_json['profile'] = instance_profile_identity_model
- instance_template_prototype_instance_by_source_snapshot_model_json['resource_group'] = resource_group_identity_model
- instance_template_prototype_instance_by_source_snapshot_model_json['total_volume_bandwidth'] = 500
- instance_template_prototype_instance_by_source_snapshot_model_json['user_data'] = 'testString'
- instance_template_prototype_instance_by_source_snapshot_model_json['volume_attachments'] = [volume_attachment_prototype_model]
- instance_template_prototype_instance_by_source_snapshot_model_json['vpc'] = vpc_identity_model
- instance_template_prototype_instance_by_source_snapshot_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model
- instance_template_prototype_instance_by_source_snapshot_model_json['primary_network_interface'] = network_interface_prototype_model
- instance_template_prototype_instance_by_source_snapshot_model_json['zone'] = zone_identity_model
+ # Construct a json representation of a InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json = {}
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['availability_policy'] = instance_availability_policy_prototype_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['keys'] = [key_identity_model]
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['metadata_service'] = instance_metadata_service_prototype_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['name'] = 'my-instance'
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['placement_target'] = instance_placement_target_prototype_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['profile'] = instance_profile_identity_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['resource_group'] = resource_group_identity_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['total_volume_bandwidth'] = 500
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['user_data'] = 'testString'
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['volume_attachments'] = [volume_attachment_prototype_model]
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['vpc'] = vpc_identity_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['network_interfaces'] = [network_interface_prototype_model]
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['primary_network_interface'] = network_interface_prototype_model
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json['zone'] = zone_identity_model
- # Construct a model instance of InstanceTemplatePrototypeInstanceBySourceSnapshot by calling from_dict on the json representation
- instance_template_prototype_instance_by_source_snapshot_model = InstanceTemplatePrototypeInstanceBySourceSnapshot.from_dict(instance_template_prototype_instance_by_source_snapshot_model_json)
- assert instance_template_prototype_instance_by_source_snapshot_model != False
+ # Construct a model instance of InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model = InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext.from_dict(instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json)
+ assert instance_template_prototype_instance_by_source_snapshot_instance_template_context_model != False
- # Construct a model instance of InstanceTemplatePrototypeInstanceBySourceSnapshot by calling from_dict on the json representation
- instance_template_prototype_instance_by_source_snapshot_model_dict = InstanceTemplatePrototypeInstanceBySourceSnapshot.from_dict(instance_template_prototype_instance_by_source_snapshot_model_json).__dict__
- instance_template_prototype_instance_by_source_snapshot_model2 = InstanceTemplatePrototypeInstanceBySourceSnapshot(**instance_template_prototype_instance_by_source_snapshot_model_dict)
+ # Construct a model instance of InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_dict = InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext.from_dict(instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json).__dict__
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model2 = InstanceTemplatePrototypeInstanceBySourceSnapshotInstanceTemplateContext(**instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_dict)
# Verify the model instances are equivalent
- assert instance_template_prototype_instance_by_source_snapshot_model == instance_template_prototype_instance_by_source_snapshot_model2
+ assert instance_template_prototype_instance_by_source_snapshot_instance_template_context_model == instance_template_prototype_instance_by_source_snapshot_instance_template_context_model2
# Convert model instance back to dict and verify no loss of data
- instance_template_prototype_instance_by_source_snapshot_model_json2 = instance_template_prototype_instance_by_source_snapshot_model.to_dict()
- assert instance_template_prototype_instance_by_source_snapshot_model_json2 == instance_template_prototype_instance_by_source_snapshot_model_json
+ instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json2 = instance_template_prototype_instance_by_source_snapshot_instance_template_context_model.to_dict()
+ assert instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json2 == instance_template_prototype_instance_by_source_snapshot_instance_template_context_model_json
+
-class TestModel_InstanceTemplatePrototypeInstanceBySourceTemplate():
+class TestModel_InstanceTemplatePrototypeInstanceBySourceTemplate:
"""
Test Class for InstanceTemplatePrototypeInstanceBySourceTemplate
"""
@@ -62675,94 +66238,94 @@ def test_instance_template_prototype_instance_by_source_template_serialization(s
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
+ catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442'
- instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
+ instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model
- image_identity_model = {} # ImageIdentityById
- image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
+ image_identity_model = {} # ImageIdentityById
+ image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051'
- instance_template_identity_model = {} # InstanceTemplateIdentityById
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ instance_template_identity_model = {} # InstanceTemplateIdentityById
instance_template_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a InstanceTemplatePrototypeInstanceBySourceTemplate model
@@ -62772,7 +66335,6 @@ def test_instance_template_prototype_instance_by_source_template_serialization(s
instance_template_prototype_instance_by_source_template_model_json['keys'] = [key_identity_model]
instance_template_prototype_instance_by_source_template_model_json['metadata_service'] = instance_metadata_service_prototype_model
instance_template_prototype_instance_by_source_template_model_json['name'] = 'my-instance'
- instance_template_prototype_instance_by_source_template_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_template_prototype_instance_by_source_template_model_json['placement_target'] = instance_placement_target_prototype_model
instance_template_prototype_instance_by_source_template_model_json['profile'] = instance_profile_identity_model
instance_template_prototype_instance_by_source_template_model_json['resource_group'] = resource_group_identity_model
@@ -62783,6 +66345,7 @@ def test_instance_template_prototype_instance_by_source_template_serialization(s
instance_template_prototype_instance_by_source_template_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
instance_template_prototype_instance_by_source_template_model_json['catalog_offering'] = instance_catalog_offering_prototype_model
instance_template_prototype_instance_by_source_template_model_json['image'] = image_identity_model
+ instance_template_prototype_instance_by_source_template_model_json['network_interfaces'] = [network_interface_prototype_model]
instance_template_prototype_instance_by_source_template_model_json['primary_network_interface'] = network_interface_prototype_model
instance_template_prototype_instance_by_source_template_model_json['source_template'] = instance_template_identity_model
instance_template_prototype_instance_by_source_template_model_json['zone'] = zone_identity_model
@@ -62802,357 +66365,342 @@ def test_instance_template_prototype_instance_by_source_template_serialization(s
instance_template_prototype_instance_by_source_template_model_json2 = instance_template_prototype_instance_by_source_template_model.to_dict()
assert instance_template_prototype_instance_by_source_template_model_json2 == instance_template_prototype_instance_by_source_template_model_json
-class TestModel_InstanceTemplateInstanceByCatalogOffering():
+
+class TestModel_InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext:
"""
- Test Class for InstanceTemplateInstanceByCatalogOffering
+ Test Class for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext
"""
- def test_instance_template_instance_by_catalog_offering_serialization(self):
+ def test_instance_template_instance_by_catalog_offering_instance_template_context_serialization(self):
"""
- Test serialization/deserialization for InstanceTemplateInstanceByCatalogOffering
+ Test serialization/deserialization for InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext
"""
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['name'] = 'my-resource-group'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
+ catalog_offering_identity_model = {} # CatalogOfferingIdentityCatalogOfferingByCRN
catalog_offering_identity_model['crn'] = 'crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:offering:00111601-0ec5-41ac-b142-96d1e64e6442'
- instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
+ instance_catalog_offering_prototype_model = {} # InstanceCatalogOfferingPrototypeCatalogOfferingByOffering
instance_catalog_offering_prototype_model['offering'] = catalog_offering_identity_model
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- # Construct a json representation of a InstanceTemplateInstanceByCatalogOffering model
- instance_template_instance_by_catalog_offering_model_json = {}
- instance_template_instance_by_catalog_offering_model_json['availability_policy'] = instance_availability_policy_prototype_model
- instance_template_instance_by_catalog_offering_model_json['created_at'] = '2019-01-01T12:00:00Z'
- instance_template_instance_by_catalog_offering_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_template_instance_by_catalog_offering_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
- instance_template_instance_by_catalog_offering_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_template_instance_by_catalog_offering_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_template_instance_by_catalog_offering_model_json['keys'] = [key_identity_model]
- instance_template_instance_by_catalog_offering_model_json['metadata_service'] = instance_metadata_service_prototype_model
- instance_template_instance_by_catalog_offering_model_json['name'] = 'my-instance-template'
- instance_template_instance_by_catalog_offering_model_json['network_interfaces'] = [network_interface_prototype_model]
- instance_template_instance_by_catalog_offering_model_json['placement_target'] = instance_placement_target_prototype_model
- instance_template_instance_by_catalog_offering_model_json['profile'] = instance_profile_identity_model
- instance_template_instance_by_catalog_offering_model_json['resource_group'] = resource_group_reference_model
- instance_template_instance_by_catalog_offering_model_json['total_volume_bandwidth'] = 500
- instance_template_instance_by_catalog_offering_model_json['user_data'] = 'testString'
- instance_template_instance_by_catalog_offering_model_json['volume_attachments'] = [volume_attachment_prototype_model]
- instance_template_instance_by_catalog_offering_model_json['vpc'] = vpc_identity_model
- instance_template_instance_by_catalog_offering_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
- instance_template_instance_by_catalog_offering_model_json['catalog_offering'] = instance_catalog_offering_prototype_model
- instance_template_instance_by_catalog_offering_model_json['primary_network_interface'] = network_interface_prototype_model
- instance_template_instance_by_catalog_offering_model_json['zone'] = zone_identity_model
+ # Construct a json representation of a InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json = {}
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['availability_policy'] = instance_availability_policy_prototype_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['created_at'] = '2019-01-01T12:00:00Z'
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
+ instance_template_instance_by_catalog_offering_instance_template_context_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_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['keys'] = [key_identity_model]
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['metadata_service'] = instance_metadata_service_prototype_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['name'] = 'my-instance-template'
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['placement_target'] = instance_placement_target_prototype_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['profile'] = instance_profile_identity_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['resource_group'] = resource_group_reference_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['total_volume_bandwidth'] = 500
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['user_data'] = 'testString'
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['volume_attachments'] = [volume_attachment_prototype_model]
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['vpc'] = vpc_identity_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['catalog_offering'] = instance_catalog_offering_prototype_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['network_interfaces'] = [network_interface_prototype_model]
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['primary_network_interface'] = network_interface_prototype_model
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json['zone'] = zone_identity_model
- # Construct a model instance of InstanceTemplateInstanceByCatalogOffering by calling from_dict on the json representation
- instance_template_instance_by_catalog_offering_model = InstanceTemplateInstanceByCatalogOffering.from_dict(instance_template_instance_by_catalog_offering_model_json)
- assert instance_template_instance_by_catalog_offering_model != False
+ # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_instance_by_catalog_offering_instance_template_context_model = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.from_dict(instance_template_instance_by_catalog_offering_instance_template_context_model_json)
+ assert instance_template_instance_by_catalog_offering_instance_template_context_model != False
- # Construct a model instance of InstanceTemplateInstanceByCatalogOffering by calling from_dict on the json representation
- instance_template_instance_by_catalog_offering_model_dict = InstanceTemplateInstanceByCatalogOffering.from_dict(instance_template_instance_by_catalog_offering_model_json).__dict__
- instance_template_instance_by_catalog_offering_model2 = InstanceTemplateInstanceByCatalogOffering(**instance_template_instance_by_catalog_offering_model_dict)
+ # Construct a model instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_instance_by_catalog_offering_instance_template_context_model_dict = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.from_dict(instance_template_instance_by_catalog_offering_instance_template_context_model_json).__dict__
+ instance_template_instance_by_catalog_offering_instance_template_context_model2 = InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(**instance_template_instance_by_catalog_offering_instance_template_context_model_dict)
# Verify the model instances are equivalent
- assert instance_template_instance_by_catalog_offering_model == instance_template_instance_by_catalog_offering_model2
+ assert instance_template_instance_by_catalog_offering_instance_template_context_model == instance_template_instance_by_catalog_offering_instance_template_context_model2
# Convert model instance back to dict and verify no loss of data
- instance_template_instance_by_catalog_offering_model_json2 = instance_template_instance_by_catalog_offering_model.to_dict()
- assert instance_template_instance_by_catalog_offering_model_json2 == instance_template_instance_by_catalog_offering_model_json
+ instance_template_instance_by_catalog_offering_instance_template_context_model_json2 = instance_template_instance_by_catalog_offering_instance_template_context_model.to_dict()
+ assert instance_template_instance_by_catalog_offering_instance_template_context_model_json2 == instance_template_instance_by_catalog_offering_instance_template_context_model_json
-class TestModel_InstanceTemplateInstanceByImage():
+
+class TestModel_InstanceTemplateInstanceByImageInstanceTemplateContext:
"""
- Test Class for InstanceTemplateInstanceByImage
+ Test Class for InstanceTemplateInstanceByImageInstanceTemplateContext
"""
- def test_instance_template_instance_by_image_serialization(self):
+ def test_instance_template_instance_by_image_instance_template_context_serialization(self):
"""
- Test serialization/deserialization for InstanceTemplateInstanceByImage
+ Test serialization/deserialization for InstanceTemplateInstanceByImageInstanceTemplateContext
"""
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['name'] = 'my-resource-group'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
- volume_prototype_instance_by_image_context_model['capacity'] = 250
+ volume_prototype_instance_by_image_context_model = {} # VolumePrototypeInstanceByImageContext
+ volume_prototype_instance_by_image_context_model['capacity'] = 100
volume_prototype_instance_by_image_context_model['encryption_key'] = encryption_key_identity_model
volume_prototype_instance_by_image_context_model['iops'] = 10000
volume_prototype_instance_by_image_context_model['name'] = 'my-volume'
volume_prototype_instance_by_image_context_model['profile'] = volume_profile_identity_model
volume_prototype_instance_by_image_context_model['user_tags'] = ['testString']
- 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
- image_identity_model = {} # ImageIdentityById
- image_identity_model['id'] = '72b27b5c-f4b0-48bb-b954-5becc7c1dcb8'
+ image_identity_model = {} # ImageIdentityById
+ image_identity_model['id'] = 'r006-02c73baf-9abb-493d-9e41-d0f1866f4051'
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- # Construct a json representation of a InstanceTemplateInstanceByImage model
- instance_template_instance_by_image_model_json = {}
- instance_template_instance_by_image_model_json['availability_policy'] = instance_availability_policy_prototype_model
- instance_template_instance_by_image_model_json['created_at'] = '2019-01-01T12:00:00Z'
- instance_template_instance_by_image_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_template_instance_by_image_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
- instance_template_instance_by_image_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_template_instance_by_image_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_template_instance_by_image_model_json['keys'] = [key_identity_model]
- instance_template_instance_by_image_model_json['metadata_service'] = instance_metadata_service_prototype_model
- instance_template_instance_by_image_model_json['name'] = 'my-instance-template'
- instance_template_instance_by_image_model_json['network_interfaces'] = [network_interface_prototype_model]
- instance_template_instance_by_image_model_json['placement_target'] = instance_placement_target_prototype_model
- instance_template_instance_by_image_model_json['profile'] = instance_profile_identity_model
- instance_template_instance_by_image_model_json['resource_group'] = resource_group_reference_model
- instance_template_instance_by_image_model_json['total_volume_bandwidth'] = 500
- instance_template_instance_by_image_model_json['user_data'] = 'testString'
- instance_template_instance_by_image_model_json['volume_attachments'] = [volume_attachment_prototype_model]
- instance_template_instance_by_image_model_json['vpc'] = vpc_identity_model
- instance_template_instance_by_image_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
- instance_template_instance_by_image_model_json['image'] = image_identity_model
- instance_template_instance_by_image_model_json['primary_network_interface'] = network_interface_prototype_model
- instance_template_instance_by_image_model_json['zone'] = zone_identity_model
+ # Construct a json representation of a InstanceTemplateInstanceByImageInstanceTemplateContext model
+ instance_template_instance_by_image_instance_template_context_model_json = {}
+ instance_template_instance_by_image_instance_template_context_model_json['availability_policy'] = instance_availability_policy_prototype_model
+ instance_template_instance_by_image_instance_template_context_model_json['created_at'] = '2019-01-01T12:00:00Z'
+ instance_template_instance_by_image_instance_template_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
+ instance_template_instance_by_image_instance_template_context_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
+ instance_template_instance_by_image_instance_template_context_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_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
+ instance_template_instance_by_image_instance_template_context_model_json['keys'] = [key_identity_model]
+ instance_template_instance_by_image_instance_template_context_model_json['metadata_service'] = instance_metadata_service_prototype_model
+ instance_template_instance_by_image_instance_template_context_model_json['name'] = 'my-instance-template'
+ instance_template_instance_by_image_instance_template_context_model_json['placement_target'] = instance_placement_target_prototype_model
+ instance_template_instance_by_image_instance_template_context_model_json['profile'] = instance_profile_identity_model
+ instance_template_instance_by_image_instance_template_context_model_json['resource_group'] = resource_group_reference_model
+ instance_template_instance_by_image_instance_template_context_model_json['total_volume_bandwidth'] = 500
+ instance_template_instance_by_image_instance_template_context_model_json['user_data'] = 'testString'
+ instance_template_instance_by_image_instance_template_context_model_json['volume_attachments'] = [volume_attachment_prototype_model]
+ instance_template_instance_by_image_instance_template_context_model_json['vpc'] = vpc_identity_model
+ instance_template_instance_by_image_instance_template_context_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_image_context_model
+ instance_template_instance_by_image_instance_template_context_model_json['image'] = image_identity_model
+ instance_template_instance_by_image_instance_template_context_model_json['network_interfaces'] = [network_interface_prototype_model]
+ instance_template_instance_by_image_instance_template_context_model_json['primary_network_interface'] = network_interface_prototype_model
+ instance_template_instance_by_image_instance_template_context_model_json['zone'] = zone_identity_model
- # Construct a model instance of InstanceTemplateInstanceByImage by calling from_dict on the json representation
- instance_template_instance_by_image_model = InstanceTemplateInstanceByImage.from_dict(instance_template_instance_by_image_model_json)
- assert instance_template_instance_by_image_model != False
+ # Construct a model instance of InstanceTemplateInstanceByImageInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_instance_by_image_instance_template_context_model = InstanceTemplateInstanceByImageInstanceTemplateContext.from_dict(instance_template_instance_by_image_instance_template_context_model_json)
+ assert instance_template_instance_by_image_instance_template_context_model != False
- # Construct a model instance of InstanceTemplateInstanceByImage by calling from_dict on the json representation
- instance_template_instance_by_image_model_dict = InstanceTemplateInstanceByImage.from_dict(instance_template_instance_by_image_model_json).__dict__
- instance_template_instance_by_image_model2 = InstanceTemplateInstanceByImage(**instance_template_instance_by_image_model_dict)
+ # Construct a model instance of InstanceTemplateInstanceByImageInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_instance_by_image_instance_template_context_model_dict = InstanceTemplateInstanceByImageInstanceTemplateContext.from_dict(instance_template_instance_by_image_instance_template_context_model_json).__dict__
+ instance_template_instance_by_image_instance_template_context_model2 = InstanceTemplateInstanceByImageInstanceTemplateContext(**instance_template_instance_by_image_instance_template_context_model_dict)
# Verify the model instances are equivalent
- assert instance_template_instance_by_image_model == instance_template_instance_by_image_model2
+ assert instance_template_instance_by_image_instance_template_context_model == instance_template_instance_by_image_instance_template_context_model2
# Convert model instance back to dict and verify no loss of data
- instance_template_instance_by_image_model_json2 = instance_template_instance_by_image_model.to_dict()
- assert instance_template_instance_by_image_model_json2 == instance_template_instance_by_image_model_json
+ instance_template_instance_by_image_instance_template_context_model_json2 = instance_template_instance_by_image_instance_template_context_model.to_dict()
+ assert instance_template_instance_by_image_instance_template_context_model_json2 == instance_template_instance_by_image_instance_template_context_model_json
+
-class TestModel_InstanceTemplateInstanceBySourceSnapshot():
+class TestModel_InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext:
"""
- Test Class for InstanceTemplateInstanceBySourceSnapshot
+ Test Class for InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext
"""
- def test_instance_template_instance_by_source_snapshot_serialization(self):
+ def test_instance_template_instance_by_source_snapshot_instance_template_context_serialization(self):
"""
- Test serialization/deserialization for InstanceTemplateInstanceBySourceSnapshot
+ Test serialization/deserialization for InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext
"""
# Construct dict forms of any model objects needed in order to build this model.
- instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
+ instance_availability_policy_prototype_model = {} # InstanceAvailabilityPolicyPrototype
instance_availability_policy_prototype_model['host_failure'] = 'restart'
- trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
+ trusted_profile_identity_model = {} # TrustedProfileIdentityTrustedProfileById
trusted_profile_identity_model['id'] = 'Profile-9fd84246-7df4-4667-94e4-8ecde51d5ac5'
- instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
+ instance_default_trusted_profile_prototype_model = {} # InstanceDefaultTrustedProfilePrototype
instance_default_trusted_profile_prototype_model['auto_link'] = False
instance_default_trusted_profile_prototype_model['target'] = trusted_profile_identity_model
- key_identity_model = {} # KeyIdentityById
+ key_identity_model = {} # KeyIdentityById
key_identity_model['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
+ instance_metadata_service_prototype_model = {} # InstanceMetadataServicePrototype
instance_metadata_service_prototype_model['enabled'] = False
instance_metadata_service_prototype_model['protocol'] = 'https'
instance_metadata_service_prototype_model['response_hop_limit'] = 2
- network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
- network_interface_ip_prototype_model['address'] = '10.0.0.5'
- network_interface_ip_prototype_model['auto_delete'] = False
- network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
-
- security_group_identity_model = {} # SecurityGroupIdentityById
- security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
-
- subnet_identity_model = {} # SubnetIdentityById
- subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
-
- network_interface_prototype_model = {} # NetworkInterfacePrototype
- network_interface_prototype_model['allow_ip_spoofing'] = True
- network_interface_prototype_model['name'] = 'my-network-interface'
- network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
- network_interface_prototype_model['security_groups'] = [security_group_identity_model]
- network_interface_prototype_model['subnet'] = subnet_identity_model
-
- instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
+ instance_placement_target_prototype_model = {} # InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
instance_placement_target_prototype_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_profile_identity_model = {} # InstanceProfileIdentityByName
+ instance_profile_identity_model = {} # InstanceProfileIdentityByName
instance_profile_identity_model['name'] = 'cx2-16x32'
- resource_group_reference_model = {} # ResourceGroupReference
+ resource_group_reference_model = {} # ResourceGroupReference
resource_group_reference_model['href'] = 'https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
resource_group_reference_model['name'] = 'my-resource-group'
- volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
+ volume_attachment_prototype_volume_model = {} # VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
volume_attachment_prototype_volume_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
- volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
+ volume_attachment_prototype_model = {} # VolumeAttachmentPrototype
volume_attachment_prototype_model['delete_volume_on_instance_delete'] = False
volume_attachment_prototype_model['name'] = 'my-volume-attachment'
volume_attachment_prototype_model['volume'] = volume_attachment_prototype_volume_model
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
- volume_prototype_instance_by_source_snapshot_context_model = {} # VolumePrototypeInstanceBySourceSnapshotContext
+ volume_prototype_instance_by_source_snapshot_context_model = {} # 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
@@ -63161,53 +66709,72 @@ def test_instance_template_instance_by_source_snapshot_serialization(self):
volume_prototype_instance_by_source_snapshot_context_model['source_snapshot'] = snapshot_identity_model
volume_prototype_instance_by_source_snapshot_context_model['user_tags'] = ['testString']
- 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
- zone_identity_model = {} # ZoneIdentityByName
+ network_interface_ip_prototype_model = {} # NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+ network_interface_ip_prototype_model['address'] = '10.0.0.5'
+ network_interface_ip_prototype_model['auto_delete'] = False
+ network_interface_ip_prototype_model['name'] = 'my-reserved-ip'
+
+ security_group_identity_model = {} # SecurityGroupIdentityById
+ security_group_identity_model['id'] = 'be5df5ca-12a0-494b-907e-aa6ec2bfa271'
+
+ subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
+
+ network_interface_prototype_model = {} # NetworkInterfacePrototype
+ network_interface_prototype_model['allow_ip_spoofing'] = True
+ network_interface_prototype_model['name'] = 'my-network-interface'
+ network_interface_prototype_model['primary_ip'] = network_interface_ip_prototype_model
+ network_interface_prototype_model['security_groups'] = [security_group_identity_model]
+ network_interface_prototype_model['subnet'] = subnet_identity_model
+
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- # Construct a json representation of a InstanceTemplateInstanceBySourceSnapshot model
- instance_template_instance_by_source_snapshot_model_json = {}
- instance_template_instance_by_source_snapshot_model_json['availability_policy'] = instance_availability_policy_prototype_model
- instance_template_instance_by_source_snapshot_model_json['created_at'] = '2019-01-01T12:00:00Z'
- instance_template_instance_by_source_snapshot_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_template_instance_by_source_snapshot_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
- instance_template_instance_by_source_snapshot_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a'
- instance_template_instance_by_source_snapshot_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
- instance_template_instance_by_source_snapshot_model_json['keys'] = [key_identity_model]
- instance_template_instance_by_source_snapshot_model_json['metadata_service'] = instance_metadata_service_prototype_model
- instance_template_instance_by_source_snapshot_model_json['name'] = 'my-instance-template'
- instance_template_instance_by_source_snapshot_model_json['network_interfaces'] = [network_interface_prototype_model]
- instance_template_instance_by_source_snapshot_model_json['placement_target'] = instance_placement_target_prototype_model
- instance_template_instance_by_source_snapshot_model_json['profile'] = instance_profile_identity_model
- instance_template_instance_by_source_snapshot_model_json['resource_group'] = resource_group_reference_model
- instance_template_instance_by_source_snapshot_model_json['total_volume_bandwidth'] = 500
- instance_template_instance_by_source_snapshot_model_json['user_data'] = 'testString'
- instance_template_instance_by_source_snapshot_model_json['volume_attachments'] = [volume_attachment_prototype_model]
- instance_template_instance_by_source_snapshot_model_json['vpc'] = vpc_identity_model
- instance_template_instance_by_source_snapshot_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model
- instance_template_instance_by_source_snapshot_model_json['primary_network_interface'] = network_interface_prototype_model
- instance_template_instance_by_source_snapshot_model_json['zone'] = zone_identity_model
-
- # Construct a model instance of InstanceTemplateInstanceBySourceSnapshot by calling from_dict on the json representation
- instance_template_instance_by_source_snapshot_model = InstanceTemplateInstanceBySourceSnapshot.from_dict(instance_template_instance_by_source_snapshot_model_json)
- assert instance_template_instance_by_source_snapshot_model != False
-
- # Construct a model instance of InstanceTemplateInstanceBySourceSnapshot by calling from_dict on the json representation
- instance_template_instance_by_source_snapshot_model_dict = InstanceTemplateInstanceBySourceSnapshot.from_dict(instance_template_instance_by_source_snapshot_model_json).__dict__
- instance_template_instance_by_source_snapshot_model2 = InstanceTemplateInstanceBySourceSnapshot(**instance_template_instance_by_source_snapshot_model_dict)
-
- # Verify the model instances are equivalent
- assert instance_template_instance_by_source_snapshot_model == instance_template_instance_by_source_snapshot_model2
-
- # Convert model instance back to dict and verify no loss of data
- instance_template_instance_by_source_snapshot_model_json2 = instance_template_instance_by_source_snapshot_model.to_dict()
- assert instance_template_instance_by_source_snapshot_model_json2 == instance_template_instance_by_source_snapshot_model_json
-
-class TestModel_KeyIdentityByCRN():
+ # Construct a json representation of a InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json = {}
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['availability_policy'] = instance_availability_policy_prototype_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['created_at'] = '2019-01-01T12:00:00Z'
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a'
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['default_trusted_profile'] = instance_default_trusted_profile_prototype_model
+ instance_template_instance_by_source_snapshot_instance_template_context_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_model_json['id'] = 'a6b1a881-2ce8-41a3-80fc-36316a73f803'
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['keys'] = [key_identity_model]
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['metadata_service'] = instance_metadata_service_prototype_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['name'] = 'my-instance-template'
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['placement_target'] = instance_placement_target_prototype_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['profile'] = instance_profile_identity_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['resource_group'] = resource_group_reference_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['total_volume_bandwidth'] = 500
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['user_data'] = 'testString'
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['volume_attachments'] = [volume_attachment_prototype_model]
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['vpc'] = vpc_identity_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['boot_volume_attachment'] = volume_attachment_prototype_instance_by_source_snapshot_context_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['network_interfaces'] = [network_interface_prototype_model]
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['primary_network_interface'] = network_interface_prototype_model
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json['zone'] = zone_identity_model
+
+ # Construct a model instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_instance_by_source_snapshot_instance_template_context_model = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.from_dict(instance_template_instance_by_source_snapshot_instance_template_context_model_json)
+ assert instance_template_instance_by_source_snapshot_instance_template_context_model != False
+
+ # Construct a model instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext by calling from_dict on the json representation
+ instance_template_instance_by_source_snapshot_instance_template_context_model_dict = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.from_dict(instance_template_instance_by_source_snapshot_instance_template_context_model_json).__dict__
+ instance_template_instance_by_source_snapshot_instance_template_context_model2 = InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(**instance_template_instance_by_source_snapshot_instance_template_context_model_dict)
+
+ # Verify the model instances are equivalent
+ assert instance_template_instance_by_source_snapshot_instance_template_context_model == instance_template_instance_by_source_snapshot_instance_template_context_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ instance_template_instance_by_source_snapshot_instance_template_context_model_json2 = instance_template_instance_by_source_snapshot_instance_template_context_model.to_dict()
+ assert instance_template_instance_by_source_snapshot_instance_template_context_model_json2 == instance_template_instance_by_source_snapshot_instance_template_context_model_json
+
+
+class TestModel_KeyIdentityByCRN:
"""
Test Class for KeyIdentityByCRN
"""
@@ -63236,7 +66803,8 @@ def test_key_identity_by_crn_serialization(self):
key_identity_by_crn_model_json2 = key_identity_by_crn_model.to_dict()
assert key_identity_by_crn_model_json2 == key_identity_by_crn_model_json
-class TestModel_KeyIdentityByFingerprint():
+
+class TestModel_KeyIdentityByFingerprint:
"""
Test Class for KeyIdentityByFingerprint
"""
@@ -63265,7 +66833,8 @@ def test_key_identity_by_fingerprint_serialization(self):
key_identity_by_fingerprint_model_json2 = key_identity_by_fingerprint_model.to_dict()
assert key_identity_by_fingerprint_model_json2 == key_identity_by_fingerprint_model_json
-class TestModel_KeyIdentityByHref():
+
+class TestModel_KeyIdentityByHref:
"""
Test Class for KeyIdentityByHref
"""
@@ -63294,7 +66863,8 @@ def test_key_identity_by_href_serialization(self):
key_identity_by_href_model_json2 = key_identity_by_href_model.to_dict()
assert key_identity_by_href_model_json2 == key_identity_by_href_model_json
-class TestModel_KeyIdentityById():
+
+class TestModel_KeyIdentityById:
"""
Test Class for KeyIdentityById
"""
@@ -63323,7 +66893,8 @@ def test_key_identity_by_id_serialization(self):
key_identity_by_id_model_json2 = key_identity_by_id_model.to_dict()
assert key_identity_by_id_model_json2 == key_identity_by_id_model_json
-class TestModel_LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName():
+
+class TestModel_LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName:
"""
Test Class for LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName
"""
@@ -63352,7 +66923,8 @@ def test_legacy_cloud_object_storage_bucket_identity_cloud_object_storage_bucket
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():
+
+class TestModel_LoadBalancerIdentityByCRN:
"""
Test Class for LoadBalancerIdentityByCRN
"""
@@ -63381,7 +66953,8 @@ def test_load_balancer_identity_by_crn_serialization(self):
load_balancer_identity_by_crn_model_json2 = load_balancer_identity_by_crn_model.to_dict()
assert load_balancer_identity_by_crn_model_json2 == load_balancer_identity_by_crn_model_json
-class TestModel_LoadBalancerIdentityByHref():
+
+class TestModel_LoadBalancerIdentityByHref:
"""
Test Class for LoadBalancerIdentityByHref
"""
@@ -63410,7 +66983,8 @@ def test_load_balancer_identity_by_href_serialization(self):
load_balancer_identity_by_href_model_json2 = load_balancer_identity_by_href_model.to_dict()
assert load_balancer_identity_by_href_model_json2 == load_balancer_identity_by_href_model_json
-class TestModel_LoadBalancerIdentityById():
+
+class TestModel_LoadBalancerIdentityById:
"""
Test Class for LoadBalancerIdentityById
"""
@@ -63439,7 +67013,8 @@ def test_load_balancer_identity_by_id_serialization(self):
load_balancer_identity_by_id_model_json2 = load_balancer_identity_by_id_model.to_dict()
assert load_balancer_identity_by_id_model_json2 == load_balancer_identity_by_id_model_json
-class TestModel_LoadBalancerListenerIdentityByHref():
+
+class TestModel_LoadBalancerListenerIdentityByHref:
"""
Test Class for LoadBalancerListenerIdentityByHref
"""
@@ -63468,7 +67043,8 @@ def test_load_balancer_listener_identity_by_href_serialization(self):
load_balancer_listener_identity_by_href_model_json2 = load_balancer_listener_identity_by_href_model.to_dict()
assert load_balancer_listener_identity_by_href_model_json2 == load_balancer_listener_identity_by_href_model_json
-class TestModel_LoadBalancerListenerIdentityById():
+
+class TestModel_LoadBalancerListenerIdentityById:
"""
Test Class for LoadBalancerListenerIdentityById
"""
@@ -63497,7 +67073,8 @@ def test_load_balancer_listener_identity_by_id_serialization(self):
load_balancer_listener_identity_by_id_model_json2 = load_balancer_listener_identity_by_id_model.to_dict()
assert load_balancer_listener_identity_by_id_model_json2 == load_balancer_listener_identity_by_id_model_json
-class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch():
+
+class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch:
"""
Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch
"""
@@ -63509,7 +67086,7 @@ def test_load_balancer_listener_policy_target_patch_load_balancer_listener_https
# 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 = {} # LoadBalancerListenerIdentityById
load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
# Construct a json representation of a LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch model
@@ -63533,7 +67110,8 @@ def test_load_balancer_listener_policy_target_patch_load_balancer_listener_https
load_balancer_listener_policy_target_patch_load_balancer_listener_https_redirect_patch_model_json2 = load_balancer_listener_policy_target_patch_load_balancer_listener_https_redirect_patch_model.to_dict()
assert load_balancer_listener_policy_target_patch_load_balancer_listener_https_redirect_patch_model_json2 == load_balancer_listener_policy_target_patch_load_balancer_listener_https_redirect_patch_model_json
-class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch():
+
+class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch:
"""
Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch
"""
@@ -63563,7 +67141,8 @@ def test_load_balancer_listener_policy_target_patch_load_balancer_listener_polic
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_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype():
+
+class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype:
"""
Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype
"""
@@ -63575,7 +67154,7 @@ def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_h
# 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 = {} # LoadBalancerListenerIdentityById
load_balancer_listener_identity_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
# Construct a json representation of a LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype model
@@ -63599,7 +67178,8 @@ def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_h
load_balancer_listener_policy_target_prototype_load_balancer_listener_https_redirect_prototype_model_json2 = load_balancer_listener_policy_target_prototype_load_balancer_listener_https_redirect_prototype_model.to_dict()
assert load_balancer_listener_policy_target_prototype_load_balancer_listener_https_redirect_prototype_model_json2 == load_balancer_listener_policy_target_prototype_load_balancer_listener_https_redirect_prototype_model_json
-class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype():
+
+class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype:
"""
Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype
"""
@@ -63629,7 +67209,8 @@ def test_load_balancer_listener_policy_target_prototype_load_balancer_listener_p
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_LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect():
+
+class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect:
"""
Test Class for LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect
"""
@@ -63641,10 +67222,10 @@ def test_load_balancer_listener_policy_target_load_balancer_listener_https_redir
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
+ load_balancer_listener_reference_deleted_model = {} # LoadBalancerListenerReferenceDeleted
load_balancer_listener_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
+ load_balancer_listener_reference_model = {} # LoadBalancerListenerReference
load_balancer_listener_reference_model['deleted'] = load_balancer_listener_reference_deleted_model
load_balancer_listener_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004'
load_balancer_listener_reference_model['id'] = '70294e14-4e61-11e8-bcf4-0242ac110004'
@@ -63670,7 +67251,8 @@ def test_load_balancer_listener_policy_target_load_balancer_listener_https_redir
load_balancer_listener_policy_target_load_balancer_listener_https_redirect_model_json2 = load_balancer_listener_policy_target_load_balancer_listener_https_redirect_model.to_dict()
assert load_balancer_listener_policy_target_load_balancer_listener_https_redirect_model_json2 == load_balancer_listener_policy_target_load_balancer_listener_https_redirect_model_json
-class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL():
+
+class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL:
"""
Test Class for LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL
"""
@@ -63700,7 +67282,8 @@ def test_load_balancer_listener_policy_target_load_balancer_listener_policy_redi
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():
+
+class TestModel_LoadBalancerListenerPolicyTargetLoadBalancerPoolReference:
"""
Test Class for LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
"""
@@ -63712,7 +67295,7 @@ def test_load_balancer_listener_policy_target_load_balancer_pool_reference_seria
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
+ load_balancer_pool_reference_deleted_model = {} # LoadBalancerPoolReferenceDeleted
load_balancer_pool_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerListenerPolicyTargetLoadBalancerPoolReference model
@@ -63737,7 +67320,8 @@ def test_load_balancer_listener_policy_target_load_balancer_pool_reference_seria
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_LoadBalancerPoolIdentityByHref():
+
+class TestModel_LoadBalancerPoolIdentityByHref:
"""
Test Class for LoadBalancerPoolIdentityByHref
"""
@@ -63766,7 +67350,8 @@ def test_load_balancer_pool_identity_by_href_serialization(self):
load_balancer_pool_identity_by_href_model_json2 = load_balancer_pool_identity_by_href_model.to_dict()
assert load_balancer_pool_identity_by_href_model_json2 == load_balancer_pool_identity_by_href_model_json
-class TestModel_LoadBalancerPoolIdentityById():
+
+class TestModel_LoadBalancerPoolIdentityById:
"""
Test Class for LoadBalancerPoolIdentityById
"""
@@ -63795,7 +67380,8 @@ def test_load_balancer_pool_identity_by_id_serialization(self):
load_balancer_pool_identity_by_id_model_json2 = load_balancer_pool_identity_by_id_model.to_dict()
assert load_balancer_pool_identity_by_id_model_json2 == load_balancer_pool_identity_by_id_model_json
-class TestModel_LoadBalancerPoolMemberTargetPrototypeIP():
+
+class TestModel_LoadBalancerPoolMemberTargetPrototypeIP:
"""
Test Class for LoadBalancerPoolMemberTargetPrototypeIP
"""
@@ -63824,7 +67410,8 @@ def test_load_balancer_pool_member_target_prototype_ip_serialization(self):
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():
+
+class TestModel_LoadBalancerPoolMemberTargetIP:
"""
Test Class for LoadBalancerPoolMemberTargetIP
"""
@@ -63853,7 +67440,8 @@ def test_load_balancer_pool_member_target_ip_serialization(self):
load_balancer_pool_member_target_ip_model_json2 = load_balancer_pool_member_target_ip_model.to_dict()
assert load_balancer_pool_member_target_ip_model_json2 == load_balancer_pool_member_target_ip_model_json
-class TestModel_LoadBalancerPoolMemberTargetInstanceReference():
+
+class TestModel_LoadBalancerPoolMemberTargetInstanceReference:
"""
Test Class for LoadBalancerPoolMemberTargetInstanceReference
"""
@@ -63865,7 +67453,7 @@ def test_load_balancer_pool_member_target_instance_reference_serialization(self)
# Construct dict forms of any model objects needed in order to build this model.
- instance_reference_deleted_model = {} # InstanceReferenceDeleted
+ instance_reference_deleted_model = {} # InstanceReferenceDeleted
instance_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a LoadBalancerPoolMemberTargetInstanceReference model
@@ -63891,7 +67479,8 @@ def test_load_balancer_pool_member_target_instance_reference_serialization(self)
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_LoadBalancerProfileIdentityByHref():
+
+class TestModel_LoadBalancerProfileIdentityByHref:
"""
Test Class for LoadBalancerProfileIdentityByHref
"""
@@ -63920,7 +67509,8 @@ def test_load_balancer_profile_identity_by_href_serialization(self):
load_balancer_profile_identity_by_href_model_json2 = load_balancer_profile_identity_by_href_model.to_dict()
assert load_balancer_profile_identity_by_href_model_json2 == load_balancer_profile_identity_by_href_model_json
-class TestModel_LoadBalancerProfileIdentityByName():
+
+class TestModel_LoadBalancerProfileIdentityByName:
"""
Test Class for LoadBalancerProfileIdentityByName
"""
@@ -63949,7 +67539,8 @@ def test_load_balancer_profile_identity_by_name_serialization(self):
load_balancer_profile_identity_by_name_model_json2 = load_balancer_profile_identity_by_name_model.to_dict()
assert load_balancer_profile_identity_by_name_model_json2 == load_balancer_profile_identity_by_name_model_json
-class TestModel_LoadBalancerProfileRouteModeSupportedDependent():
+
+class TestModel_LoadBalancerProfileRouteModeSupportedDependent:
"""
Test Class for LoadBalancerProfileRouteModeSupportedDependent
"""
@@ -63978,7 +67569,8 @@ def test_load_balancer_profile_route_mode_supported_dependent_serialization(self
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():
+
+class TestModel_LoadBalancerProfileRouteModeSupportedFixed:
"""
Test Class for LoadBalancerProfileRouteModeSupportedFixed
"""
@@ -64008,7 +67600,8 @@ def test_load_balancer_profile_route_mode_supported_fixed_serialization(self):
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():
+
+class TestModel_LoadBalancerProfileSecurityGroupsSupportedDependent:
"""
Test Class for LoadBalancerProfileSecurityGroupsSupportedDependent
"""
@@ -64037,7 +67630,8 @@ def test_load_balancer_profile_security_groups_supported_dependent_serialization
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():
+
+class TestModel_LoadBalancerProfileSecurityGroupsSupportedFixed:
"""
Test Class for LoadBalancerProfileSecurityGroupsSupportedFixed
"""
@@ -64067,7 +67661,8 @@ def test_load_balancer_profile_security_groups_supported_fixed_serialization(sel
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_LoadBalancerProfileUDPSupportedDependent():
+
+class TestModel_LoadBalancerProfileUDPSupportedDependent:
"""
Test Class for LoadBalancerProfileUDPSupportedDependent
"""
@@ -64096,7 +67691,8 @@ def test_load_balancer_profile_udp_supported_dependent_serialization(self):
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():
+
+class TestModel_LoadBalancerProfileUDPSupportedFixed:
"""
Test Class for LoadBalancerProfileUDPSupportedFixed
"""
@@ -64126,7 +67722,8 @@ def test_load_balancer_profile_udp_supported_fixed_serialization(self):
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():
+
+class TestModel_NetworkACLIdentityByCRN:
"""
Test Class for NetworkACLIdentityByCRN
"""
@@ -64155,7 +67752,8 @@ def test_network_acl_identity_by_crn_serialization(self):
network_acl_identity_by_crn_model_json2 = network_acl_identity_by_crn_model.to_dict()
assert network_acl_identity_by_crn_model_json2 == network_acl_identity_by_crn_model_json
-class TestModel_NetworkACLIdentityByHref():
+
+class TestModel_NetworkACLIdentityByHref:
"""
Test Class for NetworkACLIdentityByHref
"""
@@ -64184,7 +67782,8 @@ def test_network_acl_identity_by_href_serialization(self):
network_acl_identity_by_href_model_json2 = network_acl_identity_by_href_model.to_dict()
assert network_acl_identity_by_href_model_json2 == network_acl_identity_by_href_model_json
-class TestModel_NetworkACLIdentityById():
+
+class TestModel_NetworkACLIdentityById:
"""
Test Class for NetworkACLIdentityById
"""
@@ -64213,7 +67812,8 @@ def test_network_acl_identity_by_id_serialization(self):
network_acl_identity_by_id_model_json2 = network_acl_identity_by_id_model.to_dict()
assert network_acl_identity_by_id_model_json2 == network_acl_identity_by_id_model_json
-class TestModel_NetworkACLPrototypeNetworkACLByRules():
+
+class TestModel_NetworkACLPrototypeNetworkACLByRules:
"""
Test Class for NetworkACLPrototypeNetworkACLByRules
"""
@@ -64225,13 +67825,13 @@ def test_network_acl_prototype_network_acl_by_rules_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = 'cf7cd5a-2f30-4336-a495-6addc820cd61'
- network_acl_rule_prototype_network_acl_context_model = {} # NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype
+ network_acl_rule_prototype_network_acl_context_model = {} # NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype
network_acl_rule_prototype_network_acl_context_model['action'] = 'allow'
network_acl_rule_prototype_network_acl_context_model['destination'] = '192.168.3.2/32'
network_acl_rule_prototype_network_acl_context_model['direction'] = 'inbound'
@@ -64266,7 +67866,8 @@ def test_network_acl_prototype_network_acl_by_rules_serialization(self):
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():
+
+class TestModel_NetworkACLPrototypeNetworkACLBySourceNetworkACL:
"""
Test Class for NetworkACLPrototypeNetworkACLBySourceNetworkACL
"""
@@ -64278,13 +67879,13 @@ def test_network_acl_prototype_network_acl_by_source_network_acl_serialization(s
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = 'cf7cd5a-2f30-4336-a495-6addc820cd61'
- network_acl_identity_model = {} # NetworkACLIdentityById
+ network_acl_identity_model = {} # NetworkACLIdentityById
network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
# Construct a json representation of a NetworkACLPrototypeNetworkACLBySourceNetworkACL model
@@ -64309,7 +67910,8 @@ def test_network_acl_prototype_network_acl_by_source_network_acl_serialization(s
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():
+
+class TestModel_NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref:
"""
Test Class for NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref
"""
@@ -64338,7 +67940,8 @@ def test_network_acl_rule_before_patch_network_acl_rule_identity_by_href_seriali
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():
+
+class TestModel_NetworkACLRuleBeforePatchNetworkACLRuleIdentityById:
"""
Test Class for NetworkACLRuleBeforePatchNetworkACLRuleIdentityById
"""
@@ -64367,7 +67970,8 @@ def test_network_acl_rule_before_patch_network_acl_rule_identity_by_id_serializa
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():
+
+class TestModel_NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref:
"""
Test Class for NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref
"""
@@ -64396,7 +68000,8 @@ def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_href_ser
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():
+
+class TestModel_NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById:
"""
Test Class for NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById
"""
@@ -64425,7 +68030,8 @@ def test_network_acl_rule_before_prototype_network_acl_rule_identity_by_id_seria
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():
+
+class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolAll:
"""
Test Class for NetworkACLRuleItemNetworkACLRuleProtocolAll
"""
@@ -64437,10 +68043,10 @@ def test_network_acl_rule_item_network_acl_rule_protocol_all_serialization(self)
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
@@ -64475,7 +68081,8 @@ def test_network_acl_rule_item_network_acl_rule_protocol_all_serialization(self)
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():
+
+class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolICMP:
"""
Test Class for NetworkACLRuleItemNetworkACLRuleProtocolICMP
"""
@@ -64487,10 +68094,10 @@ def test_network_acl_rule_item_network_acl_rule_protocol_icmp_serialization(self
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
@@ -64527,7 +68134,8 @@ def test_network_acl_rule_item_network_acl_rule_protocol_icmp_serialization(self
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():
+
+class TestModel_NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP:
"""
Test Class for NetworkACLRuleItemNetworkACLRuleProtocolTCPUDP
"""
@@ -64539,10 +68147,10 @@ def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization(se
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
@@ -64581,7 +68189,8 @@ def test_network_acl_rule_item_network_acl_rule_protocol_tcpudp_serialization(se
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():
+
+class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype:
"""
Test Class for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype
"""
@@ -64616,7 +68225,8 @@ def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protoco
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():
+
+class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype:
"""
Test Class for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolICMPPrototype
"""
@@ -64653,7 +68263,8 @@ def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protoco
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():
+
+class TestModel_NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype:
"""
Test Class for NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTCPUDPPrototype
"""
@@ -64692,7 +68303,8 @@ def test_network_acl_rule_prototype_network_acl_context_network_acl_rule_protoco
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():
+
+class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype:
"""
Test Class for NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype
"""
@@ -64704,7 +68316,7 @@ 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 = {} # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById
network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
# Construct a json representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype model
@@ -64733,7 +68345,8 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_all_prototype_seri
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():
+
+class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype:
"""
Test Class for NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype
"""
@@ -64745,7 +68358,7 @@ 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 = {} # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById
network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
# Construct a json representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolICMPPrototype model
@@ -64776,7 +68389,8 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_icmp_prototype_ser
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():
+
+class TestModel_NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype:
"""
Test Class for NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype
"""
@@ -64788,7 +68402,7 @@ 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 = {} # NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityById
network_acl_rule_before_prototype_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
# Construct a json representation of a NetworkACLRulePrototypeNetworkACLRuleProtocolTCPUDPPrototype model
@@ -64821,7 +68435,8 @@ def test_network_acl_rule_prototype_network_acl_rule_protocol_tcpudp_prototype_s
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():
+
+class TestModel_NetworkACLRuleNetworkACLRuleProtocolAll:
"""
Test Class for NetworkACLRuleNetworkACLRuleProtocolAll
"""
@@ -64833,10 +68448,10 @@ def test_network_acl_rule_network_acl_rule_protocol_all_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
@@ -64871,7 +68486,8 @@ def test_network_acl_rule_network_acl_rule_protocol_all_serialization(self):
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():
+
+class TestModel_NetworkACLRuleNetworkACLRuleProtocolICMP:
"""
Test Class for NetworkACLRuleNetworkACLRuleProtocolICMP
"""
@@ -64883,10 +68499,10 @@ def test_network_acl_rule_network_acl_rule_protocol_icmp_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
@@ -64923,7 +68539,8 @@ def test_network_acl_rule_network_acl_rule_protocol_icmp_serialization(self):
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():
+
+class TestModel_NetworkACLRuleNetworkACLRuleProtocolTCPUDP:
"""
Test Class for NetworkACLRuleNetworkACLRuleProtocolTCPUDP
"""
@@ -64935,10 +68552,10 @@ def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
+ network_acl_rule_reference_deleted_model = {} # NetworkACLRuleReferenceDeleted
network_acl_rule_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- network_acl_rule_reference_model = {} # NetworkACLRuleReference
+ network_acl_rule_reference_model = {} # NetworkACLRuleReference
network_acl_rule_reference_model['deleted'] = network_acl_rule_reference_deleted_model
network_acl_rule_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9'
network_acl_rule_reference_model['id'] = '8daca77a-4980-4d33-8f3e-7038797be8f9'
@@ -64977,7 +68594,8 @@ def test_network_acl_rule_network_acl_rule_protocol_tcpudp_serialization(self):
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():
+
+class TestModel_NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext:
"""
Test Class for NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
"""
@@ -65008,7 +68626,8 @@ def test_network_interface_ip_prototype_reserved_ip_prototype_network_interface_
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():
+
+class TestModel_OperatingSystemIdentityByHref:
"""
Test Class for OperatingSystemIdentityByHref
"""
@@ -65037,7 +68656,8 @@ def test_operating_system_identity_by_href_serialization(self):
operating_system_identity_by_href_model_json2 = operating_system_identity_by_href_model.to_dict()
assert operating_system_identity_by_href_model_json2 == operating_system_identity_by_href_model_json
-class TestModel_OperatingSystemIdentityByName():
+
+class TestModel_OperatingSystemIdentityByName:
"""
Test Class for OperatingSystemIdentityByName
"""
@@ -65066,7 +68686,8 @@ def test_operating_system_identity_by_name_serialization(self):
operating_system_identity_by_name_model_json2 = operating_system_identity_by_name_model.to_dict()
assert operating_system_identity_by_name_model_json2 == operating_system_identity_by_name_model_json
-class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext():
+
+class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext:
"""
Test Class for PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext
"""
@@ -65078,7 +68699,7 @@ def test_public_gateway_floating_ip_prototype_floating_ip_prototype_target_conte
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
# Construct a json representation of a PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext model
@@ -65101,7 +68722,8 @@ def test_public_gateway_floating_ip_prototype_floating_ip_prototype_target_conte
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():
+
+class TestModel_PublicGatewayIdentityPublicGatewayIdentityByCRN:
"""
Test Class for PublicGatewayIdentityPublicGatewayIdentityByCRN
"""
@@ -65130,7 +68752,8 @@ def test_public_gateway_identity_public_gateway_identity_by_crn_serialization(se
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():
+
+class TestModel_PublicGatewayIdentityPublicGatewayIdentityByHref:
"""
Test Class for PublicGatewayIdentityPublicGatewayIdentityByHref
"""
@@ -65159,7 +68782,8 @@ def test_public_gateway_identity_public_gateway_identity_by_href_serialization(s
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():
+
+class TestModel_PublicGatewayIdentityPublicGatewayIdentityById:
"""
Test Class for PublicGatewayIdentityPublicGatewayIdentityById
"""
@@ -65188,7 +68812,8 @@ def test_public_gateway_identity_public_gateway_identity_by_id_serialization(sel
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_ReservedIPTargetEndpointGatewayReference():
+
+class TestModel_ReservedIPTargetEndpointGatewayReference:
"""
Test Class for ReservedIPTargetEndpointGatewayReference
"""
@@ -65200,7 +68825,7 @@ def test_reserved_ip_target_endpoint_gateway_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
+ endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPTargetEndpointGatewayReference model
@@ -65227,7 +68852,8 @@ def test_reserved_ip_target_endpoint_gateway_reference_serialization(self):
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():
+
+class TestModel_ReservedIPTargetGenericResourceReference:
"""
Test Class for ReservedIPTargetGenericResourceReference
"""
@@ -65239,7 +68865,7 @@ def test_reserved_ip_target_generic_resource_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- generic_resource_reference_deleted_model = {} # GenericResourceReferenceDeleted
+ generic_resource_reference_deleted_model = {} # GenericResourceReferenceDeleted
generic_resource_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPTargetGenericResourceReference model
@@ -65263,7 +68889,8 @@ def test_reserved_ip_target_generic_resource_reference_serialization(self):
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():
+
+class TestModel_ReservedIPTargetLoadBalancerReference:
"""
Test Class for ReservedIPTargetLoadBalancerReference
"""
@@ -65275,7 +68902,7 @@ def test_reserved_ip_target_load_balancer_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_reference_deleted_model = {} # LoadBalancerReferenceDeleted
+ load_balancer_reference_deleted_model = {} # LoadBalancerReferenceDeleted
load_balancer_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPTargetLoadBalancerReference model
@@ -65302,7 +68929,8 @@ def test_reserved_ip_target_load_balancer_reference_serialization(self):
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():
+
+class TestModel_ReservedIPTargetNetworkInterfaceReferenceTargetContext:
"""
Test Class for ReservedIPTargetNetworkInterfaceReferenceTargetContext
"""
@@ -65314,7 +68942,7 @@ def test_reserved_ip_target_network_interface_reference_target_context_serializa
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPTargetNetworkInterfaceReferenceTargetContext model
@@ -65340,7 +68968,8 @@ def test_reserved_ip_target_network_interface_reference_target_context_serializa
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():
+
+class TestModel_ReservedIPTargetVPNGatewayReference:
"""
Test Class for ReservedIPTargetVPNGatewayReference
"""
@@ -65352,7 +68981,7 @@ def test_reserved_ip_target_vpn_gateway_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_reference_deleted_model = {} # VPNGatewayReferenceDeleted
+ vpn_gateway_reference_deleted_model = {} # VPNGatewayReferenceDeleted
vpn_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPTargetVPNGatewayReference model
@@ -65379,7 +69008,8 @@ def test_reserved_ip_target_vpn_gateway_reference_serialization(self):
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
-class TestModel_ReservedIPTargetVPNServerReference():
+
+class TestModel_ReservedIPTargetVPNServerReference:
"""
Test Class for ReservedIPTargetVPNServerReference
"""
@@ -65391,7 +69021,7 @@ def test_reserved_ip_target_vpn_server_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted
+ vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted
vpn_server_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a ReservedIPTargetVPNServerReference model
@@ -65418,7 +69048,8 @@ def test_reserved_ip_target_vpn_server_reference_serialization(self):
reserved_ip_target_vpn_server_reference_model_json2 = reserved_ip_target_vpn_server_reference_model.to_dict()
assert reserved_ip_target_vpn_server_reference_model_json2 == reserved_ip_target_vpn_server_reference_model_json
-class TestModel_ResourceGroupIdentityById():
+
+class TestModel_ResourceGroupIdentityById:
"""
Test Class for ResourceGroupIdentityById
"""
@@ -65447,7 +69078,8 @@ def test_resource_group_identity_by_id_serialization(self):
resource_group_identity_by_id_model_json2 = resource_group_identity_by_id_model.to_dict()
assert resource_group_identity_by_id_model_json2 == resource_group_identity_by_id_model_json
-class TestModel_RouteCreatorVPNGatewayReference():
+
+class TestModel_RouteCreatorVPNGatewayReference:
"""
Test Class for RouteCreatorVPNGatewayReference
"""
@@ -65459,7 +69091,7 @@ def test_route_creator_vpn_gateway_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_reference_deleted_model = {} # VPNGatewayReferenceDeleted
+ vpn_gateway_reference_deleted_model = {} # VPNGatewayReferenceDeleted
vpn_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a RouteCreatorVPNGatewayReference model
@@ -65486,7 +69118,8 @@ def test_route_creator_vpn_gateway_reference_serialization(self):
route_creator_vpn_gateway_reference_model_json2 = route_creator_vpn_gateway_reference_model.to_dict()
assert route_creator_vpn_gateway_reference_model_json2 == route_creator_vpn_gateway_reference_model_json
-class TestModel_RouteCreatorVPNServerReference():
+
+class TestModel_RouteCreatorVPNServerReference:
"""
Test Class for RouteCreatorVPNServerReference
"""
@@ -65498,7 +69131,7 @@ def test_route_creator_vpn_server_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted
+ vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted
vpn_server_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a RouteCreatorVPNServerReference model
@@ -65525,7 +69158,8 @@ def test_route_creator_vpn_server_reference_serialization(self):
route_creator_vpn_server_reference_model_json2 = route_creator_vpn_server_reference_model.to_dict()
assert route_creator_vpn_server_reference_model_json2 == route_creator_vpn_server_reference_model_json
-class TestModel_RouteNextHopIP():
+
+class TestModel_RouteNextHopIP:
"""
Test Class for RouteNextHopIP
"""
@@ -65554,36 +69188,8 @@ def test_route_next_hop_ip_serialization(self):
route_next_hop_ip_model_json2 = route_next_hop_ip_model.to_dict()
assert route_next_hop_ip_model_json2 == route_next_hop_ip_model_json
-class TestModel_RouteNextHopPatchRouteNextHopIP():
- """
- Test Class for RouteNextHopPatchRouteNextHopIP
- """
-
- def test_route_next_hop_patch_route_next_hop_ip_serialization(self):
- """
- Test serialization/deserialization for RouteNextHopPatchRouteNextHopIP
- """
-
- # Construct a json representation of a RouteNextHopPatchRouteNextHopIP model
- route_next_hop_patch_route_next_hop_ip_model_json = {}
- route_next_hop_patch_route_next_hop_ip_model_json['address'] = '192.168.3.4'
-
- # Construct a model instance of RouteNextHopPatchRouteNextHopIP by calling from_dict on the json representation
- route_next_hop_patch_route_next_hop_ip_model = RouteNextHopPatchRouteNextHopIP.from_dict(route_next_hop_patch_route_next_hop_ip_model_json)
- assert route_next_hop_patch_route_next_hop_ip_model != False
-
- # Construct a model instance of RouteNextHopPatchRouteNextHopIP by calling from_dict on the json representation
- route_next_hop_patch_route_next_hop_ip_model_dict = RouteNextHopPatchRouteNextHopIP.from_dict(route_next_hop_patch_route_next_hop_ip_model_json).__dict__
- route_next_hop_patch_route_next_hop_ip_model2 = RouteNextHopPatchRouteNextHopIP(**route_next_hop_patch_route_next_hop_ip_model_dict)
-
- # Verify the model instances are equivalent
- assert route_next_hop_patch_route_next_hop_ip_model == route_next_hop_patch_route_next_hop_ip_model2
-
- # Convert model instance back to dict and verify no loss of data
- route_next_hop_patch_route_next_hop_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_model.to_dict()
- assert route_next_hop_patch_route_next_hop_ip_model_json2 == route_next_hop_patch_route_next_hop_ip_model_json
-class TestModel_RouteNextHopVPNGatewayConnectionReference():
+class TestModel_RouteNextHopVPNGatewayConnectionReference:
"""
Test Class for RouteNextHopVPNGatewayConnectionReference
"""
@@ -65595,7 +69201,7 @@ def test_route_next_hop_vpn_gateway_connection_reference_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a RouteNextHopVPNGatewayConnectionReference model
@@ -65621,36 +69227,8 @@ def test_route_next_hop_vpn_gateway_connection_reference_serialization(self):
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_RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP():
- """
- Test Class for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP
- """
-
- def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_serialization(self):
- """
- Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP
- """
- # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP model
- route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json = {}
- route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json['address'] = '192.168.3.4'
-
- # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP by calling from_dict on the json representation
- route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json)
- assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model != False
-
- # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP by calling from_dict on the json representation
- route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json).__dict__
- route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP(**route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_dict)
-
- # Verify the model instances are equivalent
- assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model2
-
- # Convert model instance back to dict and verify no loss of data
- route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model.to_dict()
- assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json2 == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_model_json
-
-class TestModel_RoutingTableIdentityByHref():
+class TestModel_RoutingTableIdentityByHref:
"""
Test Class for RoutingTableIdentityByHref
"""
@@ -65679,7 +69257,8 @@ def test_routing_table_identity_by_href_serialization(self):
routing_table_identity_by_href_model_json2 = routing_table_identity_by_href_model.to_dict()
assert routing_table_identity_by_href_model_json2 == routing_table_identity_by_href_model_json
-class TestModel_RoutingTableIdentityById():
+
+class TestModel_RoutingTableIdentityById:
"""
Test Class for RoutingTableIdentityById
"""
@@ -65708,7 +69287,8 @@ def test_routing_table_identity_by_id_serialization(self):
routing_table_identity_by_id_model_json2 = routing_table_identity_by_id_model.to_dict()
assert routing_table_identity_by_id_model_json2 == routing_table_identity_by_id_model_json
-class TestModel_SecurityGroupIdentityByCRN():
+
+class TestModel_SecurityGroupIdentityByCRN:
"""
Test Class for SecurityGroupIdentityByCRN
"""
@@ -65737,7 +69317,8 @@ def test_security_group_identity_by_crn_serialization(self):
security_group_identity_by_crn_model_json2 = security_group_identity_by_crn_model.to_dict()
assert security_group_identity_by_crn_model_json2 == security_group_identity_by_crn_model_json
-class TestModel_SecurityGroupIdentityByHref():
+
+class TestModel_SecurityGroupIdentityByHref:
"""
Test Class for SecurityGroupIdentityByHref
"""
@@ -65766,7 +69347,8 @@ def test_security_group_identity_by_href_serialization(self):
security_group_identity_by_href_model_json2 = security_group_identity_by_href_model.to_dict()
assert security_group_identity_by_href_model_json2 == security_group_identity_by_href_model_json
-class TestModel_SecurityGroupIdentityById():
+
+class TestModel_SecurityGroupIdentityById:
"""
Test Class for SecurityGroupIdentityById
"""
@@ -65795,7 +69377,8 @@ def test_security_group_identity_by_id_serialization(self):
security_group_identity_by_id_model_json2 = security_group_identity_by_id_model.to_dict()
assert security_group_identity_by_id_model_json2 == security_group_identity_by_id_model_json
-class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll():
+
+class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll:
"""
Test Class for SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll
"""
@@ -65807,7 +69390,7 @@ def test_security_group_rule_prototype_security_group_rule_protocol_all_serializ
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP
+ security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP
security_group_rule_remote_prototype_model['address'] = '192.168.3.4'
# Construct a json representation of a SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll model
@@ -65832,7 +69415,8 @@ def test_security_group_rule_prototype_security_group_rule_protocol_all_serializ
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():
+
+class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP:
"""
Test Class for SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP
"""
@@ -65844,7 +69428,7 @@ def test_security_group_rule_prototype_security_group_rule_protocol_icmp_seriali
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP
+ security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP
security_group_rule_remote_prototype_model['address'] = '192.168.3.4'
# Construct a json representation of a SecurityGroupRulePrototypeSecurityGroupRuleProtocolICMP model
@@ -65871,7 +69455,8 @@ def test_security_group_rule_prototype_security_group_rule_protocol_icmp_seriali
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():
+
+class TestModel_SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP:
"""
Test Class for SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP
"""
@@ -65883,7 +69468,7 @@ def test_security_group_rule_prototype_security_group_rule_protocol_tcpudp_seria
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP
+ security_group_rule_remote_prototype_model = {} # SecurityGroupRuleRemotePrototypeIP
security_group_rule_remote_prototype_model['address'] = '192.168.3.4'
# Construct a json representation of a SecurityGroupRulePrototypeSecurityGroupRuleProtocolTCPUDP model
@@ -65910,7 +69495,8 @@ def test_security_group_rule_prototype_security_group_rule_protocol_tcpudp_seria
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():
+
+class TestModel_SecurityGroupRuleRemotePatchCIDR:
"""
Test Class for SecurityGroupRuleRemotePatchCIDR
"""
@@ -65939,7 +69525,8 @@ def test_security_group_rule_remote_patch_cidr_serialization(self):
security_group_rule_remote_patch_cidr_model_json2 = security_group_rule_remote_patch_cidr_model.to_dict()
assert security_group_rule_remote_patch_cidr_model_json2 == security_group_rule_remote_patch_cidr_model_json
-class TestModel_SecurityGroupRuleRemotePatchIP():
+
+class TestModel_SecurityGroupRuleRemotePatchIP:
"""
Test Class for SecurityGroupRuleRemotePatchIP
"""
@@ -65968,7 +69555,8 @@ def test_security_group_rule_remote_patch_ip_serialization(self):
security_group_rule_remote_patch_ip_model_json2 = security_group_rule_remote_patch_ip_model.to_dict()
assert security_group_rule_remote_patch_ip_model_json2 == security_group_rule_remote_patch_ip_model_json
-class TestModel_SecurityGroupRuleRemotePrototypeCIDR():
+
+class TestModel_SecurityGroupRuleRemotePrototypeCIDR:
"""
Test Class for SecurityGroupRuleRemotePrototypeCIDR
"""
@@ -65997,7 +69585,8 @@ def test_security_group_rule_remote_prototype_cidr_serialization(self):
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():
+
+class TestModel_SecurityGroupRuleRemotePrototypeIP:
"""
Test Class for SecurityGroupRuleRemotePrototypeIP
"""
@@ -66026,7 +69615,8 @@ def test_security_group_rule_remote_prototype_ip_serialization(self):
security_group_rule_remote_prototype_ip_model_json2 = security_group_rule_remote_prototype_ip_model.to_dict()
assert security_group_rule_remote_prototype_ip_model_json2 == security_group_rule_remote_prototype_ip_model_json
-class TestModel_SecurityGroupRuleRemoteCIDR():
+
+class TestModel_SecurityGroupRuleRemoteCIDR:
"""
Test Class for SecurityGroupRuleRemoteCIDR
"""
@@ -66055,7 +69645,8 @@ def test_security_group_rule_remote_cidr_serialization(self):
security_group_rule_remote_cidr_model_json2 = security_group_rule_remote_cidr_model.to_dict()
assert security_group_rule_remote_cidr_model_json2 == security_group_rule_remote_cidr_model_json
-class TestModel_SecurityGroupRuleRemoteIP():
+
+class TestModel_SecurityGroupRuleRemoteIP:
"""
Test Class for SecurityGroupRuleRemoteIP
"""
@@ -66084,7 +69675,8 @@ def test_security_group_rule_remote_ip_serialization(self):
security_group_rule_remote_ip_model_json2 = security_group_rule_remote_ip_model.to_dict()
assert security_group_rule_remote_ip_model_json2 == security_group_rule_remote_ip_model_json
-class TestModel_SecurityGroupRuleRemoteSecurityGroupReference():
+
+class TestModel_SecurityGroupRuleRemoteSecurityGroupReference:
"""
Test Class for SecurityGroupRuleRemoteSecurityGroupReference
"""
@@ -66096,7 +69688,7 @@ def test_security_group_rule_remote_security_group_reference_serialization(self)
# Construct dict forms of any model objects needed in order to build this model.
- security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
+ security_group_reference_deleted_model = {} # SecurityGroupReferenceDeleted
security_group_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SecurityGroupRuleRemoteSecurityGroupReference model
@@ -66122,7 +69714,8 @@ def test_security_group_rule_remote_security_group_reference_serialization(self)
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():
+
+class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolAll:
"""
Test Class for SecurityGroupRuleSecurityGroupRuleProtocolAll
"""
@@ -66134,7 +69727,7 @@ def test_security_group_rule_security_group_rule_protocol_all_serialization(self
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
# Construct a json representation of a SecurityGroupRuleSecurityGroupRuleProtocolAll model
@@ -66161,7 +69754,8 @@ def test_security_group_rule_security_group_rule_protocol_all_serialization(self
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():
+
+class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolICMP:
"""
Test Class for SecurityGroupRuleSecurityGroupRuleProtocolICMP
"""
@@ -66173,7 +69767,7 @@ def test_security_group_rule_security_group_rule_protocol_icmp_serialization(sel
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
# Construct a json representation of a SecurityGroupRuleSecurityGroupRuleProtocolICMP model
@@ -66202,7 +69796,8 @@ def test_security_group_rule_security_group_rule_protocol_icmp_serialization(sel
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():
+
+class TestModel_SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP:
"""
Test Class for SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP
"""
@@ -66214,7 +69809,7 @@ def test_security_group_rule_security_group_rule_protocol_tcpudp_serialization(s
# Construct dict forms of any model objects needed in order to build this model.
- security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
+ security_group_rule_remote_model = {} # SecurityGroupRuleRemoteIP
security_group_rule_remote_model['address'] = '192.168.3.4'
# Construct a json representation of a SecurityGroupRuleSecurityGroupRuleProtocolTCPUDP model
@@ -66243,7 +69838,8 @@ def test_security_group_rule_security_group_rule_protocol_tcpudp_serialization(s
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_SecurityGroupTargetReferenceEndpointGatewayReference():
+
+class TestModel_SecurityGroupTargetReferenceEndpointGatewayReference:
"""
Test Class for SecurityGroupTargetReferenceEndpointGatewayReference
"""
@@ -66255,7 +69851,7 @@ def test_security_group_target_reference_endpoint_gateway_reference_serializatio
# Construct dict forms of any model objects needed in order to build this model.
- endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
+ endpoint_gateway_reference_deleted_model = {} # EndpointGatewayReferenceDeleted
endpoint_gateway_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SecurityGroupTargetReferenceEndpointGatewayReference model
@@ -66282,7 +69878,8 @@ def test_security_group_target_reference_endpoint_gateway_reference_serializatio
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():
+
+class TestModel_SecurityGroupTargetReferenceLoadBalancerReference:
"""
Test Class for SecurityGroupTargetReferenceLoadBalancerReference
"""
@@ -66294,7 +69891,7 @@ def test_security_group_target_reference_load_balancer_reference_serialization(s
# Construct dict forms of any model objects needed in order to build this model.
- load_balancer_reference_deleted_model = {} # LoadBalancerReferenceDeleted
+ load_balancer_reference_deleted_model = {} # LoadBalancerReferenceDeleted
load_balancer_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SecurityGroupTargetReferenceLoadBalancerReference model
@@ -66321,7 +69918,8 @@ def test_security_group_target_reference_load_balancer_reference_serialization(s
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():
+
+class TestModel_SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext:
"""
Test Class for SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
"""
@@ -66333,7 +69931,7 @@ def test_security_group_target_reference_network_interface_reference_target_cont
# Construct dict forms of any model objects needed in order to build this model.
- network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
+ network_interface_reference_target_context_deleted_model = {} # NetworkInterfaceReferenceTargetContextDeleted
network_interface_reference_target_context_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext model
@@ -66359,7 +69957,8 @@ def test_security_group_target_reference_network_interface_reference_target_cont
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():
+
+class TestModel_SecurityGroupTargetReferenceVPNServerReference:
"""
Test Class for SecurityGroupTargetReferenceVPNServerReference
"""
@@ -66371,7 +69970,7 @@ def test_security_group_target_reference_vpn_server_reference_serialization(self
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted
+ vpn_server_reference_deleted_model = {} # VPNServerReferenceDeleted
vpn_server_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
# Construct a json representation of a SecurityGroupTargetReferenceVPNServerReference model
@@ -66398,7 +69997,8 @@ def test_security_group_target_reference_vpn_server_reference_serialization(self
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_SnapshotIdentityByCRN():
+
+class TestModel_SnapshotIdentityByCRN:
"""
Test Class for SnapshotIdentityByCRN
"""
@@ -66427,7 +70027,8 @@ def test_snapshot_identity_by_crn_serialization(self):
snapshot_identity_by_crn_model_json2 = snapshot_identity_by_crn_model.to_dict()
assert snapshot_identity_by_crn_model_json2 == snapshot_identity_by_crn_model_json
-class TestModel_SnapshotIdentityByHref():
+
+class TestModel_SnapshotIdentityByHref:
"""
Test Class for SnapshotIdentityByHref
"""
@@ -66456,7 +70057,8 @@ def test_snapshot_identity_by_href_serialization(self):
snapshot_identity_by_href_model_json2 = snapshot_identity_by_href_model.to_dict()
assert snapshot_identity_by_href_model_json2 == snapshot_identity_by_href_model_json
-class TestModel_SnapshotIdentityById():
+
+class TestModel_SnapshotIdentityById:
"""
Test Class for SnapshotIdentityById
"""
@@ -66485,7 +70087,8 @@ def test_snapshot_identity_by_id_serialization(self):
snapshot_identity_by_id_model_json2 = snapshot_identity_by_id_model.to_dict()
assert snapshot_identity_by_id_model_json2 == snapshot_identity_by_id_model_json
-class TestModel_SnapshotPrototypeSnapshotBySourceVolume():
+
+class TestModel_SnapshotPrototypeSnapshotBySourceVolume:
"""
Test Class for SnapshotPrototypeSnapshotBySourceVolume
"""
@@ -66497,16 +70100,16 @@ def test_snapshot_prototype_snapshot_by_source_volume_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- snapshot_clone_prototype_model = {} # SnapshotClonePrototype
+ snapshot_clone_prototype_model = {} # SnapshotClonePrototype
snapshot_clone_prototype_model['zone'] = zone_identity_model
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- volume_identity_model = {} # VolumeIdentityById
+ volume_identity_model = {} # VolumeIdentityById
volume_identity_model['id'] = '1a6b7274-678d-4dfb-8981-c71dd9d4daa5'
# Construct a json representation of a SnapshotPrototypeSnapshotBySourceVolume model
@@ -66532,7 +70135,8 @@ def test_snapshot_prototype_snapshot_by_source_volume_serialization(self):
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():
+
+class TestModel_SubnetIdentityByCRN:
"""
Test Class for SubnetIdentityByCRN
"""
@@ -66561,7 +70165,8 @@ def test_subnet_identity_by_crn_serialization(self):
subnet_identity_by_crn_model_json2 = subnet_identity_by_crn_model.to_dict()
assert subnet_identity_by_crn_model_json2 == subnet_identity_by_crn_model_json
-class TestModel_SubnetIdentityByHref():
+
+class TestModel_SubnetIdentityByHref:
"""
Test Class for SubnetIdentityByHref
"""
@@ -66590,7 +70195,8 @@ def test_subnet_identity_by_href_serialization(self):
subnet_identity_by_href_model_json2 = subnet_identity_by_href_model.to_dict()
assert subnet_identity_by_href_model_json2 == subnet_identity_by_href_model_json
-class TestModel_SubnetIdentityById():
+
+class TestModel_SubnetIdentityById:
"""
Test Class for SubnetIdentityById
"""
@@ -66619,7 +70225,8 @@ def test_subnet_identity_by_id_serialization(self):
subnet_identity_by_id_model_json2 = subnet_identity_by_id_model.to_dict()
assert subnet_identity_by_id_model_json2 == subnet_identity_by_id_model_json
-class TestModel_SubnetPrototypeSubnetByCIDR():
+
+class TestModel_SubnetPrototypeSubnetByCIDR:
"""
Test Class for SubnetPrototypeSubnetByCIDR
"""
@@ -66631,22 +70238,22 @@ def test_subnet_prototype_subnet_by_cidr_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_identity_model = {} # NetworkACLIdentityById
+ network_acl_identity_model = {} # NetworkACLIdentityById
network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
- public_gateway_identity_model = {} # PublicGatewayIdentityPublicGatewayIdentityById
+ public_gateway_identity_model = {} # PublicGatewayIdentityPublicGatewayIdentityById
public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- routing_table_identity_model = {} # RoutingTableIdentityById
+ routing_table_identity_model = {} # RoutingTableIdentityById
routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840'
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a SubnetPrototypeSubnetByCIDR model
@@ -66676,7 +70283,8 @@ def test_subnet_prototype_subnet_by_cidr_serialization(self):
subnet_prototype_subnet_by_cidr_model_json2 = subnet_prototype_subnet_by_cidr_model.to_dict()
assert subnet_prototype_subnet_by_cidr_model_json2 == subnet_prototype_subnet_by_cidr_model_json
-class TestModel_SubnetPrototypeSubnetByTotalCount():
+
+class TestModel_SubnetPrototypeSubnetByTotalCount:
"""
Test Class for SubnetPrototypeSubnetByTotalCount
"""
@@ -66688,22 +70296,22 @@ def test_subnet_prototype_subnet_by_total_count_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- network_acl_identity_model = {} # NetworkACLIdentityById
+ network_acl_identity_model = {} # NetworkACLIdentityById
network_acl_identity_model['id'] = 'a4e28308-8ee7-46ab-8108-9f881f22bdbf'
- public_gateway_identity_model = {} # PublicGatewayIdentityPublicGatewayIdentityById
+ public_gateway_identity_model = {} # PublicGatewayIdentityPublicGatewayIdentityById
public_gateway_identity_model['id'] = 'dc5431ef-1fc6-4861-adc9-a59d077d1241'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- routing_table_identity_model = {} # RoutingTableIdentityById
+ routing_table_identity_model = {} # RoutingTableIdentityById
routing_table_identity_model['id'] = '6885e83f-03b2-4603-8a86-db2a0f55c840'
- vpc_identity_model = {} # VPCIdentityById
+ vpc_identity_model = {} # VPCIdentityById
vpc_identity_model['id'] = '4727d842-f94f-4a2d-824a-9bc9b02c523b'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
# Construct a json representation of a SubnetPrototypeSubnetByTotalCount model
@@ -66733,7 +70341,8 @@ def test_subnet_prototype_subnet_by_total_count_serialization(self):
subnet_prototype_subnet_by_total_count_model_json2 = subnet_prototype_subnet_by_total_count_model.to_dict()
assert subnet_prototype_subnet_by_total_count_model_json2 == subnet_prototype_subnet_by_total_count_model_json
-class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityByCRN():
+
+class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityByCRN:
"""
Test Class for SubnetPublicGatewayPatchPublicGatewayIdentityByCRN
"""
@@ -66762,7 +70371,8 @@ def test_subnet_public_gateway_patch_public_gateway_identity_by_crn_serializatio
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():
+
+class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityByHref:
"""
Test Class for SubnetPublicGatewayPatchPublicGatewayIdentityByHref
"""
@@ -66791,7 +70401,8 @@ def test_subnet_public_gateway_patch_public_gateway_identity_by_href_serializati
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():
+
+class TestModel_SubnetPublicGatewayPatchPublicGatewayIdentityById:
"""
Test Class for SubnetPublicGatewayPatchPublicGatewayIdentityById
"""
@@ -66820,7 +70431,8 @@ def test_subnet_public_gateway_patch_public_gateway_identity_by_id_serialization
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_TrustedProfileIdentityTrustedProfileByCRN():
+
+class TestModel_TrustedProfileIdentityTrustedProfileByCRN:
"""
Test Class for TrustedProfileIdentityTrustedProfileByCRN
"""
@@ -66849,7 +70461,8 @@ def test_trusted_profile_identity_trusted_profile_by_crn_serialization(self):
trusted_profile_identity_trusted_profile_by_crn_model_json2 = trusted_profile_identity_trusted_profile_by_crn_model.to_dict()
assert trusted_profile_identity_trusted_profile_by_crn_model_json2 == trusted_profile_identity_trusted_profile_by_crn_model_json
-class TestModel_TrustedProfileIdentityTrustedProfileById():
+
+class TestModel_TrustedProfileIdentityTrustedProfileById:
"""
Test Class for TrustedProfileIdentityTrustedProfileById
"""
@@ -66878,7 +70491,8 @@ def test_trusted_profile_identity_trusted_profile_by_id_serialization(self):
trusted_profile_identity_trusted_profile_by_id_model_json2 = trusted_profile_identity_trusted_profile_by_id_model.to_dict()
assert trusted_profile_identity_trusted_profile_by_id_model_json2 == trusted_profile_identity_trusted_profile_by_id_model_json
-class TestModel_VPCIdentityByCRN():
+
+class TestModel_VPCIdentityByCRN:
"""
Test Class for VPCIdentityByCRN
"""
@@ -66907,7 +70521,8 @@ def test_vpc_identity_by_crn_serialization(self):
vpc_identity_by_crn_model_json2 = vpc_identity_by_crn_model.to_dict()
assert vpc_identity_by_crn_model_json2 == vpc_identity_by_crn_model_json
-class TestModel_VPCIdentityByHref():
+
+class TestModel_VPCIdentityByHref:
"""
Test Class for VPCIdentityByHref
"""
@@ -66936,7 +70551,8 @@ def test_vpc_identity_by_href_serialization(self):
vpc_identity_by_href_model_json2 = vpc_identity_by_href_model.to_dict()
assert vpc_identity_by_href_model_json2 == vpc_identity_by_href_model_json
-class TestModel_VPCIdentityById():
+
+class TestModel_VPCIdentityById:
"""
Test Class for VPCIdentityById
"""
@@ -66965,7 +70581,8 @@ def test_vpc_identity_by_id_serialization(self):
vpc_identity_by_id_model_json2 = vpc_identity_by_id_model.to_dict()
assert vpc_identity_by_id_model_json2 == vpc_identity_by_id_model_json
-class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref():
+
+class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref:
"""
Test Class for VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityByHref
"""
@@ -66994,7 +70611,8 @@ def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_href_ser
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():
+
+class TestModel_VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById:
"""
Test Class for VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById
"""
@@ -67023,7 +70641,8 @@ def test_vpn_gateway_connection_ike_policy_patch_ike_policy_identity_by_id_seria
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():
+
+class TestModel_VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref:
"""
Test Class for VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityByHref
"""
@@ -67052,7 +70671,8 @@ def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_href
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():
+
+class TestModel_VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById:
"""
Test Class for VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById
"""
@@ -67081,7 +70701,8 @@ def test_vpn_gateway_connection_ike_policy_prototype_ike_policy_identity_by_id_s
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():
+
+class TestModel_VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref:
"""
Test Class for VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref
"""
@@ -67110,7 +70731,8 @@ def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_hr
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():
+
+class TestModel_VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById:
"""
Test Class for VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityById
"""
@@ -67139,7 +70761,8 @@ def test_vpn_gateway_connection_i_psec_policy_patch_i_psec_policy_identity_by_id
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():
+
+class TestModel_VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref:
"""
Test Class for VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref
"""
@@ -67168,7 +70791,8 @@ def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_b
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():
+
+class TestModel_VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById:
"""
Test Class for VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById
"""
@@ -67197,7 +70821,8 @@ def test_vpn_gateway_connection_i_psec_policy_prototype_i_psec_policy_identity_b
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_VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch():
+
+class TestModel_VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch:
"""
Test Class for VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch
"""
@@ -67209,15 +70834,15 @@ def test_vpn_gateway_connection_patch_vpn_gateway_connection_static_route_mode_p
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_dpd_patch_model = {} # VPNGatewayConnectionDPDPatch
+ vpn_gateway_connection_dpd_patch_model = {} # VPNGatewayConnectionDPDPatch
vpn_gateway_connection_dpd_patch_model['action'] = 'restart'
vpn_gateway_connection_dpd_patch_model['interval'] = 30
vpn_gateway_connection_dpd_patch_model['timeout'] = 120
- vpn_gateway_connection_ike_policy_patch_model = {} # VPNGatewayConnectionIKEPolicyPatchIKEPolicyIdentityById
+ vpn_gateway_connection_ike_policy_patch_model = {} # 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'
# Construct a json representation of a VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch model
@@ -67246,7 +70871,8 @@ def test_vpn_gateway_connection_patch_vpn_gateway_connection_static_route_mode_p
vpn_gateway_connection_patch_vpn_gateway_connection_static_route_mode_patch_model_json2 = vpn_gateway_connection_patch_vpn_gateway_connection_static_route_mode_patch_model.to_dict()
assert vpn_gateway_connection_patch_vpn_gateway_connection_static_route_mode_patch_model_json2 == vpn_gateway_connection_patch_vpn_gateway_connection_static_route_mode_patch_model_json
-class TestModel_VPNGatewayConnectionPolicyMode():
+
+class TestModel_VPNGatewayConnectionPolicyMode:
"""
Test Class for VPNGatewayConnectionPolicyMode
"""
@@ -67258,25 +70884,25 @@ def test_vpn_gateway_connection_policy_mode_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD
+ vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD
vpn_gateway_connection_dpd_model['action'] = 'restart'
vpn_gateway_connection_dpd_model['interval'] = 30
vpn_gateway_connection_dpd_model['timeout'] = 120
- ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
+ ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- ike_policy_reference_model = {} # IKEPolicyReference
+ ike_policy_reference_model = {} # IKEPolicyReference
ike_policy_reference_model['deleted'] = ike_policy_reference_deleted_model
ike_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b'
ike_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b'
ike_policy_reference_model['name'] = 'my-ike-policy'
ike_policy_reference_model['resource_type'] = 'ike_policy'
- i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
+ i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- i_psec_policy_reference_model = {} # IPsecPolicyReference
+ i_psec_policy_reference_model = {} # IPsecPolicyReference
i_psec_policy_reference_model['deleted'] = i_psec_policy_reference_deleted_model
i_psec_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b'
i_psec_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b'
@@ -67317,7 +70943,8 @@ def test_vpn_gateway_connection_policy_mode_serialization(self):
vpn_gateway_connection_policy_mode_model_json2 = vpn_gateway_connection_policy_mode_model.to_dict()
assert vpn_gateway_connection_policy_mode_model_json2 == vpn_gateway_connection_policy_mode_model_json
-class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype():
+
+class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype:
"""
Test Class for VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype
"""
@@ -67329,15 +70956,15 @@ def test_vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_pro
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_dpd_prototype_model = {} # VPNGatewayConnectionDPDPrototype
+ vpn_gateway_connection_dpd_prototype_model = {} # VPNGatewayConnectionDPDPrototype
vpn_gateway_connection_dpd_prototype_model['action'] = 'restart'
vpn_gateway_connection_dpd_prototype_model['interval'] = 30
vpn_gateway_connection_dpd_prototype_model['timeout'] = 120
- vpn_gateway_connection_ike_policy_prototype_model = {} # VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById
+ vpn_gateway_connection_ike_policy_prototype_model = {} # 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'
# Construct a json representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype model
@@ -67367,7 +70994,8 @@ def test_vpn_gateway_connection_prototype_vpn_gateway_connection_policy_mode_pro
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():
+
+class TestModel_VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype:
"""
Test Class for VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype
"""
@@ -67379,15 +71007,15 @@ def test_vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mo
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_dpd_prototype_model = {} # VPNGatewayConnectionDPDPrototype
+ vpn_gateway_connection_dpd_prototype_model = {} # VPNGatewayConnectionDPDPrototype
vpn_gateway_connection_dpd_prototype_model['action'] = 'restart'
vpn_gateway_connection_dpd_prototype_model['interval'] = 30
vpn_gateway_connection_dpd_prototype_model['timeout'] = 120
- vpn_gateway_connection_ike_policy_prototype_model = {} # VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById
+ vpn_gateway_connection_ike_policy_prototype_model = {} # 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'
# Construct a json representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model
@@ -67416,7 +71044,8 @@ def test_vpn_gateway_connection_prototype_vpn_gateway_connection_static_route_mo
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_VPNGatewayConnectionStaticRouteMode():
+
+class TestModel_VPNGatewayConnectionStaticRouteMode:
"""
Test Class for VPNGatewayConnectionStaticRouteMode
"""
@@ -67428,35 +71057,35 @@ def test_vpn_gateway_connection_static_route_mode_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD
+ vpn_gateway_connection_dpd_model = {} # VPNGatewayConnectionDPD
vpn_gateway_connection_dpd_model['action'] = 'restart'
vpn_gateway_connection_dpd_model['interval'] = 30
vpn_gateway_connection_dpd_model['timeout'] = 120
- ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
+ ike_policy_reference_deleted_model = {} # IKEPolicyReferenceDeleted
ike_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- ike_policy_reference_model = {} # IKEPolicyReference
+ ike_policy_reference_model = {} # IKEPolicyReference
ike_policy_reference_model['deleted'] = ike_policy_reference_deleted_model
ike_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b'
ike_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b'
ike_policy_reference_model['name'] = 'my-ike-policy'
ike_policy_reference_model['resource_type'] = 'ike_policy'
- i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
+ i_psec_policy_reference_deleted_model = {} # IPsecPolicyReferenceDeleted
i_psec_policy_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- i_psec_policy_reference_model = {} # IPsecPolicyReference
+ i_psec_policy_reference_model = {} # IPsecPolicyReference
i_psec_policy_reference_model['deleted'] = i_psec_policy_reference_deleted_model
i_psec_policy_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b'
i_psec_policy_reference_model['id'] = 'ddf51bec-3424-11e8-b467-0ed5f89f718b'
i_psec_policy_reference_model['name'] = 'my-ipsec-policy'
i_psec_policy_reference_model['resource_type'] = 'ipsec_policy'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- vpn_gateway_connection_static_route_mode_tunnel_model = {} # VPNGatewayConnectionStaticRouteModeTunnel
+ 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'
@@ -67494,7 +71123,8 @@ def test_vpn_gateway_connection_static_route_mode_serialization(self):
vpn_gateway_connection_static_route_mode_model_json2 = vpn_gateway_connection_static_route_mode_model.to_dict()
assert vpn_gateway_connection_static_route_mode_model_json2 == vpn_gateway_connection_static_route_mode_model_json
-class TestModel_VPNGatewayPolicyMode():
+
+class TestModel_VPNGatewayPolicyMode:
"""
Test Class for VPNGatewayPolicyMode
"""
@@ -67506,34 +71136,34 @@ def test_vpn_gateway_policy_mode_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- vpn_gateway_member_model = {} # VPNGatewayMember
+ vpn_gateway_member_model = {} # VPNGatewayMember
vpn_gateway_member_model['private_ip'] = ip_model
vpn_gateway_member_model['public_ip'] = ip_model
vpn_gateway_member_model['role'] = 'active'
vpn_gateway_member_model['status'] = 'available'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -67541,10 +71171,10 @@ def test_vpn_gateway_policy_mode_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -67583,7 +71213,8 @@ def test_vpn_gateway_policy_mode_serialization(self):
vpn_gateway_policy_mode_model_json2 = vpn_gateway_policy_mode_model.to_dict()
assert vpn_gateway_policy_mode_model_json2 == vpn_gateway_policy_mode_model_json
-class TestModel_VPNGatewayPrototypeVPNGatewayPolicyModePrototype():
+
+class TestModel_VPNGatewayPrototypeVPNGatewayPolicyModePrototype:
"""
Test Class for VPNGatewayPrototypeVPNGatewayPolicyModePrototype
"""
@@ -67595,10 +71226,10 @@ def test_vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_serialization(s
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a VPNGatewayPrototypeVPNGatewayPolicyModePrototype model
@@ -67623,7 +71254,8 @@ def test_vpn_gateway_prototype_vpn_gateway_policy_mode_prototype_serialization(s
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():
+
+class TestModel_VPNGatewayPrototypeVPNGatewayRouteModePrototype:
"""
Test Class for VPNGatewayPrototypeVPNGatewayRouteModePrototype
"""
@@ -67635,10 +71267,10 @@ def test_vpn_gateway_prototype_vpn_gateway_route_mode_prototype_serialization(se
# Construct dict forms of any model objects needed in order to build this model.
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- subnet_identity_model = {} # SubnetIdentityById
+ subnet_identity_model = {} # SubnetIdentityById
subnet_identity_model['id'] = '7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
# Construct a json representation of a VPNGatewayPrototypeVPNGatewayRouteModePrototype model
@@ -67663,7 +71295,8 @@ def test_vpn_gateway_prototype_vpn_gateway_route_mode_prototype_serialization(se
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():
+
+class TestModel_VPNGatewayRouteMode:
"""
Test Class for VPNGatewayRouteMode
"""
@@ -67675,34 +71308,34 @@ def test_vpn_gateway_route_mode_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
+ vpn_gateway_connection_reference_deleted_model = {} # VPNGatewayConnectionReferenceDeleted
vpn_gateway_connection_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
+ vpn_gateway_connection_reference_model = {} # VPNGatewayConnectionReference
vpn_gateway_connection_reference_model['deleted'] = vpn_gateway_connection_reference_deleted_model
vpn_gateway_connection_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b'
vpn_gateway_connection_reference_model['id'] = 'a10a5771-dc23-442c-8460-c3601d8542f7'
vpn_gateway_connection_reference_model['name'] = 'my-vpn-connection'
vpn_gateway_connection_reference_model['resource_type'] = 'vpn_gateway_connection'
- ip_model = {} # IP
+ ip_model = {} # IP
ip_model['address'] = '192.168.3.4'
- vpn_gateway_member_model = {} # VPNGatewayMember
+ vpn_gateway_member_model = {} # VPNGatewayMember
vpn_gateway_member_model['private_ip'] = ip_model
vpn_gateway_member_model['public_ip'] = ip_model
vpn_gateway_member_model['role'] = 'active'
vpn_gateway_member_model['status'] = 'available'
- resource_group_reference_model = {} # ResourceGroupReference
+ 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'
- subnet_reference_deleted_model = {} # SubnetReferenceDeleted
+ subnet_reference_deleted_model = {} # SubnetReferenceDeleted
subnet_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- subnet_reference_model = {} # SubnetReference
+ subnet_reference_model = {} # SubnetReference
subnet_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
subnet_reference_model['deleted'] = subnet_reference_deleted_model
subnet_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e'
@@ -67710,10 +71343,10 @@ def test_vpn_gateway_route_mode_serialization(self):
subnet_reference_model['name'] = 'my-subnet'
subnet_reference_model['resource_type'] = 'subnet'
- vpc_reference_deleted_model = {} # VPCReferenceDeleted
+ vpc_reference_deleted_model = {} # VPCReferenceDeleted
vpc_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- vpc_reference_model = {} # VPCReference
+ vpc_reference_model = {} # VPCReference
vpc_reference_model['crn'] = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'
vpc_reference_model['deleted'] = vpc_reference_deleted_model
vpc_reference_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b'
@@ -67752,7 +71385,8 @@ def test_vpn_gateway_route_mode_serialization(self):
vpn_gateway_route_mode_model_json2 = vpn_gateway_route_mode_model.to_dict()
assert vpn_gateway_route_mode_model_json2 == vpn_gateway_route_mode_model_json
-class TestModel_VPNServerAuthenticationByCertificate():
+
+class TestModel_VPNServerAuthenticationByCertificate:
"""
Test Class for VPNServerAuthenticationByCertificate
"""
@@ -67764,7 +71398,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 = {} # CertificateInstanceReference
certificate_instance_reference_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5'
# Construct a json representation of a VPNServerAuthenticationByCertificate model
@@ -67788,7 +71422,8 @@ def test_vpn_server_authentication_by_certificate_serialization(self):
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
-class TestModel_VPNServerAuthenticationByUsername():
+
+class TestModel_VPNServerAuthenticationByUsername:
"""
Test Class for VPNServerAuthenticationByUsername
"""
@@ -67800,7 +71435,7 @@ def test_vpn_server_authentication_by_username_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM
+ vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM
vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam'
# Construct a json representation of a VPNServerAuthenticationByUsername model
@@ -67823,7 +71458,8 @@ def test_vpn_server_authentication_by_username_serialization(self):
vpn_server_authentication_by_username_model_json2 = vpn_server_authentication_by_username_model.to_dict()
assert vpn_server_authentication_by_username_model_json2 == vpn_server_authentication_by_username_model_json
-class TestModel_VPNServerAuthenticationByUsernameIdProviderByIAM():
+
+class TestModel_VPNServerAuthenticationByUsernameIdProviderByIAM:
"""
Test Class for VPNServerAuthenticationByUsernameIdProviderByIAM
"""
@@ -67852,7 +71488,8 @@ def test_vpn_server_authentication_by_username_id_provider_by_iam_serialization(
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():
+
+class TestModel_VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype:
"""
Test Class for VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype
"""
@@ -67864,7 +71501,7 @@ 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 = {} # CertificateInstanceIdentityByCRN
certificate_instance_identity_model['crn'] = 'crn:v1:bluemix:public:secrets-manager:us-south:a/123456:36fa422d-080d-4d83-8d2d-86851b4001df:secret:2e786aab-42fa-63ed-14f8-d66d552f4dd5'
# Construct a json representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype model
@@ -67888,7 +71525,8 @@ def test_vpn_server_authentication_prototype_vpn_server_authentication_by_certif
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():
+
+class TestModel_VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype:
"""
Test Class for VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype
"""
@@ -67900,7 +71538,7 @@ def test_vpn_server_authentication_prototype_vpn_server_authentication_by_userna
# Construct dict forms of any model objects needed in order to build this model.
- vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM
+ vpn_server_authentication_by_username_id_provider_model = {} # VPNServerAuthenticationByUsernameIdProviderByIAM
vpn_server_authentication_by_username_id_provider_model['provider_type'] = 'iam'
# Construct a json representation of a VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype model
@@ -67923,7 +71561,8 @@ def test_vpn_server_authentication_prototype_vpn_server_authentication_by_userna
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_VolumeIdentityByCRN():
+
+class TestModel_VolumeIdentityByCRN:
"""
Test Class for VolumeIdentityByCRN
"""
@@ -67952,7 +71591,8 @@ def test_volume_identity_by_crn_serialization(self):
volume_identity_by_crn_model_json2 = volume_identity_by_crn_model.to_dict()
assert volume_identity_by_crn_model_json2 == volume_identity_by_crn_model_json
-class TestModel_VolumeIdentityByHref():
+
+class TestModel_VolumeIdentityByHref:
"""
Test Class for VolumeIdentityByHref
"""
@@ -67981,7 +71621,8 @@ def test_volume_identity_by_href_serialization(self):
volume_identity_by_href_model_json2 = volume_identity_by_href_model.to_dict()
assert volume_identity_by_href_model_json2 == volume_identity_by_href_model_json
-class TestModel_VolumeIdentityById():
+
+class TestModel_VolumeIdentityById:
"""
Test Class for VolumeIdentityById
"""
@@ -68010,7 +71651,8 @@ def test_volume_identity_by_id_serialization(self):
volume_identity_by_id_model_json2 = volume_identity_by_id_model.to_dict()
assert volume_identity_by_id_model_json2 == volume_identity_by_id_model_json
-class TestModel_VolumeProfileIdentityByHref():
+
+class TestModel_VolumeProfileIdentityByHref:
"""
Test Class for VolumeProfileIdentityByHref
"""
@@ -68039,7 +71681,8 @@ def test_volume_profile_identity_by_href_serialization(self):
volume_profile_identity_by_href_model_json2 = volume_profile_identity_by_href_model.to_dict()
assert volume_profile_identity_by_href_model_json2 == volume_profile_identity_by_href_model_json
-class TestModel_VolumeProfileIdentityByName():
+
+class TestModel_VolumeProfileIdentityByName:
"""
Test Class for VolumeProfileIdentityByName
"""
@@ -68068,7 +71711,8 @@ def test_volume_profile_identity_by_name_serialization(self):
volume_profile_identity_by_name_model_json2 = volume_profile_identity_by_name_model.to_dict()
assert volume_profile_identity_by_name_model_json2 == volume_profile_identity_by_name_model_json
-class TestModel_VolumePrototypeVolumeByCapacity():
+
+class TestModel_VolumePrototypeVolumeByCapacity:
"""
Test Class for VolumePrototypeVolumeByCapacity
"""
@@ -68080,16 +71724,16 @@ def test_volume_prototype_volume_by_capacity_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
# Construct a json representation of a VolumePrototypeVolumeByCapacity model
@@ -68118,7 +71762,8 @@ def test_volume_prototype_volume_by_capacity_serialization(self):
volume_prototype_volume_by_capacity_model_json2 = volume_prototype_volume_by_capacity_model.to_dict()
assert volume_prototype_volume_by_capacity_model_json2 == volume_prototype_volume_by_capacity_model_json
-class TestModel_VolumePrototypeVolumeBySourceSnapshot():
+
+class TestModel_VolumePrototypeVolumeBySourceSnapshot:
"""
Test Class for VolumePrototypeVolumeBySourceSnapshot
"""
@@ -68130,19 +71775,19 @@ def test_volume_prototype_volume_by_source_snapshot_serialization(self):
# Construct dict forms of any model objects needed in order to build this model.
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- resource_group_identity_model = {} # ResourceGroupIdentityById
+ resource_group_identity_model = {} # ResourceGroupIdentityById
resource_group_identity_model['id'] = 'fee82deba12e4c0fb69c3b09d1f12345'
- zone_identity_model = {} # ZoneIdentityByName
+ zone_identity_model = {} # ZoneIdentityByName
zone_identity_model['name'] = 'us-south-1'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
# Construct a json representation of a VolumePrototypeVolumeBySourceSnapshot model
@@ -68172,7 +71817,8 @@ def test_volume_prototype_volume_by_source_snapshot_serialization(self):
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():
+
+class TestModel_ZoneIdentityByHref:
"""
Test Class for ZoneIdentityByHref
"""
@@ -68201,7 +71847,8 @@ def test_zone_identity_by_href_serialization(self):
zone_identity_by_href_model_json2 = zone_identity_by_href_model.to_dict()
assert zone_identity_by_href_model_json2 == zone_identity_by_href_model_json
-class TestModel_ZoneIdentityByName():
+
+class TestModel_ZoneIdentityByName:
"""
Test Class for ZoneIdentityByName
"""
@@ -68230,7 +71877,8 @@ def test_zone_identity_by_name_serialization(self):
zone_identity_by_name_model_json2 = zone_identity_by_name_model.to_dict()
assert zone_identity_by_name_model_json2 == zone_identity_by_name_model_json
-class TestModel_EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref():
+
+class TestModel_EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref:
"""
Test Class for EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref
"""
@@ -68259,7 +71907,8 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_
endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_href_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_href_model.to_dict()
assert endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_href_model_json2 == endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_href_model_json
-class TestModel_EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById():
+
+class TestModel_EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById:
"""
Test Class for EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityById
"""
@@ -68288,7 +71937,8 @@ def test_endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_
endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_id_model_json2 = endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_id_model.to_dict()
assert endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_id_model_json2 == endpoint_gateway_reserved_ip_reserved_ip_identity_reserved_ip_identity_by_id_model_json
-class TestModel_EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN():
+
+class TestModel_EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN:
"""
Test Class for EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN
"""
@@ -68318,7 +71968,8 @@ def test_endpoint_gateway_target_prototype_provider_cloud_service_identity_provi
endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json2 = endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model.to_dict()
assert endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json2 == endpoint_gateway_target_prototype_provider_cloud_service_identity_provider_cloud_service_identity_by_crn_model_json
-class TestModel_EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName():
+
+class TestModel_EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName:
"""
Test Class for EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName
"""
@@ -68348,7 +71999,128 @@ def test_endpoint_gateway_target_prototype_provider_infrastructure_service_ident
endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json2 = endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model.to_dict()
assert endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json2 == endpoint_gateway_target_prototype_provider_infrastructure_service_identity_provider_infrastructure_service_identity_by_name_model_json
-class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN():
+
+class TestModel_FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref:
+ """
+ Test Class for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
+ """
+
+ def test_floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_serialization(self):
+ """
+ Test serialization/deserialization for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
+ """
+
+ # Construct a json representation of a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json = {}
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
+
+ # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model == floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_target_patch_network_interface_identity_network_interface_identity_by_href_model.to_dict()
+ 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:
+ """
+ Test Class for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById
+ """
+
+ def test_floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_serialization(self):
+ """
+ Test serialization/deserialization for FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById
+ """
+
+ # Construct a json representation of a FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById model
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json = {}
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
+
+ # Construct a model instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model = FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model == floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_target_patch_network_interface_identity_network_interface_identity_by_id_model.to_dict()
+ 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_FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref:
+ """
+ Test Class for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
+ """
+
+ def test_floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_serialization(self):
+ """
+ Test serialization/deserialization for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
+ """
+
+ # Construct a json representation of a FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model
+ floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json = {}
+ floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
+
+ # Construct a model instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation
+ floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model == floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json2 = floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_href_model.to_dict()
+ 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:
+ """
+ Test Class for FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById
+ """
+
+ 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'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
+
+ # Construct a model instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation
+ floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model = FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model == floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model_json2 = floating_ip_target_prototype_network_interface_identity_network_interface_identity_by_id_model.to_dict()
+ 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_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN:
"""
Test Class for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN
"""
@@ -68377,7 +72149,8 @@ def test_flow_log_collector_target_prototype_instance_identity_instance_identity
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref:
"""
Test Class for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref
"""
@@ -68406,7 +72179,8 @@ def test_flow_log_collector_target_prototype_instance_identity_instance_identity
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById:
"""
Test Class for FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityById
"""
@@ -68435,65 +72209,68 @@ def test_flow_log_collector_target_prototype_instance_identity_instance_identity
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_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref():
+
+class TestModel_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref:
"""
- Test Class for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
+ Test Class for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
"""
- def test_flow_log_collector_target_prototype_network_interface_identity_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 FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
+ Test serialization/deserialization for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
"""
- # Construct a json representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_json = {}
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
+ # Construct a json representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref model
+ flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json = {}
+ flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_by_href_model_json['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e'
- # Construct a model instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_json)
- assert flow_log_collector_target_prototype_network_interface_identity_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 = 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 FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref by calling from_dict on the json representation
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_dict = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_json).__dict__
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model2 = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(**flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_dict)
+ # 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)
# Verify the model instances are equivalent
- assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model == flow_log_collector_target_prototype_network_interface_identity_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_network_interface_identity_by_href_model_json2 = flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model.to_dict()
- assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_href_model_json2 == flow_log_collector_target_prototype_network_interface_identity_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_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById():
+class TestModel_FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById:
"""
- Test Class for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById
+ Test Class for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById
"""
- def test_flow_log_collector_target_prototype_network_interface_identity_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 FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById
+ Test serialization/deserialization for FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityById
"""
- # Construct a json representation of a FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById model
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_json = {}
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_json['id'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
+ # 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'] = '10c02d81-0ecb-4dc5-897d-28392913b81e'
- # Construct a model instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_json)
- assert flow_log_collector_target_prototype_network_interface_identity_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 = 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 FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById by calling from_dict on the json representation
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_dict = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById.from_dict(flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_json).__dict__
- flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model2 = FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityById(**flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_dict)
+ # 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)
# Verify the model instances are equivalent
- assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model == flow_log_collector_target_prototype_network_interface_identity_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_network_interface_identity_by_id_model_json2 = flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model.to_dict()
- assert flow_log_collector_target_prototype_network_interface_identity_network_interface_identity_network_interface_identity_by_id_model_json2 == flow_log_collector_target_prototype_network_interface_identity_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():
+
+class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN:
"""
Test Class for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN
"""
@@ -68522,7 +72299,8 @@ def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref:
"""
Test Class for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref
"""
@@ -68551,7 +72329,8 @@ def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById:
"""
Test Class for FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityById
"""
@@ -68580,7 +72359,8 @@ def test_flow_log_collector_target_prototype_subnet_identity_subnet_identity_by_
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN:
"""
Test Class for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN
"""
@@ -68609,7 +72389,8 @@ def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_crn_se
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref:
"""
Test Class for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref
"""
@@ -68638,7 +72419,8 @@ def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_href_s
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():
+
+class TestModel_FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById:
"""
Test Class for FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityById
"""
@@ -68667,7 +72449,8 @@ def test_flow_log_collector_target_prototype_vpc_identity_vpc_identity_by_id_ser
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_InstanceGroupManagerActionScheduledActionGroupTarget():
+
+class TestModel_InstanceGroupManagerActionScheduledActionGroupTarget:
"""
Test Class for InstanceGroupManagerActionScheduledActionGroupTarget
"""
@@ -68679,7 +72462,7 @@ def test_instance_group_manager_action_scheduled_action_group_target_serializati
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_scheduled_action_group_model = {} # InstanceGroupManagerScheduledActionGroup
+ instance_group_manager_scheduled_action_group_model = {} # InstanceGroupManagerScheduledActionGroup
instance_group_manager_scheduled_action_group_model['membership_count'] = 10
# Construct a json representation of a InstanceGroupManagerActionScheduledActionGroupTarget model
@@ -68714,7 +72497,8 @@ def test_instance_group_manager_action_scheduled_action_group_target_serializati
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():
+
+class TestModel_InstanceGroupManagerActionScheduledActionManagerTarget:
"""
Test Class for InstanceGroupManagerActionScheduledActionManagerTarget
"""
@@ -68726,10 +72510,10 @@ def test_instance_group_manager_action_scheduled_action_manager_target_serializa
# Construct dict forms of any model objects needed in order to build this model.
- instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
+ instance_group_manager_reference_deleted_model = {} # InstanceGroupManagerReferenceDeleted
instance_group_manager_reference_deleted_model['more_info'] = 'https://cloud.ibm.com/apidocs/vpc#deleted-resources'
- instance_group_manager_scheduled_action_manager_model = {} # InstanceGroupManagerScheduledActionManagerAutoScale
+ instance_group_manager_scheduled_action_manager_model = {} # InstanceGroupManagerScheduledActionManagerAutoScale
instance_group_manager_scheduled_action_manager_model['deleted'] = instance_group_manager_reference_deleted_model
instance_group_manager_scheduled_action_manager_model['href'] = 'https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727'
instance_group_manager_scheduled_action_manager_model['id'] = '1e09281b-f177-46fb-baf1-bc152b2e391a'
@@ -68769,7 +72553,8 @@ def test_instance_group_manager_action_scheduled_action_manager_target_serializa
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():
+
+class TestModel_InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref:
"""
Test Class for InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref
"""
@@ -68800,7 +72585,8 @@ def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_pr
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():
+
+class TestModel_InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById:
"""
Test Class for InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeById
"""
@@ -68831,7 +72617,8 @@ def test_instance_group_manager_scheduled_action_manager_prototype_auto_scale_pr
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_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN():
+
+class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN:
"""
Test Class for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN
"""
@@ -68860,7 +72647,8 @@ def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated
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():
+
+class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref:
"""
Test Class for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref
"""
@@ -68889,7 +72677,8 @@ def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated
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():
+
+class TestModel_InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById:
"""
Test Class for InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityById
"""
@@ -68918,7 +72707,8 @@ def test_instance_placement_target_patch_dedicated_host_group_identity_dedicated
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():
+
+class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN:
"""
Test Class for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN
"""
@@ -68947,7 +72737,8 @@ def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_
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():
+
+class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref:
"""
Test Class for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref
"""
@@ -68976,7 +72767,8 @@ def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_
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():
+
+class TestModel_InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById:
"""
Test Class for InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityById
"""
@@ -69005,7 +72797,8 @@ def test_instance_placement_target_patch_dedicated_host_identity_dedicated_host_
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():
+
+class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN:
"""
Test Class for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN
"""
@@ -69034,7 +72827,8 @@ def test_instance_placement_target_prototype_dedicated_host_group_identity_dedic
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():
+
+class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref:
"""
Test Class for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref
"""
@@ -69063,7 +72857,8 @@ def test_instance_placement_target_prototype_dedicated_host_group_identity_dedic
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():
+
+class TestModel_InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById:
"""
Test Class for InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityById
"""
@@ -69092,7 +72887,8 @@ def test_instance_placement_target_prototype_dedicated_host_group_identity_dedic
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():
+
+class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN:
"""
Test Class for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN
"""
@@ -69121,7 +72917,8 @@ def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_h
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():
+
+class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref:
"""
Test Class for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref
"""
@@ -69150,7 +72947,8 @@ def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_h
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():
+
+class TestModel_InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById:
"""
Test Class for InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityById
"""
@@ -69179,7 +72977,8 @@ def test_instance_placement_target_prototype_dedicated_host_identity_dedicated_h
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():
+
+class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN:
"""
Test Class for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN
"""
@@ -69208,7 +73007,8 @@ def test_instance_placement_target_prototype_placement_group_identity_placement_
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():
+
+class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref:
"""
Test Class for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref
"""
@@ -69237,7 +73037,8 @@ def test_instance_placement_target_prototype_placement_group_identity_placement_
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():
+
+class TestModel_InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById:
"""
Test Class for InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityById
"""
@@ -69266,7 +73067,8 @@ def test_instance_placement_target_prototype_placement_group_identity_placement_
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_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref():
+
+class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref:
"""
Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref
"""
@@ -69295,7 +73097,8 @@ def test_load_balancer_listener_policy_target_patch_load_balancer_pool_identity_
load_balancer_listener_policy_target_patch_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_by_href_model.to_dict()
assert load_balancer_listener_policy_target_patch_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_by_href_model_json
-class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById():
+
+class TestModel_LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById:
"""
Test Class for LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityById
"""
@@ -69324,7 +73127,8 @@ def test_load_balancer_listener_policy_target_patch_load_balancer_pool_identity_
load_balancer_listener_policy_target_patch_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_by_id_model.to_dict()
assert load_balancer_listener_policy_target_patch_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_by_id_model_json
-class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref():
+
+class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref:
"""
Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref
"""
@@ -69353,7 +73157,8 @@ def test_load_balancer_listener_policy_target_prototype_load_balancer_pool_ident
load_balancer_listener_policy_target_prototype_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_by_href_model.to_dict()
assert load_balancer_listener_policy_target_prototype_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_by_href_model_json
-class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById():
+
+class TestModel_LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById:
"""
Test Class for LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityById
"""
@@ -69382,7 +73187,8 @@ def test_load_balancer_listener_policy_target_prototype_load_balancer_pool_ident
load_balancer_listener_policy_target_prototype_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_by_id_model.to_dict()
assert load_balancer_listener_policy_target_prototype_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_by_id_model_json
-class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN():
+
+class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN:
"""
Test Class for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN
"""
@@ -69411,7 +73217,8 @@ def test_load_balancer_pool_member_target_prototype_instance_identity_instance_i
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():
+
+class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref:
"""
Test Class for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref
"""
@@ -69440,7 +73247,8 @@ def test_load_balancer_pool_member_target_prototype_instance_identity_instance_i
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():
+
+class TestModel_LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById:
"""
Test Class for LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityById
"""
@@ -69469,7 +73277,8 @@ def test_load_balancer_pool_member_target_prototype_instance_identity_instance_i
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_NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref():
+
+class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref:
"""
Test Class for NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref
"""
@@ -69498,7 +73307,8 @@ def test_network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identit
network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_href_model_json2 = network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_href_model.to_dict()
assert network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_href_model_json2 == network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_href_model_json
-class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById():
+
+class TestModel_NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById:
"""
Test Class for NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityById
"""
@@ -69527,7 +73337,8 @@ def test_network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identit
network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_id_model_json2 = network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_id_model.to_dict()
assert network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_id_model_json2 == network_interface_ip_prototype_reserved_ip_identity_reserved_ip_identity_by_id_model_json
-class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress():
+
+class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress:
"""
Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress
"""
@@ -69556,7 +73367,8 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i
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():
+
+class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN:
"""
Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN
"""
@@ -69585,7 +73397,8 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i
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():
+
+class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref:
"""
Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref
"""
@@ -69614,7 +73427,8 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i
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():
+
+class TestModel_PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById:
"""
Test Class for PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityById
"""
@@ -69643,7 +73457,8 @@ def test_public_gateway_floating_ip_prototype_floating_ip_identity_floating_ip_i
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():
+
+class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN:
"""
Test Class for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN
"""
@@ -69672,7 +73487,8 @@ def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway
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():
+
+class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref:
"""
Test Class for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref
"""
@@ -69701,7 +73517,8 @@ def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway
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():
+
+class TestModel_ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById:
"""
Test Class for ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityById
"""
@@ -69730,7 +73547,68 @@ def test_reserved_ip_target_prototype_endpoint_gateway_identity_endpoint_gateway
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_RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref():
+
+class TestModel_RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP:
+ """
+ Test Class for RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP
+ """
+
+ def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_serialization(self):
+ """
+ Test serialization/deserialization for RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP
+ """
+
+ # Construct a json representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP model
+ route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json = {}
+ route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json['address'] = '0.0.0.0'
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model == route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict()
+ 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:
+ """
+ Test Class for RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP
+ """
+
+ def test_route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_serialization(self):
+ """
+ Test serialization/deserialization for RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP
+ """
+
+ # Construct a json representation of a RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP model
+ route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json = {}
+ route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json['address'] = '192.168.3.4'
+
+ # 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)
+ 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)
+
+ # Verify the model instances are equivalent
+ assert route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model == route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_next_hop_patch_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict()
+ 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:
"""
Test Class for RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref
"""
@@ -69759,7 +73637,8 @@ def test_route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connec
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():
+
+class TestModel_RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById:
"""
Test Class for RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById
"""
@@ -69788,7 +73667,68 @@ def test_route_next_hop_patch_vpn_gateway_connection_identity_vpn_gateway_connec
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_RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref():
+
+class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP:
+ """
+ Test Class for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP
+ """
+
+ def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_serialization(self):
+ """
+ Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP
+ """
+
+ # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP model
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json = {}
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json['address'] = '0.0.0.0'
+
+ # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json)
+ assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model != False
+
+ # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP by calling from_dict on the json representation
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json).__dict__
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(**route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_dict)
+
+ # Verify the model instances are equivalent
+ assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model.to_dict()
+ assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json2 == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_sentinel_ip_model_json
+
+
+class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP:
+ """
+ Test Class for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP
+ """
+
+ def test_route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_serialization(self):
+ """
+ Test serialization/deserialization for RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP
+ """
+
+ # Construct a json representation of a RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP model
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json = {}
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json['address'] = '192.168.3.4'
+
+ # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json)
+ assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model != False
+
+ # Construct a model instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP by calling from_dict on the json representation
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP.from_dict(route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json).__dict__
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2 = RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(**route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_dict)
+
+ # Verify the model instances are equivalent
+ assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model2
+
+ # Convert model instance back to dict and verify no loss of data
+ route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 = route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model.to_dict()
+ assert route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json2 == route_prototype_next_hop_route_next_hop_prototype_route_next_hop_ip_route_next_hop_prototype_route_next_hop_ip_route_next_hop_ip_unicast_ip_model_json
+
+
+class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref:
"""
Test Class for RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref
"""
@@ -69817,7 +73757,8 @@ def test_route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connectio
route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 = route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model.to_dict()
assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json2 == route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_href_model_json
-class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById():
+
+class TestModel_RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById:
"""
Test Class for RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityById
"""
@@ -69846,7 +73787,8 @@ def test_route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connectio
route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 = route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model.to_dict()
assert route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json2 == route_prototype_next_hop_route_next_hop_prototype_vpn_gateway_connection_identity_route_next_hop_prototype_vpn_gateway_connection_identity_vpn_gateway_connection_identity_by_id_model_json
-class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN():
+
+class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN:
"""
Test Class for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN
"""
@@ -69875,7 +73817,8 @@ def test_security_group_rule_remote_patch_security_group_identity_security_group
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():
+
+class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref:
"""
Test Class for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref
"""
@@ -69904,7 +73847,8 @@ def test_security_group_rule_remote_patch_security_group_identity_security_group
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():
+
+class TestModel_SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById:
"""
Test Class for SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityById
"""
@@ -69933,7 +73877,8 @@ def test_security_group_rule_remote_patch_security_group_identity_security_group
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():
+
+class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN:
"""
Test Class for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN
"""
@@ -69962,7 +73907,8 @@ def test_security_group_rule_remote_prototype_security_group_identity_security_g
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():
+
+class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref:
"""
Test Class for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref
"""
@@ -69991,7 +73937,8 @@ def test_security_group_rule_remote_prototype_security_group_identity_security_g
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():
+
+class TestModel_SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById:
"""
Test Class for SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityById
"""
@@ -70020,7 +73967,8 @@ def test_security_group_rule_remote_prototype_security_group_identity_security_g
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_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN():
+
+class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN:
"""
Test Class for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN
"""
@@ -70049,7 +73997,8 @@ def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_c
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():
+
+class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref:
"""
Test Class for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref
"""
@@ -70078,7 +74027,8 @@ def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_h
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():
+
+class TestModel_VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById:
"""
Test Class for VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityById
"""
@@ -70107,7 +74057,8 @@ def test_volume_attachment_prototype_volume_volume_identity_volume_identity_by_i
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():
+
+class TestModel_VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity:
"""
Test Class for VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity
"""
@@ -70119,10 +74070,10 @@ def test_volume_attachment_prototype_volume_volume_prototype_instance_context_vo
# Construct dict forms of any model objects needed in order to build this model.
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
# Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity model
@@ -70149,7 +74100,8 @@ def test_volume_attachment_prototype_volume_volume_prototype_instance_context_vo
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():
+
+class TestModel_VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot:
"""
Test Class for VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot
"""
@@ -70161,13 +74113,13 @@ def test_volume_attachment_prototype_volume_volume_prototype_instance_context_vo
# Construct dict forms of any model objects needed in order to build this model.
- volume_profile_identity_model = {} # VolumeProfileIdentityByName
+ volume_profile_identity_model = {} # VolumeProfileIdentityByName
volume_profile_identity_model['name'] = 'general-purpose'
- encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
+ encryption_key_identity_model = {} # EncryptionKeyIdentityByCRN
encryption_key_identity_model['crn'] = 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
- snapshot_identity_model = {} # SnapshotIdentityById
+ snapshot_identity_model = {} # SnapshotIdentityById
snapshot_identity_model['id'] = '349a61d8-7ab1-420f-a690-5fed76ef9d4f'
# Construct a json representation of a VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot model
@@ -70195,7 +74147,8 @@ def test_volume_attachment_prototype_volume_volume_prototype_instance_context_vo
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():
+
+class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup:
"""
Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup
"""
@@ -70207,7 +74160,7 @@ def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_c
# 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
@@ -70231,7 +74184,8 @@ def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_c
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():
+
+class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager:
"""
Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager
"""
@@ -70243,7 +74197,7 @@ def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_c
# 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'
@@ -70269,7 +74223,8 @@ def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_c
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():
+
+class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup:
"""
Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup
"""
@@ -70281,7 +74236,7 @@ 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
@@ -70305,7 +74260,8 @@ def test_instance_group_manager_action_prototype_scheduled_action_prototype_by_r
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():
+
+class TestModel_InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager:
"""
Test Class for InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager
"""
@@ -70317,7 +74273,7 @@ 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_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'