in cartography/driftdetect/cli.py [0:0]
def _build_parser(self):
"""
:rtype: argparse.ArgumentParser
:return: A drift-detection argument parser. Calling parse_args on the argument parser will return an object
which implements the driftdetect.config.Config interface.
"""
parser = argparse.ArgumentParser(
prog=self.prog,
description=(
"drift-detection takes database queries along with their expected states in the cartography-generated "
"graph database and reports the deviations."
),
epilog='For more documentation please visit: https://github.com/lyft/cartography',
)
parser.add_argument(
'-v',
'--verbose',
action='store_true',
help='Enable verbose logging for drift-detection.',
)
parser.add_argument(
'-q',
'--quiet',
action='store_true',
help='Restrict drift-detection logging to warnings and errors only.',
)
parser.add_argument(
'--neo4j-uri',
type=str,
default='bolt://localhost:7687',
help=(
'A valid Neo4j URI to sync against. See '
'https://neo4j.com/docs/api/python-driver/current/driver.html#uri for complete documentation on the '
'structure of a Neo4j URI.'
),
)
parser.add_argument(
'--neo4j-user',
type=str,
default=None,
help='A username with which to authenticate to Neo4j.'
)
parser.add_argument(
'--neo4j-password-env-var',
type=str,
default=None,
help='The name of an environment variable containing a password with which to authenticate to Neo4j.',
)
parser.add_argument(
'--neo4j-password-prompt',
action='store_true',
help=(
'Present an interactive prompt for a password with which to authenticate to Neo4j. This parameter '
'supersedes other methods of supplying a Neo4j password.'
),
)
parser.add_argument(
'--update',
action='store_true',
help='Save and updates the results of running the detector query.',
)
parser.add_argument(
'--drift-detector-directory',
type=str,
default=None,
help=(
'A path to a directory containing drift-detectors to build. Drift-detection will discover all JSON'
'files in the given directory (and its subdirectories) and construct detectors from'
'them. Drift-detection does not guarantee the order in which the detector jobs are executed.'
),
)
return parser