Set up the default salt payload

This commit is contained in:
Thomas S Hatch 2011-03-07 14:55:40 -07:00
parent 6833289132
commit 802f0deb45

View file

@ -20,13 +20,12 @@ def unpackage(package):
'''
return pickle.loads(package)
def format_payload(enc, cmd, **kwargs):
def format_payload(enc, **kwargs):
'''
Pass in the required arguments for a payload, the enc type and the cmd,
then a list of keyword args to generate the body of the load dict.
'''
payload = {'enc': enc}
load = {'cmd': cmd}
for key in kwargs:
load[key: kwargs[key]]
payload['load'] = load