Add vault operations.

This commit is contained in:
Steve Pulec 2015-06-03 22:55:07 -04:00
commit 7156df1a63
9 changed files with 208 additions and 0 deletions

14
moto/glacier/utils.py Normal file
View file

@ -0,0 +1,14 @@
from six.moves.urllib.parse import urlparse
def region_from_glacier_url(url):
domain = urlparse(url).netloc
if '.' in domain:
return domain.split(".")[1]
else:
return 'us-east-1'
def vault_from_glacier_url(full_url):
return full_url.split("/")[-1]