diff --git a/ocs/__init__.py b/ocs/__init__.py index e69de29bb2d..0bbae7bc0f7 100644 --- a/ocs/__init__.py +++ b/ocs/__init__.py @@ -0,0 +1,8 @@ +""" +Avoid already-imported warning cause of we are importing this package from +run wrapper for loading config. + +You can see documentation here: +https://docs.pytest.org/en/latest/reference.html +under section PYTEST_DONT_REWRITE +""" diff --git a/ocs/defaults.py b/ocs/defaults.py index 07b11da6613..d2f7e349795 100644 --- a/ocs/defaults.py +++ b/ocs/defaults.py @@ -1,5 +1,15 @@ """ -Defaults module +Defaults module. + +This module is automatically loaded with variables defined in +conf/ocsci/default_config.yaml in its DEFAULTS section. + +If the variable can be used in some config file sections from ocsci/config.py +module, plese put your defaults rather to mentioned default_config.yaml file! + +See the documentation in conf/README.md file to understand this config file. + +PYTEST_DONT_REWRITE - avoid pytest to rewrite, keep this msg here please! """ import os from getpass import getuser @@ -7,20 +17,17 @@ THIS_DIR = os.path.dirname(os.path.abspath(__file__)) TOP_DIR = os.path.dirname(THIS_DIR) TEMPLATE_DIR = os.path.join(TOP_DIR, "templates/ocs-deployment/") +STORAGE_API_VERSION = 'storage.k8s.io/v1' +ROOK_API_VERSION = 'ceph.rook.io/v1' +OCP_API_VERSION = 'project.openshift.io/v1' +OPENSHIFT_REST_CLIENT_API_VERSION = 'v1' -# This module is automatically loaded with variables defined in -# conf/ocsci/default_config.yaml in its DEFAULTS section. -# If the variable can be used in some config file sections from ocsci/config.py -# module, plese put your defaults rather to mentioned default_config.yaml file! - -# See the documentation in conf/README.md file to understand this config file. - -# Those variables are duplicate at the moment from default_config.yaml and once -# we drop support for old runner we will remove those variables from here and -# will have them defined only on one place. +# Those variables below are duplicate at the moment from default_config.yaml +# and once we drop support for old runner we will remove those variables from +# here and will have them defined only on one place. -# Be aware that variables defined below are not used anywhere in th config -# files and their sections when we rendering config! +# Be aware that variables defined above and below are not used anywhere in the +# config files and their sections when we rendering config! INSTALLER_VERSION = '4.1.0-rc.3' CLIENT_VERSION = INSTALLER_VERSION @@ -44,7 +51,3 @@ 'ceph_image': CEPH_IMAGE, 'rook_image': ROOK_IMAGE, } -STORAGE_API_VERSION = 'storage.k8s.io/v1' -ROOK_API_VERSION = 'ceph.rook.io/v1' -OCP_API_VERSION = 'project.openshift.io/v1' -OPENSHIFT_REST_CLIENT_API_VERSION = 'v1' diff --git a/ocsci/__init__.py b/ocsci/__init__.py new file mode 100644 index 00000000000..0bbae7bc0f7 --- /dev/null +++ b/ocsci/__init__.py @@ -0,0 +1,8 @@ +""" +Avoid already-imported warning cause of we are importing this package from +run wrapper for loading config. + +You can see documentation here: +https://docs.pytest.org/en/latest/reference.html +under section PYTEST_DONT_REWRITE +""" diff --git a/ocsci/config.py b/ocsci/config.py index dd65c414d23..40b1950c8e6 100644 --- a/ocsci/config.py +++ b/ocsci/config.py @@ -1,12 +1,16 @@ -# Following config variables will be loaded by ocscilib pytest plugin. -# See the conf/ocsci/default_config.yaml for default values. -# The data are combined from multiple sources and then exposed to the following -# variables. -# -# You can see the logic in ./pytest_customization/plugins/ocscilib.py. +""" +Following config variables will be loaded by ocscilib pytest plugin. +See the conf/ocsci/default_config.yaml for default values. +The data are combined from multiple sources and then exposed to the following +variables. -# Those have lowest priority and are overwritten and filled with data loaded -# during the config phase. +You can see the logic in ./pytest_customization/plugins/ocscilib.py. + +Those have lowest priority and are overwritten and filled with data loaded +during the config phase. + +PYTEST_DONT_REWRITE - avoid pytest to rewrite, keep this msg here please! +""" RUN = dict(cli_params={}) # this will be filled with CLI parameters data DEPLOYMENT = {} # deployment related data REPORTING = {} # reporting related data