mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 16:48:36 +00:00
Add cloud_platform_ovh
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
Cloud Platform OVH
|
||||||
|
==================
|
||||||
|
|
||||||
|
Install addons specific to the OVH setup.
|
||||||
|
|
||||||
|
* The object storage is Swift
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||||
|
|
||||||
|
|
||||||
|
{'name': 'Cloud Platform OVH',
|
||||||
|
'summary': 'Addons required for the Camptocamp Cloud Platform on OVH',
|
||||||
|
'version': '7.0.1.0.0',
|
||||||
|
'author': 'Camptocamp,Odoo Community Association (OCA)',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'category': 'Extra Tools',
|
||||||
|
'depends': [
|
||||||
|
'cloud_platform',
|
||||||
|
'attachment_swift',
|
||||||
|
],
|
||||||
|
'website': 'https://www.camptocamp.com',
|
||||||
|
'data': [],
|
||||||
|
'installable': True,
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from . import cloud_platform
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from openerp.osv import osv
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
try:
|
||||||
|
from openerp.addons.cloud_platform.models.cloud_platform \
|
||||||
|
import FilestoreKind
|
||||||
|
from openerp.addons.cloud_platform.models.cloud_platform \
|
||||||
|
import PlatformConfig
|
||||||
|
except ImportError:
|
||||||
|
FilestoreKind = None
|
||||||
|
PlatformConfig = None
|
||||||
|
_logger.debug("Cannot 'import from cloud_platform'")
|
||||||
|
|
||||||
|
|
||||||
|
class CloudPlatform(osv.osv_abstract):
|
||||||
|
_inherit = 'cloud.platform'
|
||||||
|
|
||||||
|
def _platform_kinds(self):
|
||||||
|
kinds = super(CloudPlatform, self)._platform_kinds()
|
||||||
|
kinds.append('ovh')
|
||||||
|
return kinds
|
||||||
|
|
||||||
|
def _config_by_server_env_for_ovh(self):
|
||||||
|
configs = {
|
||||||
|
'prod': PlatformConfig(filestore=FilestoreKind.swift),
|
||||||
|
'integration': PlatformConfig(filestore=FilestoreKind.swift),
|
||||||
|
'test': PlatformConfig(filestore=FilestoreKind.db),
|
||||||
|
'dev': PlatformConfig(filestore=FilestoreKind.db),
|
||||||
|
}
|
||||||
|
return configs
|
||||||
|
|
||||||
|
def install_ovh(self, cr, uid, context=None):
|
||||||
|
self.install(cr, uid, 'ovh', context)
|
||||||
Reference in New Issue
Block a user