Skip to main content

Allows to use server environment with fs storage

Project description

Odoo Community Association

Filesystem Storage Backend

Beta License: LGPL-3 OCA/storage Translate me on Weblate Try me on Runboat

This module allows to use server environment with fs storage. It is a bridge between fs_storage and server_environment modules. It provides an implementation of the StorageEnvironment class that uses the filesystem as a storage backend.

Table of contents

Usage

To ease the management of the filesystem storages configuration accross the different environments, the configuration of the filesystem storages can be defined in environment files or directly in the main configuration file. For example, the configuration of a filesystem storage with the code fsprod can be provided in the main configuration file as follows:

[fs_storage.fsprod]
protocol=s3
options={"endpoint_url": "https://my_s3_server/", "key": "KEY", "secret": "SECRET"}
directory_path=my_bucket

To work, a storage.backend record must exist with the code fsprod into the database. In your configuration section, you can specify the value for the following fields:

  • protocol

  • options

  • directory_path

When evaluating directory_path, {db_name} is replaced by the database name. This is usefull in multi-tenant with a setup completly controlled by configuration files.

Migration from storage_backend

The fs_storage addon can be used to replace the storage_backend addon. (It has been designed to be a drop-in replacement for the storage_backend addon). To ease the migration, the fs.storage model defines the high-level methods available in the storage_backend model. These methods are:

  • add

  • get

  • list_files

  • find_files

  • move_files

  • delete

These methods are wrappers around the methods of the fsspec.AbstractFileSystem class (see https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem). These methods are marked as deprecated and will be removed in a future version (V18) of the addon. You should use the methods of the fsspec.AbstractFileSystem class instead since they are more flexible and powerful. You can access the instance of the fsspec.AbstractFileSystem class using the fs property of a fs.storage record.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV

  • Dixmit

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/storage project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo_addon_fs_storage_environment-16.0.1.0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_fs_storage_environment-16.0.1.0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13b2c3f20d36f7c6e8afd5f3b83c6ba954834eae0445116f99db8e291d78f58f
MD5 7e3bf09cec830885948a8d65353dff89
BLAKE2b-256 c684b206a4140bfd506244a783cde0e573d8a7e6cbe5a663f5bc9236711b1408

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page