gen_unix_domain_socket.pro.read_template module

Module
read_template.py
Copyright
Copyright (C) 2018 Vladimir Roncevic <elektron.ronca@gmail.com> gen_unix_domain_socket 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_unix_domain_socket 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 ReadTemplate with attribute(s) and method(s). Created API for read a template file and return a content.
class gen_unix_domain_socket.pro.read_template.ReadTemplate(verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking, gen_unix_domain_socket.pro.config.template_dir.TemplateDir

Defined class ReadTemplate with attribute(s) and method(s). Created API for read a template file and return a content. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
TEMPLATE_DIR - template dir path.
__template_dir - absolute file path of template dir.
methods:
__init__ - initial constructor.
read - read a template and return a string representation.
__str__ - dunder method for ReadTemplate.
GEN_VERBOSE = 'GEN_UNIX_DOMAIN_SOCKET::PRO::READ_TEMPLATE'
TEMPLATE_DIR = '/../conf/template/'
VERBOSE = 'ATS_UTILITIES'
read(config, uds_type, verbose=False)[source]

Read a templates and return a content.

Parameters:
  • config (<dict>) – parameter file name.
  • uds_type (<str>) – parameter UDS type.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

template content list | empty list.

Return type:

<list>

Exceptions:

ATSTypeError | ATSBadCallError