Files
manila-ui/doc/source/contributor/features.rst
Goutham Pacha Ravi 70e2c88fdd [ussuri][goal] Change contributor guide
- Add a top level CONTRIBUTING.rst for
  repo browsers
- Refactor existing contributor guide
- Add a contributor/contributing.rst file
  with links back to relevant manila
  documentation.
- Rearrange some things in the main doc
  index file to make things prettier.

Change-Id: I1cc4c2f3d78e04a78dc46221e5edf786fd22a372
Story: #2007236
Task: #39554
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-27 14:59:57 +00:00

1.1 KiB

Adding New Features

When implementing a new feature, you may think about making it optional, so it could be enabled or disabled in different deployments.

How to use it:

from django.conf import settings
manila_config = getattr(settings, 'OPENSTACK_MANILA_FEATURES', {})
manila_config.get('your_new_config_option', 'value_of_config_option')

See /configuration/index section for more configuration details.

It is also expected that each addition of new logic to Manila UI is covered by unit tests.

Test modules should be located under "manila_ui/tests", satisfying the following template when tests are written for a specific module:

manila_ui[/tests]/path/to/[test_]modulename.py

However, when testing the flow between different modules (using test app), the tests can be added to a test module that can satisfy the following template:

manila_ui/tests/path/to/directory/tests.py

Manila UI tests use the mock module from the unittest package for unit testing.