Abstract install method

This commit is contained in:
Thierry Ducrest authored and Guewen Baconnier committed 2017-09-19 16:30:51 +02:00
1 parent 66748534f6
commit 1548fd674a
4 files changed
+24 -22

No files matched your search

+12
View File
@@ -61,6 +61,18 @@ class CloudPlatform(models.AbstractModel):
self.env['ir.attachment'].sudo().force_storage()
_logger.info('cloud platform configured for exoscale')
@api.model
def install(self, platform_kind):
params = self.env['ir.config_parameter'].sudo()
params.set_param('cloud.platform.kind', platform_kind)
environment = config['running_env']
configs = self._config_by_server_env(environment)
params.set_param('ir_attachment.location', configs.filestore)
self.check()
if configs.filestore in [FilestoreKind.swift, FilestoreKind.s3]:
self.env['ir.attachment'].sudo().force_storage()
_logger.info('cloud platform configured for {}'.format(platform_kind))
@api.model
def _check_swift(self, environment_name):
params = self.env['ir.config_parameter'].sudo()
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.