Skip to content
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

fix: cluster credentials to fit new schema #181

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
4 changes: 2 additions & 2 deletions silverback/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,8 @@ def registry_auth():
@cluster_client
def credentials_list(cluster: "ClusterClient"):
"""List container registry credentials"""

if creds := list(cluster.registry_credentials):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this tab may cause issues

if creds := cluster.registry_credentials:
click.echo(yaml.safe_dump(creds))

else:
Expand Down
5 changes: 2 additions & 3 deletions silverback/cluster/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,8 @@ def health(self) -> ClusterHealth:
def registry_credentials(self) -> dict[str, RegistryCredentials]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to change this interface because it doesn't match this anymore

response = self.get("/credentials")
handle_error_with_response(response)
return {
creds.name: creds for creds in map(RegistryCredentials.model_validate, response.json())
}

return response.json()

def new_credentials(
self, name: str, docker_server: str, docker_username: str, docker_password: str, docker_email: str
Expand Down
Loading