Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e7ef622
fix(case management): add labels to example output
Andras-Csanyi Mar 23, 2021
5e4bbb1
fix(configuration governance): add labels to example output
Andras-Csanyi Mar 23, 2021
afefb68
fix(enterprise billing): add labels to example output
Andras-Csanyi Mar 23, 2021
66661f4
fix(enterprise usage report): add labels to example output
Andras-Csanyi Mar 23, 2021
12ac183
fix(global catalog): add labels to example output
Andras-Csanyi Mar 23, 2021
3f483b9
fix(global search): add labels to example output
Andras-Csanyi Mar 23, 2021
8942ecc
fix(global tagging): add labels to example output
Andras-Csanyi Mar 23, 2021
c201b08
fix(iam access groups): add labels to example output
Andras-Csanyi Mar 23, 2021
33b6207
fix(iam identity): add labels to example output
Andras-Csanyi Mar 23, 2021
4fe4d8b
fix(iam policy management): add labels to example output
Andras-Csanyi Mar 23, 2021
91b1bdb
fix(open service broker): add labels to example output
Andras-Csanyi Mar 23, 2021
31ac9c8
fix(resource manager): add labels to example output
Andras-Csanyi Mar 23, 2021
a63af0a
fix(usage metering): add labels to example output
Andras-Csanyi Mar 23, 2021
9154eb6
fix(usage reports): add labels to example output
Andras-Csanyi Mar 23, 2021
112b7b6
fix(user management): add labels to example output
Andras-Csanyi Mar 23, 2021
aee5c0d
fix(case management): fix for labels in example output
Andras-Csanyi Mar 24, 2021
0642416
fix(configuration governance): fix labels in example output
Andras-Csanyi Mar 24, 2021
747ecf3
fix(enterprise billing units): fix labels in example output
Andras-Csanyi Mar 24, 2021
24467c2
fix(enterprise usage reports): fix labels in example output
Andras-Csanyi Mar 24, 2021
5e0596f
fix(global catalog): fix labels in example output
Andras-Csanyi Mar 24, 2021
9e1dcbc
fix(global search): fix labels in example output
Andras-Csanyi Mar 24, 2021
c2bb627
fix(global tagging): fix labels in example output
Andras-Csanyi Mar 24, 2021
893fb57
fix(iam access groups): fix labels in example output
Andras-Csanyi Mar 24, 2021
4c6bee2
fix(iam identity): fix labels in example output
Andras-Csanyi Mar 24, 2021
b57b3ff
fix(iam policy management): fix labels in example output
Andras-Csanyi Mar 24, 2021
00faf46
fix(open service broker): fix labels in example output
Andras-Csanyi Mar 24, 2021
045e7bf
fix(resource controller): fix labels in example output
Andras-Csanyi Mar 24, 2021
c4ba68e
fix(resource manager): fix labels in example output
Andras-Csanyi Mar 24, 2021
b74dd8d
fix(usage metering): fix labels in example output
Andras-Csanyi Mar 24, 2021
18cf6d1
fix(usage reports): fix labels in example output
Andras-Csanyi Mar 24, 2021
cb037c4
fix(user management): fix labels in example output
Andras-Csanyi Mar 24, 2021
aacb23e
Merge branch 'main' into fix-add-labels-to-examples
padamstx Mar 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions examples/test_case_management_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_create_case_example(self):
severity=4,
).get_result()

print(json.dumps(case, indent=2))
print('\ncreate_case() result:\n' + json.dumps(case, indent=2))

# end-createCase

Expand Down Expand Up @@ -144,7 +144,7 @@ def test_get_case_example(self):
fields=fields_to_return
).get_result()

print(json.dumps(case, indent=2))
print('\nget_case() result:\n' + json.dumps(case, indent=2))

# end-getCase

Expand All @@ -166,7 +166,7 @@ def test_get_cases_example(self):
sort=GetCasesEnums.Fields.UPDATED_AT,
).get_result()

print(json.dumps(case_list, indent=2))
print('\nget_cases() result:\n' + json.dumps(case_list, indent=2))

# end-getCases

Expand All @@ -188,7 +188,7 @@ def test_add_comment_example(self):
comment='This is an example comment.'
).get_result()

