How to use the watchmaker.Arguments function in watchmaker

To help you get started, we’ve selected a few watchmaker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plus3it / watchmaker / tests / test_watchmaker.py View on Github external
def test_none_arguments():
    """Check string 'None' conversion to None."""
    raw_arguments = {
        'admin_groups': 'None',
        'admin_users': 'None',
        'computer_name': 'None',
        'salt_states': 'None',
        'ou_path': 'None'
    }
    watchmaker_arguments = watchmaker.Arguments(**dict(**raw_arguments))

    assert not watchmaker_arguments.admin_groups
    assert not watchmaker_arguments.admin_users
    assert not watchmaker_arguments.computer_name
    assert not watchmaker_arguments.salt_states
    assert not watchmaker_arguments.ou_path
github plus3it / watchmaker / src / watchmaker / cli.py View on Github external
def main(extra_arguments=None, **kwargs):
    """Entry point for Watchmaker cli."""
    prepare_logging(kwargs['log_dir'], kwargs['log_level'])

    sys.excepthook = exception_hook

    watchmaker_arguments = watchmaker.Arguments(**dict(
        extra_arguments=extra_arguments,
        **kwargs
    ))
    watchmaker_client = watchmaker.Client(watchmaker_arguments)
    sys.exit(watchmaker_client.install())