forked from fugue/credstash
-
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.
Use entry points to allow additional cli commands to be loaded.
- Loading branch information
1 parent
c7a9fb4
commit 0f26134
Showing
5 changed files
with
61 additions
and
53 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
import click | ||
from .cli import main | ||
from .dynamodb_storage_service import DynamoDbStorageService | ||
|
||
|
||
@main.command('setup-dynamodb') | ||
@click.option('--read-capacity', type=click.INT, default=1) | ||
@click.option('--write-capacity', type=click.INT, default=1) | ||
@click.pass_context | ||
def cmd_setup(ctx, read_capacity, write_capacity): | ||
""" | ||
Setup the credential table in AWS DynamoDB | ||
""" | ||
storage_service = ctx.obj.storage_service | ||
if not isinstance(storage_service, DynamoDbStorageService): | ||
raise click.ClickException('Cannot setup unknown storage service') | ||
storage_service.setup( | ||
read_capacity, write_capacity | ||
) | ||
|
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