Skip to content

Commit 2295bb0

Browse files
authored
Merge pull request #71 from IBM/prerelease
2 parents 00dcdb1 + 40508c9 commit 2295bb0

7 files changed

Lines changed: 1199 additions & 331 deletions

File tree

examples/test_secrets_manager_v2_examples.py

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -275,25 +275,10 @@ def test_create_configuration_example(self):
275275
# begin-create_configuration
276276

277277
configuration_prototype_model = {
278-
'config_type': 'private_cert_configuration_root_ca',
279-
'name': 'example-root-CA',
280-
'max_ttl': '43830h',
281-
'crl_expiry': '72h',
282-
'crl_disable': False,
283-
'crl_distribution_points_encoded': True,
284-
'issuing_certificates_urls_encoded': True,
285-
'common_name': 'example.com',
286-
'alt_names': ['alt-name-1', 'alt-name-2'],
287-
'ip_sans': '127.0.0.1',
288-
'uri_sans': 'https://www.example.com/test',
289-
'other_sans': ['1.2.3.5.4.3.201.10.4.3;utf8:test@example.com'],
290-
'ttl': '2190h',
291-
'format': 'pem',
292-
'private_key_format': 'der',
293-
'key_type': 'rsa',
294-
'key_bits': 4096,
295-
'max_path_length': -1,
296-
'exclude_cn_from_sans': False,
278+
'config_type': 'public_cert_configuration_dns_cloud_internet_services',
279+
'name': 'example-cloud-internet-services-config',
280+
'cloud_internet_services_apikey': '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
281+
'cloud_internet_services_crn': 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
297282
}
298283

299284
response = secrets_manager_service.create_configuration(
@@ -766,6 +751,7 @@ def test_list_configurations_example(self):
766751
limit=10,
767752
sort='config_type',
768753
search='example',
754+
secret_types=['iam_credentials', 'public_cert', 'private_cert'],
769755
)
770756
while pager.has_next():
771757
next_page = pager.get_next()
@@ -790,7 +776,7 @@ def test_get_configuration_example(self):
790776

791777
response = secrets_manager_service.get_configuration(
792778
name=configuration_name_for_get_configuration_link,
793-
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
779+
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
794780
)
795781
configuration = response.get_result()
796782

@@ -812,13 +798,14 @@ def test_update_configuration_example(self):
812798
# begin-update_configuration
813799

814800
configuration_patch_model = {
815-
'api_key': 'RmnPBn6n1dzoo0v3kyznKEpg0WzdTpW9lW7FtKa017_u',
801+
'cloud_internet_services_apikey': '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
802+
'cloud_internet_services_crn': 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
816803
}
817804

818805
response = secrets_manager_service.update_configuration(
819806
name=configuration_name_for_get_configuration_link,
820807
configuration_patch=configuration_patch_model,
821-
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
808+
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
822809
)
823810
configuration = response.get_result()
824811

@@ -846,7 +833,7 @@ def test_create_configuration_action_example(self):
846833
response = secrets_manager_service.create_configuration_action(
847834
name=configuration_name_for_get_configuration_link,
848835
config_action_prototype=configuration_action_prototype_model,
849-
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
836+
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
850837
)
851838
configuration_action = response.get_result()
852839

@@ -1029,7 +1016,7 @@ def test_delete_configuration_example(self):
10291016

10301017
response = secrets_manager_service.delete_configuration(
10311018
name=configuration_name_for_get_configuration_link,
1032-
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
1019+
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
10331020
)
10341021

10351022
# end-delete_configuration

0 commit comments

Comments
 (0)