'Main work function'

def work(self):

    self.check_args()
    self.get_proposed()
    self.get_existing()
    if (self.state == 'present'):
        if (('location' in self.cur_cfg.keys()) and (self.location == self.cur_cfg['location'])):
            pass
        else:
            self.set_config()
    elif (('location' in self.cur_cfg.keys()) and (self.location == self.cur_cfg['location'])):
        self.undo_config()
    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)
