| Index: chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py
|
| diff --git a/chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py b/chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..44ab3e25b1c727048f41dfb347734c57f3936bce
|
| --- /dev/null
|
| +++ b/chrome/test/functional/ispy/ispy_core/Tests/BucketManagerTests/DependancyInjection/boto_injector.py
|
| @@ -0,0 +1,54 @@
|
| +"""Set of classes and methods to perform dependency injection on boto."""
|
| +
|
| +
|
| +class BotoInjector(object):
|
| + """The BotoInjector abstract class."""
|
| +
|
| + def storage_uri(self, uri_str, default_scheme):
|
| + """Method to get the storage_uri."""
|
| + raise NotImplementedError
|
| +
|
| + def connect(self, uri, key, secret):
|
| + """Method to get a connection."""
|
| + raise NotImplementedError
|
| +
|
| + def get_bucket(self, connection, bucket_name):
|
| + """Method to get a bucket."""
|
| + raise NotImplementedError
|
| +
|
| + def get_key(self, bucket):
|
| + """Method to get a key."""
|
| + raise NotImplementedError
|
| +
|
| + def get_all_keys(self, bucket, prefix):
|
| + """Method to get all keys starting with a prefix in a bucket."""
|
| + raise NotImplementedError
|
| +
|
| +
|
| +class Key(object):
|
| + """Abstract Key class."""
|
| +
|
| + def exists(self):
|
| + """Method to return whether the key exists in the datastore."""
|
| + raise NotImplementedError
|
| +
|
| + def set_metadata(self, name, value):
|
| + """Method to set metadata for the key."""
|
| + raise NotImplementedError
|
| +
|
| + def set_path(self, path):
|
| + """Method to set the path of the key."""
|
| + raise NotImplementedError
|
| +
|
| + def set_contents_from_string(self, contents):
|
| + """Method to set the contents of the key's file."""
|
| + raise NotImplementedError
|
| +
|
| + def get_contents_as_string(self):
|
| + """Method to get the contents of the key's file."""
|
| + raise NotImplementedError
|
| +
|
| + def generate_url(self, timeout):
|
| + """Method to generate a url to the key's file."""
|
| + raise NotImplementedError
|
| +
|
|
|