#NEWLINE# def get_policy( table = 'filter' , chain = None , family = 'ipv4' ) : #NEWLINE# #INDENT# "\n    Return the current policy for the specified table/chain\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' iptables.get_policy filter INPUT\n\n        IPv6:\n        salt '*' iptables.get_policy filter INPUT family=ipv6\n    " #NEWLINE# if ( not chain ) : #NEWLINE# #INDENT# return 'Error: Chain needs to be specified' #NEWLINE# #UNINDENT# rules = _parse_conf ( in_mem = True , family = family ) #NEWLINE# try : #NEWLINE# #INDENT# return rules [ table ] [ chain ] [ 'policy' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# return None