'worker'

def work(self):

    self.check_params()
    self.get_existing()
    self.get_proposed()
    if (self.version == 'v4'):
        self.set_ipv4_addr(self.interface, self.addr, self.mask, self.ipv4_type)
    elif ((not self.addr) and (not self.mask)):
        self.set_ipv6_enable(self.interface)
    else:
        self.set_ipv6_addr(self.interface, self.addr, self.mask)
    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)
