Skip to content

Commit

Permalink
Merge pull request #3 from william-cass-wright/third
Browse files Browse the repository at this point in the history
command strings and cleanup
  • Loading branch information
will-wright-eng committed Jun 15, 2022
2 parents e26fe60 + f147ee6 commit 72c1e47
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Lint

on:
pull_request:
Expand Down
3 changes: 2 additions & 1 deletion secrets_mgmt_cli/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ def create_secret(self, secret_string, secret_name, description="string descript
except ClientError as e:
return e

aws = AwsSecretMgmt()

aws = AwsSecretMgmt()
10 changes: 10 additions & 0 deletions secrets_mgmt_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def first_command(example, option):

@cli.command()
def ls():
"list secrets in AWS Secrets Manager"
resp = aws.get_secrets_list()
for secret in resp.get("SecretList"):
click.echo(f"\n-- {secret.get('Name')} --")
Expand All @@ -48,6 +49,7 @@ def ls():
@click.option("-n", "--secret-name", "secret_name", required=True)
@click.option("-d", "--description", "description", required=False, default="string description")
def create(secret_string, secret_name, description):
"create new secret"
# create_secret(self, secret_string, secret_name, description="string description")
click.echo("create secret method --> needs to be implemented")

Expand All @@ -56,7 +58,13 @@ def create(secret_string, secret_name, description):
@cli.command()
@click.option("-n", "--secret-name", "secret_name", required=True)
def read(description):
"read contents of secret, metadata and secret_string"
click.echo("read secret method --> needs to be implemented")
# get and display metadata
value = click.prompt("display secret string? [Y/n]", type=str)
if value.lower() == "y":
# get and display secret string
pass


# update
Expand All @@ -65,13 +73,15 @@ def read(description):
@click.option("-n", "--secret-name", "secret_name", required=True)
@click.option("-d", "--description", "description", required=False, default="string description")
def update(secret_string, secret_name, description):
"change the contents of an existing secert"
click.echo("update secret method --> needs to be implemented")


# delete
@cli.command()
@click.option("-n", "--secret-name", "secret_name", required=True)
def delete(description):
"remove or archive a secret from AWS Secret Manager"
click.echo("delete secret method --> needs to be implemented")


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup
import os

VERSION = "0.1"
VERSION = "0.3"


def get_long_description():
Expand Down

0 comments on commit 72c1e47

Please sign in to comment.