print(json.dumps(comment, indent=2))
print('\nadd_comment() result:\n' + json.dumps(comment, indent=2))

# end-addComment

Expand All @@ -214,7 +214,7 @@ def test_add_watchlist_example(self):
watchlist=watchlist_users,
).get_result()

print(json.dumps(watchlist_add_response, indent=2))
print('\nadd_watchlist() result:\n' + json.dumps(watchlist_add_response, indent=2))

# end-addWatchlist

Expand All @@ -240,7 +240,7 @@ def test_remove_watchlist_example(self):
watchlist=watchlist_users,
).get_result()

print(json.dumps(watchlist, indent=2))
print('\nremove_watchlist() result:\n' + json.dumps(watchlist, indent=2))

# end-removeWatchlist

Expand All @@ -264,7 +264,7 @@ def test_add_resource_example(self):
note='This resource is the service that is having the problem.',
).get_result()

print(json.dumps(resource, indent=2))
print('\nadd_resource() result:\n' + json.dumps(resource, indent=2))

# end-addResource

Expand Down Expand Up @@ -296,7 +296,7 @@ def test_upload_file_example(self):
file=files_to_upload,
).get_result()

print(json.dumps(attachment, indent=2))
print('\nupload_file() result:\n' + json.dumps(attachment, indent=2))

# end-uploadFile

Expand Down Expand Up @@ -327,8 +327,8 @@ def test_download_file_example(self):

file = response.get_result()

print('Attachment content-type:',
response.get_headers()['content-type'])
print('\ndownload_file() result:\n')
print('Attachment content-type:', response.get_headers()['content-type'])
print('Attachment contents:', file.content)

# end-downloadFile
Expand All @@ -352,7 +352,7 @@ def test_delete_file_example(self):
file_id=attachment_id
).get_result()

print(json.dumps(attachment_list, indent=2))
print('\ndelete_file() result:\n' + json.dumps(attachment_list, indent=2))

# end-deleteFile

Expand Down Expand Up @@ -380,7 +380,7 @@ def test_update_case_status_example(self):
status_payload=status_payload_model
).get_result()

print(json.dumps(case, indent=2))
print('\nupdate_case_status() result:\n' + json.dumps(case, indent=2))

# end-updateCaseStatus

Expand Down
20 changes: 10 additions & 10 deletions examples/test_configuration_governance_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_create_rules_example(self):
code=responseEntry['errors'][0]['code'],
message=responseEntry['errors'][0]['message'])

print(json.dumps(create_rules_response, indent=2))
print('\ncreate_rules() result:\n' + json.dumps(create_rules_response, indent=2))

# end-create_rules

Expand Down Expand Up @@ -219,7 +219,7 @@ def test_create_attachments_example(self):
rule_id=rule_id_link,
attachments=[attachment_request_model]).get_result()

print(json.dumps(create_attachments_response, indent=2))
print('\ncreate_attachments() result:\n' + json.dumps(create_attachments_response, indent=2))

# end-create_attachments

Expand All @@ -241,7 +241,7 @@ def test_get_attachment_example(self):
rule_id=rule_id_link,
attachment_id=attachment_id_link).get_result()

print(json.dumps(attachment, indent=2))
print('\nget_attachment() result:\n' + json.dumps(attachment, indent=2))

# end-get_attachment

Expand All @@ -263,7 +263,7 @@ def test_get_rule_example(self):
rule = configuration_governance_service.get_rule(
rule_id=rule_id_link).get_result()

print(json.dumps(rule, indent=2))
print('\nget_rule() result:\n' + json.dumps(rule, indent=2))

# end-get_rule

Expand All @@ -284,7 +284,7 @@ def test_list_rules_example(self):
rule_list = configuration_governance_service.list_rules(
account_id=account_id).get_result()

print(json.dumps(rule_list, indent=2))
print('\nlist_rules() result:\n' + json.dumps(rule_list, indent=2))

# end-list_rules

Expand Down Expand Up @@ -337,7 +337,7 @@ def test_update_rule_example(self):
rule_type='user_defined',
labels=['testString']).get_result()

print(json.dumps(rule, indent=2))
print('\nupdate_rule() result:\n' + json.dumps(rule, indent=2))

# end-update_rule

