Example #1
0
    def options(self):
        o = self._config.config['verifier']['options']
        # NOTE(retr0h): Remove verbose options added by the user while in
        # debug.
        if self._config.debug:
            o = util.filter_verbose_permutation(o)

        return util.merge_dicts(self.default_options, o)
Example #2
0
    def options(self):
        o = self._config.config["dependency"]["options"]
        # NOTE(retr0h): Remove verbose options added by the user while in
        # debug.
        if self._config.debug:
            o = util.filter_verbose_permutation(o)

        o = util.merge_dicts(self.default_options, o)
        return self.filter_options(o, self.FILTER_OPTS)
Example #3
0
    def options(self):
        if self._config.action in ["create", "destroy"]:
            return self.default_options

        o = self._config.config["provisioner"]["options"]
        # NOTE(retr0h): Remove verbose options added by the user while in
        # debug.
        if self._config.debug:
            o = util.filter_verbose_permutation(o)

        return util.merge_dicts(self.default_options, o)
Example #4
0
    def options(self):
        if self._config.action in ['create', 'destroy']:
            return self.default_options

        o = self._config.config['provisioner']['options']
        # NOTE(retr0h): Remove verbose options added by the user while in
        # debug.
        if self._config.debug:
            o = util.filter_verbose_permutation(o)

        return util.merge_dicts(self.default_options, o)
Example #5
0
def test_filter_verbose_permutation():
    options = {
        "v": True,
        "vv": True,
        "vvv": True,
        "vfoo": True,
        "foo": True,
        "bar": True,
    }

    x = {"vfoo": True, "foo": True, "bar": True}
    assert x == util.filter_verbose_permutation(options)
Example #6
0
def test_filter_verbose_permutation():
    options = {
        'v': True,
        'vv': True,
        'vvv': True,
        'vfoo': True,
        'foo': True,
        'bar': True,
    }

    x = {'vfoo': True, 'foo': True, 'bar': True}
    assert x == util.filter_verbose_permutation(options)