Skip to content

Commit

Permalink
Merge pull request #71 from IBM/prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
IdanAdar authored Aug 5, 2024
2 parents 00dcdb1 + 40508c9 commit 2295bb0
Show file tree
Hide file tree
Showing 7 changed files with 1,199 additions and 331 deletions.
35 changes: 11 additions & 24 deletions examples/test_secrets_manager_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,25 +275,10 @@ def test_create_configuration_example(self):
# begin-create_configuration

configuration_prototype_model = {
'config_type': 'private_cert_configuration_root_ca',
'name': 'example-root-CA',
'max_ttl': '43830h',
'crl_expiry': '72h',
'crl_disable': False,
'crl_distribution_points_encoded': True,
'issuing_certificates_urls_encoded': True,
'common_name': 'example.com',
'alt_names': ['alt-name-1', 'alt-name-2'],
'ip_sans': '127.0.0.1',
'uri_sans': 'https://www.example.com/test',
'other_sans': ['1.2.3.5.4.3.201.10.4.3;utf8:test@example.com'],
'ttl': '2190h',
'format': 'pem',
'private_key_format': 'der',
'key_type': 'rsa',
'key_bits': 4096,
'max_path_length': -1,
'exclude_cn_from_sans': False,
'config_type': 'public_cert_configuration_dns_cloud_internet_services',
'name': 'example-cloud-internet-services-config',
'cloud_internet_services_apikey': '5ipu_ykv0PMp2MhxQnDMn7VzrkSlBwi3BOI8uthi_EXZ',
'cloud_internet_services_crn': 'crn:v1:bluemix:public:internet-svcs:global:a/128e84fcca45c1224aae525d31ef2b52:009a0357-1460-42b4-b903-10580aba7dd8::',
}

response = secrets_manager_service.create_configuration(
Expand Down Expand Up @@ -766,6 +751,7 @@ def test_list_configurations_example(self):
limit=10,
sort='config_type',
search='example',
secret_types=['iam_credentials', 'public_cert', 'private_cert'],
)
while pager.has_next():
next_page = pager.get_next()
Expand All @@ -790,7 +776,7 @@ def test_get_configuration_example(self):

response = secrets_manager_service.get_configuration(
name=configuration_name_for_get_configuration_link,
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
)
configuration = response.get_result()

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

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

response = secrets_manager_service.update_configuration(
name=configuration_name_for_get_configuration_link,
configuration_patch=configuration_patch_model,
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
)
configuration = response.get_result()

Expand Down Expand Up @@ -846,7 +833,7 @@ def test_create_configuration_action_example(self):
response = secrets_manager_service.create_configuration_action(
name=configuration_name_for_get_configuration_link,
config_action_prototype=configuration_action_prototype_model,
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
)
configuration_action = response.get_result()

Expand Down Expand Up @@ -1029,7 +1016,7 @@ def test_delete_configuration_example(self):

response = secrets_manager_service.delete_configuration(
name=configuration_name_for_get_configuration_link,
x_sm_accept_configuration_type='private_cert_configuration_root_ca',
x_sm_accept_configuration_type='public_cert_configuration_dns_cloud_internet_services',
)

# end-delete_configuration
Expand Down
Loading

0 comments on commit 2295bb0

Please sign in to comment.