Skip to content

Commit

Permalink
Merge pull request #1065 from gboutry/fix/list-secrets
Browse files Browse the repository at this point in the history
#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.>*
  • Loading branch information
jujubot authored Jul 11, 2024
2 parents c033058 + aaf6de3 commit 4032529
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions juju/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2704,15 +2704,15 @@ async def update_secret(self, name, data_args=[], new_name="", file="", info="")
if result_error.error is not None:
raise JujuAPIError(result_error.error)

async def list_secrets(self, filter="", show_secrets=False):
async def list_secrets(self, filter=None, show_secrets=False):
"""
Returns the list of available secrets.
"""
facade = client.SecretsFacade.from_connection(self.connection())
results = await facade.ListSecrets({
'filter': filter,
'show-secrets': show_secrets,
})
results = await facade.ListSecrets(
filter_=filter,
show_secrets=show_secrets,
)
return results.results

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

0 comments on commit 4032529

Please sign in to comment.