gen_vhost.pro package

Module contents

Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_vhost is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_vhost is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class VHost with attribute(s) and method(s). Generate virtual host configuration module by template and parameters.
class gen_vhost.pro.VHost(verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking

Defined class VHost with attribute(s) and method(s). Generate virtual host configuration module by template and parameters. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
PRO_STRUCTURE - project setup (template, module).
__reader - reader API.
__writer - writer API.
__config - project setup in dict format.
methods:
__init__ - initial constructor.
get_reader - getter for template reader.
get_writer - getter for template writer.
gen_vh_module - generate virtual host file.
select_pro_type - select project type.
__str__ - dunder method for VHost.
GEN_VERBOSE = 'GEN_VHOST::PRO::VHOST'
PRO_STRUCTURE = '/../conf/project.yaml'
VERBOSE = 'ATS_UTILITIES'
gen_vh_module(module_name, verbose=False)[source]

Generate setup.py for module package.

Parameters:
  • module_name (<str>) – parameter package name.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True (success) | False.

Return type:

<bool>

Exceptions:

ATSTypeError | ATSBadCallError

get_reader()[source]

Getter for template reader.

Returns:template reader object.
Return type:<ReadTemplate>
Exceptions:None
get_writer()[source]

Getter for template writer.

Returns:template writer object.
Return type:<WriteTemplate>
Exceptions:None
select_pro_type(verbose=False)[source]

Select project type.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:template type | None.
Return type:<str> | <NoneType>
Exceptions:None