From 837f1bf4221ad270f4c352983d281c146e98e7a6 Mon Sep 17 00:00:00 2001 From: Norbert Biczo Date: Thu, 22 Apr 2021 14:39:24 +0200 Subject: [PATCH 1/3] fix(IAM Identity): re-gen service after recent API changes --- ibm_platform_services/iam_identity_v1.py | 46 +++++++++++++++++------- test/unit/test_iam_identity_v1.py | 42 ++++++++++++---------- 2 files changed, 58 insertions(+), 30 deletions(-) diff --git a/ibm_platform_services/iam_identity_v1.py b/ibm_platform_services/iam_identity_v1.py index 7fe2e030..73afb00c 100644 --- a/ibm_platform_services/iam_identity_v1.py +++ b/ibm_platform_services/iam_identity_v1.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-e6cfc86e-20210308-084627 +# IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-77b4cbf2-20210422-122303 """ The IAM Identity Service API allows for the management of Account Settings and Identities @@ -40,7 +40,7 @@ class IamIdentityV1(BaseService): """The iam_identity V1 service.""" - DEFAULT_SERVICE_URL = 'https://iam.cloud.ibm.com' + DEFAULT_SERVICE_URL = 'https://iam.test.cloud.ibm.com' DEFAULT_SERVICE_NAME = 'iam_identity' @classmethod @@ -418,10 +418,9 @@ def delete_api_key(self, """ Deletes an API key. - Deletes an API key. Existing tokens will remain valid until expired. Refresh - tokens will not work any more for this API key. Users can manage user API keys - for themself, or service ID API keys for service IDs that are bound to an entity - they have access to. + Deletes an API key. Existing tokens will remain valid until expired. Users can + manage user API keys for themself, or service ID API keys for service IDs that + are bound to an entity they have access to. :param str id: Unique ID of the API key. :param dict headers: A `dict` containing the request headers @@ -995,6 +994,7 @@ def update_account_settings(self, mfa: str = None, session_expiration_in_seconds: str = None, session_invalidation_in_seconds: str = None, + max_sessions_per_identity: str = None, **kwargs ) -> DetailedResponse: """ @@ -1016,7 +1016,7 @@ def update_account_settings(self, * NOT_RESTRICTED - to remove access control * NOT_SET - to unset a previously set value. :param str restrict_create_platform_apikey: (optional) Defines whether or - not creating a Service Id is access controlled. Valid values: + not creating platform API keys is access controlled. Valid values: * RESTRICTED - to apply access control * NOT_RESTRICTED - to remove access control * NOT_SET - to 'unset' a previous set value. @@ -1039,6 +1039,10 @@ def update_account_settings(self, inactivity. Valid values: * Any whole number between '900' and '7200' * NOT_SET - To unset account setting and use service default. + :param str max_sessions_per_identity: (optional) Defines the max allowed + sessions per identity required by the account. Value values: + * Any whole number greater than 0 + * NOT_SET - To unset account setting and use service default. :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 `AccountSettingsResponse` object @@ -1062,7 +1066,8 @@ def update_account_settings(self, 'allowed_ip_addresses': allowed_ip_addresses, 'mfa': mfa, 'session_expiration_in_seconds': session_expiration_in_seconds, - 'session_invalidation_in_seconds': session_invalidation_in_seconds + 'session_invalidation_in_seconds': session_invalidation_in_seconds, + 'max_sessions_per_identity': max_sessions_per_identity } data = {k: v for (k, v) in data.items() if v is not None} data = json.dumps(data) @@ -1142,8 +1147,8 @@ class AccountSettingsResponse(): * RESTRICTED - to apply access control * NOT_RESTRICTED - to remove access control * NOT_SET - to 'unset' a previous set value. - :attr str restrict_create_platform_apikey: Defines whether or not creating a - Service Id is access controlled. Valid values: + :attr str restrict_create_platform_apikey: Defines whether or not creating + platform API keys is access controlled. Valid values: * RESTRICTED - to apply access control * NOT_RESTRICTED - to remove access control * NOT_SET - to 'unset' a previous set value. @@ -1167,6 +1172,10 @@ class AccountSettingsResponse(): in which a session will be invalidated due to inactivity. Valid values: * Any whole number between '900' and '7200' * NOT_SET - To unset account setting and use service default. + :attr str max_sessions_per_identity: Defines the max allowed sessions per + identity required by the account. Valid values: + * Any whole number greater than 0 + * NOT_SET - To unset account setting and use service default. """ def __init__(self, @@ -1178,6 +1187,7 @@ def __init__(self, mfa: str, session_expiration_in_seconds: str, session_invalidation_in_seconds: str, + max_sessions_per_identity: str, *, context: 'ResponseContext' = None, history: List['EnityHistoryRecord'] = None) -> None: @@ -1191,7 +1201,7 @@ def __init__(self, * NOT_RESTRICTED - to remove access control * NOT_SET - to 'unset' a previous set value. :param str restrict_create_platform_apikey: Defines whether or not creating - a Service Id is access controlled. Valid values: + platform API keys is access controlled. Valid values: * RESTRICTED - to apply access control * NOT_RESTRICTED - to remove access control * NOT_SET - to 'unset' a previous set value. @@ -1214,6 +1224,10 @@ def __init__(self, values: * Any whole number between '900' and '7200' * NOT_SET - To unset account setting and use service default. + :param str max_sessions_per_identity: Defines the max allowed sessions per + identity required by the account. Valid values: + * Any whole number greater than 0 + * NOT_SET - To unset account setting and use service default. :param ResponseContext context: (optional) Context with key properties for problem determination. :param List[EnityHistoryRecord] history: (optional) History of the Account @@ -1229,6 +1243,7 @@ def __init__(self, self.history = history self.session_expiration_in_seconds = session_expiration_in_seconds self.session_invalidation_in_seconds = session_invalidation_in_seconds + self.max_sessions_per_identity = max_sessions_per_identity @classmethod def from_dict(cls, _dict: Dict) -> 'AccountSettingsResponse': @@ -1270,6 +1285,10 @@ def from_dict(cls, _dict: Dict) -> 'AccountSettingsResponse': args['session_invalidation_in_seconds'] = _dict.get('session_invalidation_in_seconds') else: raise ValueError('Required property \'session_invalidation_in_seconds\' not present in AccountSettingsResponse JSON') + if 'max_sessions_per_identity' in _dict: + args['max_sessions_per_identity'] = _dict.get('max_sessions_per_identity') + else: + raise ValueError('Required property \'max_sessions_per_identity\' not present in AccountSettingsResponse JSON') return cls(**args) @classmethod @@ -1300,6 +1319,8 @@ def to_dict(self) -> Dict: _dict['session_expiration_in_seconds'] = self.session_expiration_in_seconds if hasattr(self, 'session_invalidation_in_seconds') and self.session_invalidation_in_seconds is not None: _dict['session_invalidation_in_seconds'] = self.session_invalidation_in_seconds + if hasattr(self, 'max_sessions_per_identity') and self.max_sessions_per_identity is not None: + _dict['max_sessions_per_identity'] = self.max_sessions_per_identity return _dict def _to_dict(self): @@ -1334,7 +1355,8 @@ class RestrictCreateServiceIdEnum(str, Enum): class RestrictCreatePlatformApikeyEnum(str, Enum): """ - Defines whether or not creating a Service Id is access controlled. Valid values: + Defines whether or not creating platform API keys is access controlled. Valid + values: * RESTRICTED - to apply access control * NOT_RESTRICTED - to remove access control * NOT_SET - to 'unset' a previous set value. diff --git a/test/unit/test_iam_identity_v1.py b/test/unit/test_iam_identity_v1.py index f904ba01..ffc6d431 100644 --- a/test/unit/test_iam_identity_v1.py +++ b/test/unit/test_iam_identity_v1.py @@ -19,6 +19,7 @@ from datetime import datetime, timezone from ibm_cloud_sdk_core.authenticators.no_auth_authenticator import NoAuthAuthenticator +from ibm_cloud_sdk_core.utils import datetime_to_string, string_to_datetime import inspect import json import pytest @@ -33,7 +34,7 @@ authenticator=NoAuthAuthenticator() ) -base_url = 'https://iam.cloud.ibm.com' +base_url = 'https://iam.test.cloud.ibm.com' service.set_service_url(base_url) ############################################################################## @@ -1385,7 +1386,7 @@ def test_get_account_settings_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v1/accounts/testString/settings/identity') - mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds"}' + mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds", "max_sessions_per_identity": "max_sessions_per_identity"}' responses.add(responses.GET, url, body=mock_response, @@ -1419,7 +1420,7 @@ def test_get_account_settings_required_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v1/accounts/testString/settings/identity') - mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds"}' + mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds", "max_sessions_per_identity": "max_sessions_per_identity"}' responses.add(responses.GET, url, body=mock_response, @@ -1447,7 +1448,7 @@ def test_get_account_settings_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v1/accounts/testString/settings/identity') - mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds"}' + mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds", "max_sessions_per_identity": "max_sessions_per_identity"}' responses.add(responses.GET, url, body=mock_response, @@ -1489,7 +1490,7 @@ def test_update_account_settings_all_params(self): """ # Set up mock url = self.preprocess_url(base_url + '/v1/accounts/testString/settings/identity') - mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds"}' + mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds", "max_sessions_per_identity": "max_sessions_per_identity"}' responses.add(responses.PUT, url, body=mock_response, @@ -1505,6 +1506,7 @@ def test_update_account_settings_all_params(self): mfa = 'NONE' session_expiration_in_seconds = 'testString' session_invalidation_in_seconds = 'testString' + max_sessions_per_identity = 'testString' # Invoke method response = service.update_account_settings( @@ -1516,6 +1518,7 @@ def test_update_account_settings_all_params(self): mfa=mfa, session_expiration_in_seconds=session_expiration_in_seconds, session_invalidation_in_seconds=session_invalidation_in_seconds, + max_sessions_per_identity=max_sessions_per_identity, headers={} ) @@ -1530,6 +1533,7 @@ def test_update_account_settings_all_params(self): assert req_body['mfa'] == 'NONE' assert req_body['session_expiration_in_seconds'] == 'testString' assert req_body['session_invalidation_in_seconds'] == 'testString' + assert req_body['max_sessions_per_identity'] == 'testString' @responses.activate @@ -1539,7 +1543,7 @@ def test_update_account_settings_value_error(self): """ # Set up mock url = self.preprocess_url(base_url + '/v1/accounts/testString/settings/identity') - mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds"}' + mock_response = '{"context": {"transaction_id": "transaction_id", "operation": "operation", "user_agent": "user_agent", "url": "url", "instance_id": "instance_id", "thread_id": "thread_id", "host": "host", "start_time": "start_time", "end_time": "end_time", "elapsed_time": "elapsed_time", "cluster_name": "cluster_name"}, "account_id": "account_id", "restrict_create_service_id": "RESTRICTED", "restrict_create_platform_apikey": "RESTRICTED", "allowed_ip_addresses": "allowed_ip_addresses", "entity_tag": "entity_tag", "mfa": "NONE", "history": [{"timestamp": "timestamp", "iam_id": "iam_id", "iam_id_account": "iam_id_account", "action": "action", "params": ["params"], "message": "message"}], "session_expiration_in_seconds": "session_expiration_in_seconds", "session_invalidation_in_seconds": "session_invalidation_in_seconds", "max_sessions_per_identity": "max_sessions_per_identity"}' responses.add(responses.PUT, url, body=mock_response, @@ -1555,6 +1559,7 @@ def test_update_account_settings_value_error(self): mfa = 'NONE' session_expiration_in_seconds = 'testString' session_invalidation_in_seconds = 'testString' + max_sessions_per_identity = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { @@ -1623,6 +1628,7 @@ def test_account_settings_response_serialization(self): account_settings_response_model_json['history'] = [enity_history_record_model] account_settings_response_model_json['session_expiration_in_seconds'] = 'testString' account_settings_response_model_json['session_invalidation_in_seconds'] = 'testString' + account_settings_response_model_json['max_sessions_per_identity'] = 'testString' # Construct a model instance of AccountSettingsResponse by calling from_dict on the json representation account_settings_response_model = AccountSettingsResponse.from_dict(account_settings_response_model_json) @@ -1679,9 +1685,9 @@ def test_api_key_serialization(self): api_key_model_json['entity_tag'] = 'testString' api_key_model_json['crn'] = 'testString' api_key_model_json['locked'] = True - api_key_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model_json['created_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model_json['created_by'] = 'testString' - api_key_model_json['modified_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model_json['modified_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model_json['name'] = 'testString' api_key_model_json['description'] = 'testString' api_key_model_json['iam_id'] = 'testString' @@ -1775,9 +1781,9 @@ def test_api_key_list_serialization(self): api_key_model['entity_tag'] = 'testString' api_key_model['crn'] = 'testString' api_key_model['locked'] = True - api_key_model['created_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model['created_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model['created_by'] = 'testString' - api_key_model['modified_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model['modified_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model['name'] = 'testString' api_key_model['description'] = 'testString' api_key_model['iam_id'] = 'testString' @@ -1922,9 +1928,9 @@ def test_service_id_serialization(self): api_key_model['entity_tag'] = 'testString' api_key_model['crn'] = 'testString' api_key_model['locked'] = True - api_key_model['created_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model['created_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model['created_by'] = 'testString' - api_key_model['modified_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model['modified_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model['name'] = 'testString' api_key_model['description'] = 'testString' api_key_model['iam_id'] = 'testString' @@ -1940,8 +1946,8 @@ def test_service_id_serialization(self): service_id_model_json['entity_tag'] = 'testString' service_id_model_json['crn'] = 'testString' service_id_model_json['locked'] = True - service_id_model_json['created_at'] = '2020-01-28T18:40:40.123456Z' - service_id_model_json['modified_at'] = '2020-01-28T18:40:40.123456Z' + service_id_model_json['created_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) + service_id_model_json['modified_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) service_id_model_json['account_id'] = 'testString' service_id_model_json['name'] = 'testString' service_id_model_json['description'] = 'testString' @@ -2003,9 +2009,9 @@ def test_service_id_list_serialization(self): api_key_model['entity_tag'] = 'testString' api_key_model['crn'] = 'testString' api_key_model['locked'] = True - api_key_model['created_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model['created_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model['created_by'] = 'testString' - api_key_model['modified_at'] = '2020-01-28T18:40:40.123456Z' + api_key_model['modified_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) api_key_model['name'] = 'testString' api_key_model['description'] = 'testString' api_key_model['iam_id'] = 'testString' @@ -2020,8 +2026,8 @@ def test_service_id_list_serialization(self): service_id_model['entity_tag'] = 'testString' service_id_model['crn'] = 'testString' service_id_model['locked'] = True - service_id_model['created_at'] = '2020-01-28T18:40:40.123456Z' - service_id_model['modified_at'] = '2020-01-28T18:40:40.123456Z' + service_id_model['created_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) + service_id_model['modified_at'] = datetime_to_string(string_to_datetime("2019-01-01T12:00:00.000Z")) service_id_model['account_id'] = 'testString' service_id_model['name'] = 'testString' service_id_model['description'] = 'testString' From 9c0774bd04e2502eb59ed0d98d74a7ae1aaba13d Mon Sep 17 00:00:00 2001 From: Norbert Biczo Date: Thu, 22 Apr 2021 14:39:39 +0200 Subject: [PATCH 2/3] chore: update an IAM integration test --- test/integration/test_iam_identity_v1.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/test_iam_identity_v1.py b/test/integration/test_iam_identity_v1.py index 0bb4c334..a3a2b562 100644 --- a/test/integration/test_iam_identity_v1.py +++ b/test/integration/test_iam_identity_v1.py @@ -508,7 +508,8 @@ def test_update_account_settings(self): # allowed_ip_addresses='testString', mfa='NONE', session_expiration_in_seconds="86400", - session_invalidation_in_seconds="7200" + session_invalidation_in_seconds="7200", + max_sessions_per_identity='10', ) assert update_account_settings_response.get_status_code() == 200 From e7e9a14d75fc92e62c78d7dbfaa97bf6753c52f4 Mon Sep 17 00:00:00 2001 From: Norbert Biczo Date: Mon, 26 Apr 2021 16:38:46 +0200 Subject: [PATCH 3/3] chore: re-gen from production branch --- ibm_platform_services/iam_identity_v1.py | 4 ++-- test/unit/test_iam_identity_v1.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ibm_platform_services/iam_identity_v1.py b/ibm_platform_services/iam_identity_v1.py index 73afb00c..867bb609 100644 --- a/ibm_platform_services/iam_identity_v1.py +++ b/ibm_platform_services/iam_identity_v1.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-77b4cbf2-20210422-122303 +# IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-46891d34-20210426-162952 """ The IAM Identity Service API allows for the management of Account Settings and Identities @@ -40,7 +40,7 @@ class IamIdentityV1(BaseService): """The iam_identity V1 service.""" - DEFAULT_SERVICE_URL = 'https://iam.test.cloud.ibm.com' + DEFAULT_SERVICE_URL = 'https://iam.cloud.ibm.com' DEFAULT_SERVICE_NAME = 'iam_identity' @classmethod diff --git a/test/unit/test_iam_identity_v1.py b/test/unit/test_iam_identity_v1.py index ffc6d431..1d85f782 100644 --- a/test/unit/test_iam_identity_v1.py +++ b/test/unit/test_iam_identity_v1.py @@ -34,7 +34,7 @@ authenticator=NoAuthAuthenticator() ) -base_url = 'https://iam.test.cloud.ibm.com' +base_url = 'https://iam.cloud.ibm.com' service.set_service_url(base_url) ##############################################################################