'worker'

def work(self):

    self.check_params()
    evpn_config = self.get_evpn_overlay_config()
    if (not evpn_config):
        self.module.fail_json(msg='Error:    evpn-overlay    enable    is    not    configured.')
    self.config = self.get_current_config()
    if (not self.config):
        self.module.fail_json(msg=('Error:    Bgp    instance    %s    does    not    exist.' % self.bgp_instance))
    self.config_list = self.config.split('l2vpn-family    evpn')
    if (len(self.config_list) == 2):
        self.l2vpn_evpn_exist = True
    self.get_existing()
    self.get_proposed()
    if (self.peer_enable or self.advertise_router_type):
        self.config_peer()
    if self.advertise_l2vpn_evpn:
        self.config_advertise_l2vpn_evpn()
    if self.commands:
        self.cli_load_config(self.commands)
    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)
