shepherd.storage.dynamo module
This file contains code for storing and accessing serialized
stacks on Amazon’s DynamoDB.
TODO:
1) Improve documentation
3) some unit tests
-
class
shepherd.storage.dynamo.DynamoStorage[source]
Bases: shepherd.common.plugins.Storage
-
configure(settings)[source]
-
create_table()[source]
Creates the dynamodb table and waits for it to become active.
TODO: Accept a configuration object for the table schema.
-
delete(name)[source]
-
dump(stack)[source]
Takes a stack dict and stores it
in the datastore of your choice.
-
get_table()[source]
Handles getting or creating the Dynamodb
table.
-
load(name)[source]
Given a unique name.
Search the store for the serialized stack with
that name. Returns a single stack dict.
-
search(tags)[source]
Given a dict of tags.
Search the store for serialized stacks
that match to those tags. Returning a list of
the stack names that match.
NOTE: Run O(n) time, so you should try and
archive old/unused stacks whenever possible.
-
shepherd.storage.dynamo.dedynamize(stack)[source]
-
shepherd.storage.dynamo.dynamize(stack)[source]