made ctstate accept lists

pull/18777/head
Brian Coca 9 years ago committed by Matt Clay
parent d332a9a8e4
commit eb4fe5a0d8

@ -205,9 +205,8 @@ options:
required: false required: false
ctstate: ctstate:
description: description:
- "ctstate is a comma separated list of the connection states to match in - "ctstate is a list of the connection states to match in the conntrack module.
the conntrack module. Possible states are: 'INVALID', 'NEW', Possible states are: 'INVALID', 'NEW', 'ESTABLISHED', 'RELATED', 'UNTRACKED', 'SNAT', 'DNAT'"
'ESTABLISHED', 'RELATED', 'UNTRACKED', 'SNAT', 'DNAT'"
required: false required: false
''' '''
@ -264,7 +263,7 @@ def construct_rule(params):
append_comm(rule, params['comment']) append_comm(rule, params['comment'])
append_param(rule, params['comment'], '--comment', False) append_param(rule, params['comment'], '--comment', False)
append_conntrack(rule, params['ctstate']) append_conntrack(rule, params['ctstate'])
append_param(rule, params['ctstate'], '--ctstate', False) append_param(rule, ','.join(params['ctstate']), '--ctstate', False)
return rule return rule
@ -314,7 +313,7 @@ def main():
destination_port=dict(required=False, default=None, type='str'), destination_port=dict(required=False, default=None, type='str'),
to_ports=dict(required=False, default=None, type='str'), to_ports=dict(required=False, default=None, type='str'),
comment=dict(required=False, default=None, type='str'), comment=dict(required=False, default=None, type='str'),
ctstate=dict(required=False, default=None, type='str'), ctstate=dict(required=False, default=None, type='list'),
), ),
) )
args = dict( args = dict(

Loading…
Cancel
Save