Skip to content

Commit

Permalink
glcli: Add upgradecreds cli command
Browse files Browse the repository at this point in the history
The command calls Credentials internal upgrade method to upgrade
from an old set of credentials and stores a credentials.gfs file
on disk.

Signed-off-by: Peter Neuroth <[email protected]>
  • Loading branch information
nepet authored and cdecker committed Mar 7, 2024
1 parent dff896d commit 141f577
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/glcli/glcli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,15 @@ def recover(ctx):

pbprint(res)

@scheduler.command()
@click.pass_context
def upgradecreds(ctx):
signer = Signer(Tls(Creds()))
creds = Credentials.as_device().upgrade(ctx.obj.scheduler.inner, signer.inner.inner).build()

with open("credentials.gfs", "wb") as f:
f.write(creds.to_bytes())


@scheduler.command()
@click.pass_context
Expand Down

0 comments on commit 141f577

Please sign in to comment.