Expand All @@ -355,7 +355,7 @@ def test_list_attachments_example(self):
attachment_list = configuration_governance_service.list_attachments(
rule_id=rule_id_link).get_result()

print(json.dumps(attachment_list, indent=2))
print('\nlist_attachments() result:\n' + json.dumps(attachment_list, indent=2))

# end-list_attachments

Expand Down Expand Up @@ -388,7 +388,7 @@ def test_update_attachment_example(self):
},
excluded_scopes=[excluded_scope_model]).get_result()

print(json.dumps(attachment, indent=2))
print('\nupdate_attachment() result:\n' + json.dumps(attachment, indent=2))

# end-update_attachment

Expand All @@ -407,7 +407,7 @@ def test_delete_attachment_example(self):
rule_id=rule_id_link,
attachment_id=attachment_id_link).get_result()

print(json.dumps(response, indent=2))
print('\ndelete_attachment() result:\n' + json.dumps(response, indent=2))

# end-delete_attachment

Expand All @@ -425,7 +425,7 @@ def test_delete_rule_example(self):
response = configuration_governance_service.delete_rule(
rule_id=rule_id_link).get_result()

print(json.dumps(response, indent=2))
print('\ndelete_rule() result:\n' + json.dumps(response, indent=2))

# end-delete_rule

Expand Down
8 changes: 4 additions & 4 deletions examples/test_enterprise_billing_units_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_get_billing_unit_example(self):
billing_unit = enterprise_billing_units_service.get_billing_unit(
billing_unit_id=billing_unit_id).get_result()

print(json.dumps(billing_unit, indent=2))
print('\nget_billing_unit() result:\n' + json.dumps(billing_unit, indent=2))

# end-get_billing_unit

Expand All @@ -116,7 +116,7 @@ def test_list_billing_units_example(self):
billing_units_list = enterprise_billing_units_service.list_billing_units(
enterprise_id=enterprise_id).get_result()

print(json.dumps(billing_units_list, indent=2))
print('\nlist_billing_units() result:\n' + json.dumps(billing_units_list, indent=2))

# end-list_billing_units

Expand All @@ -135,7 +135,7 @@ def test_list_billing_options_example(self):
billing_options_list = enterprise_billing_units_service.list_billing_options(
billing_unit_id=billing_unit_id).get_result()

print(json.dumps(billing_options_list, indent=2))
print('\nlist_billing_options() result:\n' + json.dumps(billing_options_list, indent=2))

# end-list_billing_options

Expand All @@ -154,7 +154,7 @@ def test_get_credit_pools_example(self):
credit_pools_list = enterprise_billing_units_service.get_credit_pools(
billing_unit_id=billing_unit_id, type='PLATFORM').get_result()

print(json.dumps(credit_pools_list, indent=2))
print('\nget_credit_pools() result:\n' + json.dumps(credit_pools_list, indent=2))

# end-get_credit_pools

Expand Down
2 changes: 1 addition & 1 deletion examples/test_enterprise_usage_reports_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_get_resource_usage_report_example(self):
limit=10
).get_result()

print(json.dumps(reports, indent=2))
print('\nget_resource_usage_report() result:\n' + json.dumps(reports, indent=2))

# end-get_resource_usage_report

Expand Down
29 changes: 15 additions & 14 deletions examples/test_global_catalog_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_create_catalog_entry_example(self):
metadata=metadata_model,
).get_result()

print(json.dumps(catalog_entry, indent=2))
print('\ncreate_catalog_entry() result:\n' + json.dumps(catalog_entry, indent=2))

# end-create_catalog_entry

Expand All @@ -142,7 +142,7 @@ def test_get_catalog_entry_example(self):
complete=True,
).get_result()

print(json.dumps(catalog_entry, indent=2))
print('\nget_catalog_entry() result:\n' + json.dumps(catalog_entry, indent=2))

# end-get_catalog_entry

Expand Down Expand Up @@ -197,7 +197,7 @@ def test_update_catalog_entry_example(self):
metadata=metadata_model,
).get_result()

print(json.dumps(catalog_entry, indent=2))
print('\nupdate_catalog_entry() result:\n' + json.dumps(catalog_entry, indent=2))

# end-update_catalog_entry

