RPKI Engine
1.0
|
Public Member Functions | |
def | __init__ |
def | get |
def | getboolean |
def | getint |
def | getlong |
def | has_option |
def | has_section |
def | multiget |
def | set_global_flags |
Public Attributes | |
cfg | |
default_section | |
filename | |
Private Member Functions | |
def | _repl |
Static Private Attributes | |
tuple | _regexp = re.compile("\\${(.*?)::(.*?)}") |
Extensions to stock Python ConfigParser: Read config file and set default section while initializing parser object. Support for OpenSSL-style subscripted options and a limited form of OpenSSL-style indirect variable references (${section::option}). get-methods with default values and default section name. If no filename is given to the constructor (filename = None), we check for an environment variable naming the config file, then we check for a default filename in the current directory, then finally we check for a global config file if autoconf provided a directory name to check.
def rpki::config::parser::__init__ | ( | self, | |
filename = None , |
|||
section = None , |
|||
allow_missing = False |
|||
) |
def rpki::config::parser::_repl | ( | self, | |
m | |||
) | [private] |
def rpki::config::parser::get | ( | self, | |
option, | |||
default = None , |
|||
section = None |
|||
) |
Get an option, perhaps with a default value.
Definition at line 151 of file config.py.
References _repl(), and default_section.
Referenced by getboolean(), getint(), getlong(), multiget(), and set_global_flags().
def rpki::config::parser::getboolean | ( | self, | |
option, | |||
default = None , |
|||
section = None |
|||
) |
Get a boolean option, perhaps with a default value.
Definition at line 165 of file config.py.
Referenced by set_global_flags().
def rpki::config::parser::getint | ( | self, | |
option, | |||
default = None , |
|||
section = None |
|||
) |
Get an integer option, perhaps with a default value.
Definition at line 177 of file config.py.
References get().
Referenced by set_global_flags().
def rpki::config::parser::getlong | ( | self, | |
option, | |||
default = None , |
|||
section = None |
|||
) |
def rpki::config::parser::has_option | ( | self, | |
option, | |||
section = None |
|||
) |
Test whether an option exists.
Definition at line 110 of file config.py.
References default_section.
def rpki::config::parser::has_section | ( | self, | |
section | |||
) |
def rpki::config::parser::multiget | ( | self, | |
option, | |||
section = None |
|||
) |
Parse OpenSSL-style foo.0, foo.1, ... subscripted options. Returns a list of values matching the specified option name.
Definition at line 119 of file config.py.
References default_section, and get().
def rpki::config::parser::set_global_flags | ( | self | ) |
Consolidated control for all the little global control flags scattered through the libraries. This isn't a particularly good place for this function to live, but it has to live somewhere and making it a method of the config parser from which it gets all of its data is less silly than the available alternatives.
Definition at line 189 of file config.py.
References get(), getboolean(), and getint().
tuple rpki::config::parser::_regexp = re.compile("\\${(.*?)::(.*?)}") [static, private] |
Definition at line 73 of file config.py.
Referenced by rpki::myrpki::main::do_configure_daemons(), getboolean(), rpki::myrpki::CA::run_ca(), and rpki::myrpki::CA::run_req().
Definition at line 73 of file config.py.
Referenced by get(), has_option(), and multiget().
Definition at line 73 of file config.py.
Referenced by rpki::myrpki::csv_reader::__iter__(), rpki::x509::DER_object::check_auto_update(), rpki::myrpki::csv_writer::close(), and rpki::rcynic::validation_status_element::get_obj().