'worker'

def work(self):

    self.check_params()
    self.ospf_info = self.get_ospf_dict(self.process_id)
    self.get_existing()
    self.get_proposed()
    if (self.state == 'present'):
        if (not self.ospf_info):
            self.create_process()
        else:
            self.merge_process()
    elif self.ospf_info:
        if self.area:
            if self.addr:
                self.remove_area_network()
            else:
                self.remove_area()
        if self.nexthop_addr:
            self.remove_nexthop()
        if ((not self.area) and (not self.nexthop_addr)):
            self.delete_process()
    else:
        self.module.fail_json(msg='Error:    ospf    process    does    not    exist')
    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
    if self.changed:
        self.results['updates'] = self.updates_cmd
    else:
        self.results['updates'] = list()
    self.module.exit_json(**self.results)