Expand All @@ -219,7 +219,7 @@ def test_list_catalog_entries_example(self):
complete=True,
).get_result()

print(json.dumps(entry_search_result, indent=2))
print('\nlist_catalog_entries() result:\n' + json.dumps(entry_search_result, indent=2))

# end-list_catalog_entries

Expand All @@ -245,7 +245,7 @@ def test_get_child_objects_example(self):
complete=True,
).get_result()

print(json.dumps(entry_search_result, indent=2))
print('\nget_child_objects() result:\n' + json.dumps(entry_search_result, indent=2))

# end-get_child_objects

Expand All @@ -267,7 +267,7 @@ def test_restore_catalog_entry_example(self):
id=catalog_entry_id,
).get_result()

print(json.dumps(response, indent=2))
print('\nrestore_catalog_entry() result:\n' + json.dumps(response, indent=2))

# end-restore_catalog_entry

Expand All @@ -289,7 +289,7 @@ def test_get_visibility_example(self):
id=catalog_entry_id,
).get_result()

print(json.dumps(visibility, indent=2))
print('\nget_visibility() result:\n' + json.dumps(visibility, indent=2))

# end-get_visibility

Expand All @@ -312,7 +312,7 @@ def test_update_visibility_example(self):
extendable=False,
).get_result()

print(json.dumps(response, indent=2))
print('\nupdate_visibility() result:\n' + json.dumps(response, indent=2))

# end-update_visibility

Expand All @@ -335,7 +335,7 @@ def test_get_pricing_example(self):
id=catalog_entry_id,
).get_result()

print(json.dumps(pricing_get, indent=2))
print('\nget_pricing() result:\n' + json.dumps(pricing_get, indent=2))

# end-get_pricing

Expand All @@ -359,7 +359,7 @@ def test_get_audit_logs_example(self):
limit=10,
).get_result()

print(json.dumps(audit_search_result, indent=2))
print('\nget_audit_logs() result:\n' + json.dumps(audit_search_result, indent=2))

# end-get_audit_logs

Expand Down Expand Up @@ -387,7 +387,7 @@ def test_upload_artifact_example(self):
content_type='text/plain',
).get_result()

print(json.dumps(response, indent=2))
print('\nupload_artifact() result:\n' + json.dumps(response, indent=2))

# end-upload_artifact

Expand All @@ -412,6 +412,7 @@ def test_get_artifact_example(self):

content_type = response.get_headers().get('content-type')
result = response.get_result()
print('\nget_artifact() result:\n')
print('Artifact content-type: {0}'.format(content_type))
print('Artifact contents: {0}'.format(str(result.content)))

Expand All @@ -434,7 +435,7 @@ def test_list_artifacts_example(self):
artifacts = global_catalog_service.list_artifacts(
object_id=catalog_entry_id).get_result()

print(json.dumps(artifacts, indent=2))
print('\nlist_artifacts() result:\n' + json.dumps(artifacts, indent=2))

# end-list_artifacts

Expand All @@ -457,7 +458,7 @@ def test_delete_artifact_example(self):
artifact_id='artifact.txt',
).get_result()

print(json.dumps(response, indent=2))
print('\ndelete_artifact() result:\n' + json.dumps(response, indent=2))

# end-delete_artifact

Expand All @@ -478,7 +479,7 @@ def test_delete_catalog_entry_example(self):
response = global_catalog_service.delete_catalog_entry(
id=catalog_entry_id).get_result()

print(json.dumps(response, indent=2))
print('\ndelete_catalog_entry() result:\n' + json.dumps(response, indent=2))

# end-delete_catalog_entry

Expand Down
4 changes: 2 additions & 2 deletions examples/test_global_search_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_search_example(self):
fields=['*'])
scan_result = response.get_result()

print(json.dumps(scan_result, indent=2))
print('\nsearch() result:\n' + json.dumps(scan_result, indent=2))

# end-search

Expand All @@ -98,7 +98,7 @@ def test_get_supported_types_example(self):
supported_types_list = global_search_service.get_supported_types(
).get_result()

print(json.dumps(supported_types_list, indent=2))
print('\nget_supported_types() result:\n' + json.dumps(supported_types_list, indent=2))

# end-get_supported_types

Expand Down
Loading