-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
500 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import click | ||
from commands.services.lambda_api import LambdaService | ||
|
||
|
||
@click.group() | ||
def awslambda(): | ||
pass | ||
|
||
|
||
@awslambda.command(help="Delete old versions of AWS Lambda functions.") | ||
@click.option('--profile', envvar='AWS_PROFILE', default='default', help='The AWS profile to use. e.g. sikt-nva-sandbox, configure your profiles in ~/.aws/config') | ||
@click.option('--delete', is_flag=True, default=True, help='Delete old versions.') | ||
def delete_old_versions(profile:str, delete:bool) -> None: | ||
LambdaService(profile).delete_old_versions(delete) | ||
@click.option( | ||
"--profile", | ||
envvar="AWS_PROFILE", | ||
default="default", | ||
help="The AWS profile to use. e.g. sikt-nva-sandbox, configure your profiles in ~/.aws/config", | ||
) | ||
@click.option("--delete", is_flag=True, default=True, help="Delete old versions.") | ||
def delete_old_versions(profile: str, delete: bool) -> None: | ||
LambdaService(profile).delete_old_versions(delete) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
import click | ||
|
||
from commands.services.customers_api import list_missing_customers, list_duplicate_customers | ||
from commands.services.customers_api import ( | ||
list_missing_customers, | ||
list_duplicate_customers, | ||
) | ||
from commands.services.aws_utils import prettify | ||
|
||
|
||
@click.group() | ||
def customers(): | ||
pass | ||
|
||
@customers.command(help="Search customer references from users that does not exsist in the customer table") | ||
@click.option('--profile', envvar='AWS_PROFILE', default='default', help='The AWS profile to use. e.g. sikt-nva-sandbox, configure your profiles in ~/.aws/config') | ||
|
||
@customers.command( | ||
help="Search customer references from users that does not exsist in the customer table" | ||
) | ||
@click.option( | ||
"--profile", | ||
envvar="AWS_PROFILE", | ||
default="default", | ||
help="The AWS profile to use. e.g. sikt-nva-sandbox, configure your profiles in ~/.aws/config", | ||
) | ||
def list_missing(profile) -> None: | ||
result = list_missing_customers(profile) | ||
click.echo(prettify(result)) | ||
|
||
|
||
@customers.command(help="Search dubplicate customer references (same cristin id)") | ||
@click.option('--profile', envvar='AWS_PROFILE', default='default', help='The AWS profile to use. e.g. sikt-nva-sandbox, configure your profiles in ~/.aws/config') | ||
def list_duplicate(profile:str) -> None: | ||
@click.option( | ||
"--profile", | ||
envvar="AWS_PROFILE", | ||
default="default", | ||
help="The AWS profile to use. e.g. sikt-nva-sandbox, configure your profiles in ~/.aws/config", | ||
) | ||
def list_duplicate(profile: str) -> None: | ||
result = list_duplicate_customers(profile) | ||
click.echo(prettify(result)) | ||
click.echo(prettify(result)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.