Merge pull request #20 from guewen/10.0-object-storage-container-not-empty-check

Add check for empty bucket on integration
This commit is contained in:
Guewen Baconnier authored and GitHub committed 2017-11-15 14:59:23 +01:00
commit d54a67c9e3
1 file changed
+10
+10
View File
@@ -110,6 +110,11 @@ class CloudPlatform(models.AbstractModel):
"ir_attachment.location is 'swift'."
)
container_name = os.environ['SWIFT_WRITE_CONTAINER']
if environment_name in ('integration', 'prod'):
assert container_name, (
"SWIFT_WRITE_CONTAINER must not be empty for prod "
"and integration"
)
prod_container = bool(re.match(r'[a-z]+-odoo-prod',
container_name))
if environment_name == 'prod':
@@ -161,6 +166,11 @@ class CloudPlatform(models.AbstractModel):
"integration/prod bucket)."
)
bucket_name = os.environ['AWS_BUCKETNAME']
if environment_name in ('integration', 'prod'):
assert bucket_name, (
"AWS_BUCKETNAME must not be empty for prod "
"and integration"
)
prod_bucket = bool(re.match(r'[a-z]+-odoo-prod', bucket_name))
if environment_name == 'prod':
assert prod_bucket, (
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.