4 'checksums': re.compile(r"^snapshot-(.*)\.(\w+)sums$"),
5 'segments': re.compile(r"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(\.\S+)?$"),
6 'snapshots': re.compile(r"^snapshot-(.*)\.lbs$")
10 """Base class for all cumulus storage backends."""
13 raise NotImplementedException
15 def get(self, type, name):
16 raise NotImplementedException
18 def put(self, type, name, fp):
19 raise NotImplementedException
21 def delete(self, type, name):
22 raise NotImplementedException
25 (scheme, netloc, path, params, query, fragment) \
26 = urlparse.urlparse(url)
29 import cumulus.store.file
30 return cumulus.store.file.FileStore(path)
32 import cumulus.store.s3
33 while path.startswith("/"): path = path[1:]
34 (bucket, path) = path.split("/", 1)
35 return cumulus.store.s3.S3Store(bucket, path)
37 raise NotImplementedException