diff options
author | opensource-tnbt <sridhar.rao@spirent.com> | 2020-10-27 08:19:07 +0530 |
---|---|---|
committer | opensource-tnbt <sridhar.rao@spirent.com> | 2020-10-27 08:21:39 +0530 |
commit | a848ae411a7e3a69bf00042166392c5a0d45a7e0 (patch) | |
tree | e4036c81351cdf76ab4e0bce1c7d7a977436ca41 /sdv/docs/docker/state/development/overview/settings.rst | |
parent | f12039ae1fb9ed773ddf3d8000c6645e5900c48e (diff) |
DOCS: Re-Organize Documentation.
This patch organizes documentation for Jerma Release.
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: I653c8c4b4e0092059f19314631a0fcab4941e134
Diffstat (limited to 'sdv/docs/docker/state/development/overview/settings.rst')
-rw-r--r-- | sdv/docs/docker/state/development/overview/settings.rst | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/sdv/docs/docker/state/development/overview/settings.rst b/sdv/docs/docker/state/development/overview/settings.rst deleted file mode 100644 index c70f21e..0000000 --- a/sdv/docs/docker/state/development/overview/settings.rst +++ /dev/null @@ -1,38 +0,0 @@ -Program Settings handler ------------------------- - -``from tools.conf import settings`` - -Settings will be loaded from several ``.yaml`` or ``.yml`` files and any -user provided settings files. - -So, that user can use these settings values across program. - -This utility loads settings from yaml files in form of key and value -where key is always ``string`` while value can be of type python: - -- ``int`` e.g. 5, 45, 1234 -- ``str`` e.g. hello, world -- ``float`` e.g. 34.56, 12.7 -- ``list`` e.g. [ ‘month’ , ‘is’, 45 ] -- ``dict`` e.g. {‘program’: ‘sdv’, ‘language’: ‘python’} -- ``bool`` e.g. True, False - -keys are case-insensitive -^^^^^^^^^^^^^^^^^^^^^^^^^ - -The utility is case-insensitive to keys used as it automatically -converts all keys to lower case. - -E.g. ``Program : sdv``, ``program : sdv``, ``PrOgRam : sdv`` all are -same. - -- ``settings.load_from_file(path/to/file)`` -- ``settings.load_from_env()`` -- ``settings.load_from_dir(directory/to/search/yamls)`` - -``settings.load_from_dir()`` reads all yaml files in given directory and -all it’s sub-directory recursively in ascending order, hence if a -configuration item exists in more than one file, then the setting in the -file that occurs in the last read file will have high precedence and -overwrite previous values. .
\ No newline at end of file |