Beispiel #1
0
        {
            '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
Beispiel #2
0
        {
            "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
Beispiel #3
0
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'}])
'''
Beispiel #4
0
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'}])
"""