Various small changes after review

This commit is contained in:
Guewen Baconnier
2017-09-20 12:43:38 +02:00
parent dd8f2fc5c8
commit 81196a8058
8 changed files with 18 additions and 20 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
'monitoring_statsd',
'server_environment', # OCA/server-tools
],
'website': 'http://www.camptocamp.com',
'website': 'https://www.camptocamp.com',
'data': [],
'installable': True,
}
+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'), (