Skip to content

Commit 4032529

Browse files
authored
Merge pull request #1065 from gboutry/fix/list-secrets
#1065 #### Description ListSecrets facade takes 2 arguments: `filter_`, and `show_secrets`. Previous instanciation passed a dict, which then landed in `filter_` field. Fixes: #947 #### QA Steps *<Commands / tests / steps to run to verify that the change works:>* await f.ListSecrets(filter_={"uri": <secret_id>}, show_secrets=True) All CI tests need to pass. *<Please note that most likely an additional test will be required by the reviewers for any change that's not a one liner to land.>* #### Notes & Discussion *<Additional notes for the reviewers if needed. Please delete section if not applicable.>*
2 parents c033058 + aaf6de3 commit 4032529

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

juju/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,15 +2704,15 @@ async def update_secret(self, name, data_args=[], new_name="", file="", info="")
27042704
if result_error.error is not None:
27052705
raise JujuAPIError(result_error.error)
27062706

2707-
async def list_secrets(self, filter="", show_secrets=False):
2707+
async def list_secrets(self, filter=None, show_secrets=False):
27082708
"""
27092709
Returns the list of available secrets.
27102710
"""
27112711
facade = client.SecretsFacade.from_connection(self.connection())
2712-
results = await facade.ListSecrets({
2713-
'filter': filter,
2714-
'show-secrets': show_secrets,
2715-
})
2712+
results = await facade.ListSecrets(
2713+
filter_=filter,
2714+
show_secrets=show_secrets,
2715+
)
27162716
return results.results
27172717

27182718
async def remove_secret(self, secret_name, revision=-1):

0 commit comments

Comments
 (0)