Add vault operations.
This commit is contained in:
parent
b296294086
commit
7156df1a63
9 changed files with 208 additions and 0 deletions
14
moto/glacier/utils.py
Normal file
14
moto/glacier/utils.py
Normal 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]
|
||||
Loading…
Add table
Add a link
Reference in a new issue