Various small changes after review

This commit is contained in:
Guewen Baconnier committed 2017-09-20 12:43:38 +02:00
1 parent dd8f2fc5c8
commit 81196a8058
8 files changed
+18 -20

No files matched your search

+4 -11
View File
@@ -51,18 +51,11 @@ class CloudPlatform(models.AbstractModel):
# This will be moved to cloud_platform_exoscale on v11
@api.model
def install_exoscale(self):
params = self.env['ir.config_parameter'].sudo()
params.set_param('cloud.platform.kind', 'exoscale')
environment = config['running_env']
configs = self._config_by_server_env(environment)
params.set_param('ir_attachment.location', configs.filestore)
self.check()
if configs.filestore == FilestoreKind.s3:
self.env['ir.attachment'].sudo().force_storage()
_logger.info('cloud platform configured for exoscale')
self.install('exoscale')
@api.model
def install(self, platform_kind):
assert platform_kind in ('ovh', 'exoscale')
params = self.env['ir.config_parameter'].sudo()
params.set_param('cloud.platform.kind', platform_kind)
environment = config['running_env']
@@ -86,8 +79,8 @@ class CloudPlatform(models.AbstractModel):
"automatically."
)
if use_swift:
assert os.environ.get('SWIFT_HOST'), (
"SWIFT_HOST environment variable is required when "
assert os.environ.get('SWIFT_AUTH_URL'), (
"SWIFT_AUTH_URL environment variable is required when "
"ir_attachment.location is 'swift'."
)
assert os.environ.get('SWIFT_ACCOUNT'), (
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.