{ 'source': 'salt://debian/files/pydmesg.py' }, { 'user': '******' }, ] } pydmesg_salt_expected = OrderedDict([('/usr/local/bin/pydmesg', pydmesg_expected)]) pydmesg_kwargs = dict(user='******', group='root', mode='0755', source='salt://debian/files/pydmesg.py') basic_template = '''#!pyobjects File.directory('/tmp', mode='1777', owner='root', group='root') ''' invalid_template = '''#!pyobjects File.fail('/tmp') ''' include_template = '''#!pyobjects include('http') ''' extend_template = '''#!pyobjects include('http') from salt.utils.pyobjects import StateFactory
{ "source": "salt://debian/files/pydmesg.py" }, { "user": "******" }, ] } pydmesg_salt_expected = OrderedDict([("/usr/local/bin/pydmesg", pydmesg_expected)]) pydmesg_kwargs = dict(user="******", group="root", mode="0755", source="salt://debian/files/pydmesg.py") basic_template = """#!pyobjects File.directory('/tmp', mode='1777', owner='root', group='root') """ invalid_template = """#!pyobjects File.fail('/tmp') """ include_template = """#!pyobjects include('http') """ extend_template = """#!pyobjects include('http') from salt.utils.pyobjects import StateFactory
pydmesg_expected = { 'file.managed': [ {'group': 'root'}, {'mode': '0755'}, {'require': [{'file': '/usr/local/bin'}]}, {'source': 'salt://debian/files/pydmesg.py'}, {'user': '******'}, ] } pydmesg_salt_expected = OrderedDict([ ('/usr/local/bin/pydmesg', pydmesg_expected) ]) pydmesg_kwargs = dict(user='******', group='root', mode='0755', source='salt://debian/files/pydmesg.py') basic_template = '''#!pyobjects File.directory('/tmp', mode='1777', owner='root', group='root') ''' invalid_template = '''#!pyobjects File.fail('/tmp') ''' include_template = '''#!pyobjects include('http') ''' extend_template = '''#!pyobjects include('http') Service.running(extend('apache'), watch=[{'file': '/etc/file'}]) '''
File = StateFactory("file") Service = StateFactory("service") pydmesg_expected = { "file.managed": [ {"group": "root"}, {"mode": "0755"}, {"require": [{"file": "/usr/local/bin"}]}, {"source": "salt://debian/files/pydmesg.py"}, {"user": "******"}, ] } pydmesg_salt_expected = OrderedDict([("/usr/local/bin/pydmesg", pydmesg_expected)]) pydmesg_kwargs = dict(user="******", group="root", mode="0755", source="salt://debian/files/pydmesg.py") basic_template = """#!pyobjects File.directory('/tmp', mode='1777', owner='root', group='root') """ invalid_template = """#!pyobjects File.fail('/tmp') """ include_template = """#!pyobjects include('http') """ extend_template = """#!pyobjects include('http') Service.running(extend('apache'), watch=[{'file': '/etc/file'}]) """