#NEWLINE# def new_table( table , family = 'ipv4' ) : #NEWLINE# #INDENT# "\n    .. versionadded:: 2014.7.0\n\n    Create new custom table.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' nftables.new_table filter\n\n        IPv6:\n        salt '*' nftables.new_table filter family=ipv6\n    " #NEWLINE# if ( not table ) : #NEWLINE# #INDENT# return 'Error: table needs to be specified' #NEWLINE# #UNINDENT# if check_table ( table , family = family ) : #NEWLINE# #INDENT# return 'Error: table {0} in family {1} already exists' . format ( table , family ) #NEWLINE# #UNINDENT# nft_family = _NFTABLES_FAMILIES [ family ] #NEWLINE# cmd = '{0} add table {1} {2}' . format ( _nftables_cmd ( ) , nft_family , table ) #NEWLINE# out = __salt__ [ 'cmd.run' ] ( cmd , python_shell = False ) #NEWLINE# if ( not out ) : #NEWLINE# #INDENT# out = True #NEWLINE# #UNINDENT# return out