def configure(self, syntax=None, integrity=None, topology=None,
dpath=None, dext=None, debug=None, pkg_signature=None,
pkg_pubkey=None):
"""
Configure parameters for validation. It is recommended to call this
function before performing a validation.
:param syntax: specifies whether to validate syntax
:param integrity: specifies whether to validate integrity
:param topology: specifies whether to validate network topology
:param dpath: directory to search for function descriptors (VNFDs)
:param dext: extension of descriptor files (default: 'yml')
:param debug: increase verbosity level of logger
:param pkg_signature: String package signature to be validated
:param pkg_pubkey: String package public key to verify signature
"""
# assign parameters
if syntax is not None:
self._syntax = syntax
if integrity is not None:
self._integrity = integrity
if topology is not None:
self._topology = topology
if dext is not None:
self._dext = dext
if dpath is not None:
self._dpath = dpath
if debug is True:
self._workspace.log_level = 'debug'
coloredlogs.install(level='debug')
if debug is False:
self._workspace.log_level = 'info'
coloredlogs.install(level='info')
if pkg_signature is not None:
self._pkg_signature = pkg_signature
if pkg_pubkey is not None:
self._pkg_pubkey = pkg_pubkey
评论列表
文章目录