'Main work function'

def work(self):

    self.check_acl_args()
    self.check_base_rule_args()
    self.get_proposed()
    self.get_existing()
    if (self.state == 'present'):
        if self.cur_acl_cfg['need_cfg']:
            self.merge_acl()
        if self.cur_base_rule_cfg['need_cfg']:
            self.merge_base_rule()
    elif (self.state == 'absent'):
        if self.cur_base_rule_cfg['need_cfg']:
            self.delete_base_rule()
    elif (self.state == 'delete_acl'):
        if self.cur_acl_cfg['need_cfg']:
            self.delete_acl()
    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)
