Exemplo n.º 1
0
def render(template, saltenv='base', sls='',
           tmplpath=None, rendered_sls=None, **kwargs):
    pillar = __pillar__
    grains = __grains__
    salt = __salt__

    exec(template.read())
    return default_registry.salt_data()
Exemplo n.º 2
0
def render(template,
           saltenv='base',
           sls='',
           tmplpath=None,
           rendered_sls=None,
           **kwargs):
    pillar = __pillar__
    grains = __grains__
    salt = __salt__

    exec(template.read())
    return default_registry.salt_data()
Exemplo n.º 3
0
    def test_salt_data(self):
        File.managed('/usr/local/bin/pydmesg',
                     require=File('/usr/local/bin'),
                     **pydmesg_kwargs)

        self.assertEqual(
            default_registry.states['/usr/local/bin/pydmesg'](),
            pydmesg_expected
        )

        self.assertEqual(
            default_registry.salt_data(),
            pydmesg_salt_expected
        )

        self.assertEqual(
            default_registry.states,
            OrderedDict()
        )