'Work function'

def work(self):

    self.check_args()
    self.get_proposed()
    self.get_existing()
    cmds = list()
    tmp_cmd = ('traffic-filter    acl    %s    %s' % (self.acl_name, self.direction))
    undo_tmp_cmd = ('undo    traffic-filter    acl    %s    %s' % (self.acl_name, self.direction))
    if (self.state == 'present'):
        if (tmp_cmd not in self.cur_cfg['acl    interface']):
            interface_cmd = ('interface    %s' % self.interface.lower())
            cmds.append(interface_cmd)
            cmds.append(tmp_cmd)
            self.cli_load_config(cmds)
            self.changed = True
            self.updates_cmd.append(interface_cmd)
            self.updates_cmd.append(tmp_cmd)
    elif (tmp_cmd in self.cur_cfg['acl    interface']):
        interface_cmd = ('interface    %s' % self.interface)
        cmds.append(interface_cmd)
        cmds.append(undo_tmp_cmd)
        self.cli_load_config(cmds)
        self.changed = True
        self.updates_cmd.append(interface_cmd)
        self.updates_cmd.append(undo_tmp_cmd)
    self.get_end_state()
    self.results['changed'] = self.changed
    self.results['proposed'] = self.proposed
    self.results['existing'] = self.existing
    self.results['end_state'] = self.end_state
    self.results['updates'] = self.updates_cmd
    self.module.exit_json(**self.results)
