Skip to content

fix(Enterprise Usage Reports): regen service to get Pager #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 23 additions & 23 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2021-12-02T14:38:21Z",
"generated_at": "2022-10-26T12:35:22Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -82,7 +82,7 @@
"hashed_secret": "a2190c299b60e882d9fb33736d5e6ab6ffe42708",
"is_secret": false,
"is_verified": false,
"line_number": 822,
"line_number": 826,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -92,15 +92,15 @@
"hashed_secret": "eafd657ce70e075f0b72cdbe48232ed4fd5a47d1",
"is_secret": false,
"is_verified": false,
"line_number": 617,
"line_number": 624,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "d4c3d66fd0c38547a3c7a4c6bdc29c36911bc030",
"is_secret": false,
"is_verified": false,
"line_number": 3536,
"line_number": 4243,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -110,7 +110,7 @@
"hashed_secret": "d506bd5213c46bd49e16c634754ad70113408252",
"is_secret": false,
"is_verified": false,
"line_number": 3326,
"line_number": 3380,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -140,7 +140,7 @@
"hashed_secret": "a2190c299b60e882d9fb33736d5e6ab6ffe42708",
"is_secret": false,
"is_verified": false,
"line_number": 1035,
"line_number": 1041,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -168,7 +168,7 @@
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 4605,
"line_number": 6309,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -204,23 +204,23 @@
"hashed_secret": "f0b0b291c4d22d76db59faaeb94802714dd6d884",
"is_secret": false,
"is_verified": false,
"line_number": 884,
"line_number": 832,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "4c41e7a08e8895da0c6066adf33bf389c202b4e2",
"is_secret": false,
"is_verified": false,
"line_number": 1294,
"line_number": 1227,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "ca8b3e9d1445b3218e3512da63b05c8f26f181e5",
"is_secret": false,
"is_verified": false,
"line_number": 1303,
"line_number": 1236,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -240,47 +240,47 @@
"hashed_secret": "5bfabda9d31f1270745654e91a23ca1ff9b26a95",
"is_secret": false,
"is_verified": false,
"line_number": 72,
"line_number": 256,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "d06f0318f9eff64a13844ce2fa66cf9fb37a8cad",
"is_secret": false,
"is_verified": false,
"line_number": 73,
"line_number": 257,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "820b2eb95f60d828f82a984ce0321feab7868833",
"is_secret": false,
"is_verified": false,
"line_number": 74,
"line_number": 258,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "0f947a1a4f7cb716dc9f780bc563477bfb569c0e",
"is_secret": false,
"is_verified": false,
"line_number": 295,
"line_number": 430,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "953fd8a5aac905b12bf5d8cff3710d345c209632",
"is_secret": false,
"is_verified": false,
"line_number": 427,
"line_number": 562,
"type": "Hex High Entropy String",
"verified_result": null
},
{
"hashed_secret": "a0138a9944cb15ff025195706f98f95d9a544eb6",
"is_secret": false,
"is_verified": false,
"line_number": 431,
"line_number": 566,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand All @@ -290,31 +290,31 @@
"hashed_secret": "d4c3d66fd0c38547a3c7a4c6bdc29c36911bc030",
"is_secret": false,
"is_verified": false,
"line_number": 1227,
"line_number": 1346,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "cf4d2385b84329a52ca542285b93d9c4618420df",
"is_secret": false,
"is_verified": false,
"line_number": 2982,
"line_number": 3256,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "469f62fa9e1c6afe62e8808180668934ee548e8f",
"is_secret": false,
"is_verified": false,
"line_number": 3049,
"line_number": 3571,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 3731,
"line_number": 4540,
"type": "Secret Keyword",
"verified_result": null
}
Expand All @@ -324,21 +324,21 @@
"hashed_secret": "d4c3d66fd0c38547a3c7a4c6bdc29c36911bc030",
"is_secret": false,
"is_verified": false,
"line_number": 2212,
"line_number": 2277,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "b8473b86d4c2072ca9b08bd28e373e8253e865c4",
"is_secret": false,
"is_verified": false,
"line_number": 3112,
"line_number": 3177,
"type": "Secret Keyword",
"verified_result": null
}
]
},
"version": "0.13.1+ibm.46.dss",
"version": "0.13.1+ibm.55.dss",
"word_list": {
"file": null,
"hash": null
Expand Down
18 changes: 10 additions & 8 deletions examples/test_enterprise_usage_reports_v1_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2020.
# (C) Copyright IBM Corp. 2020, 2022.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -98,21 +98,23 @@ def test_get_resource_usage_report_example(self):
get_resource_usage_report request example
"""
try:
global enterprise_id, billing_month

print('\nget_resource_usage_report() result:')
# begin-get_resource_usage_report

reports = enterprise_usage_reports_service.get_resource_usage_report(
all_results = []
pager = GetResourceUsageReportPager(
client=enterprise_usage_reports_service,
enterprise_id=enterprise_id,
month=billing_month,
limit=10
).get_result()
)
while pager.has_next():
next_page = pager.get_next()
assert next_page is not None
all_results.extend(next_page)

print(json.dumps(reports, indent=2))
print(json.dumps(all_results, indent=2))

# end-get_resource_usage_report

except ApiException as e:
pytest.fail(str(e))

Expand Down
Loading