'set update command'

def set_update_cmd(self):

    if (not self.changed):
        return
    if (self.state == 'present'):
        if self.vrf_changed:
            if (self.vrf != '_public_'):
                if self.route_id_changed:
                    self.updates_cmd.append(('ospf    %s    router-id    %s    vpn-instance    %s' % (self.ospf, self.route_id, self.vrf)))
                else:
                    self.updates_cmd.append(('ospf    %s    vpn-instance    %s    ' % (self.ospf, self.vrf)))
            elif self.route_id_changed:
                self.updates_cmd.append(('ospf    %s    router-id    %s' % (self.ospf, self.route_id)))
        elif self.route_id_changed:
            if (self.vrf != '_public_'):
                self.updates_cmd.append(('ospf    %s    router-id    %s    vpn-instance    %s' % (self.ospf, self.route_id, self.get_exist_vrf())))
            else:
                self.updates_cmd.append(('ospf    %s    router-id    %s' % (self.ospf, self.route_id)))
    elif self.route_id_changed:
        self.updates_cmd.append(('undo    ospf    %s' % self.ospf))
        return
    self.updates_cmd.append(('ospf    %s' % self.ospf))
    if self.description:
        if (self.state == 'present'):
            if self.description_changed:
                self.updates_cmd.append(('description    %s' % self.description))
        elif self.description_changed:
            self.updates_cmd.append('undo    description')
    if self.bandwidth_changed:
        if (self.state == 'present'):
            if (self.get_exist_bandwidth() != '100'):
                self.updates_cmd.append(('bandwidth-reference    %s' % self.get_exist_bandwidth()))
        else:
            self.updates_cmd.append('undo    bandwidth-reference')
    if (self.lsaalflag is True):
        if self.lsa_arrival_changed:
            if (self.state == 'present'):
                self.updates_cmd.append(('lsa-arrival-interval    %s' % self.get_exist_lsa_a_interval()))
            else:
                self.updates_cmd.append('undo    lsa-arrival-interval')
    if (self.lsaalflag is False):
        if self.lsa_arrival_changed:
            if (self.state == 'present'):
                if ((self.get_exist_lsa_a_max_interval() != '1000') or (self.get_exist_lsa_a_start_interval() != '500') or (self.get_exist_lsa_a_hold_interval() != '500')):
                    self.updates_cmd.append(('lsa-arrival-interval    intelligent-timer    %s    %s    %s' % (self.get_exist_lsa_a_max_interval(), self.get_exist_lsa_a_start_interval(), self.get_exist_lsa_a_hold_interval())))
            elif ((self.get_exist_lsa_a_max_interval() == '1000') and (self.get_exist_lsa_a_start_interval() == '500') and (self.get_exist_lsa_a_hold_interval() == '500')):
                self.updates_cmd.append('undo    lsa-arrival-interval')
    if (self.lsaointervalflag is False):
        if self.lsa_originate_changed:
            if (self.state == 'present'):
                if ((self.getexistlsaointerval() != '5') or (self.getexistlsaomaxinterval() != '5000') or (self.getexistlsaostartinterval() != '500') or (self.getexistlsaoholdinterval() != '1000')):
                    self.updates_cmd.append(('lsa-originate-interval    other-type    %s    intelligent-timer    %s    %s    %s' % (self.getexistlsaointerval(), self.getexistlsaomaxinterval(), self.getexistlsaostartinterval(), self.getexistlsaoholdinterval())))
            else:
                self.updates_cmd.append('undo    lsa-originate-interval')
    if (self.lsaointervalflag is True):
        if self.lsa_originate_changed:
            if (self.state == 'present'):
                self.updates_cmd.append('lsa-originate-interval    0    ')
            else:
                self.updates_cmd.append('undo    lsa-originate-interval')
    if (self.spfintervaltype == 'millisecond'):
        if self.spf_changed:
            if (self.state == 'present'):
                self.updates_cmd.append(('spf-schedule-interval    millisecond    %s' % self.get_exist_spf_milli_interval()))
            else:
                self.updates_cmd.append('undo    spf-schedule-interval')
    if (self.spfintervaltype == 'timer'):
        if self.spf_changed:
            if (self.state == 'present'):
                self.updates_cmd.append(('spf-schedule-interval    %s' % self.get_exist_spf_interval()))
            else:
                self.updates_cmd.append('undo    spf-schedule-interval')
    if (self.spfintervaltype == 'intelligent-timer'):
        if self.spf_changed:
            if (self.state == 'present'):
                if ((self.get_exist_spf_max_interval() != '5000') or (self.get_exist_spf_start_interval() != '50') or (self.get_exist_spf_hold_interval() != '200')):
                    self.updates_cmd.append(('spf-schedule-interval    intelligent-timer    %s    %s    %s' % (self.get_exist_spf_max_interval(), self.get_exist_spf_start_interval(), self.get_exist_spf_hold_interval())))
            else:
                self.updates_cmd.append('undo    spf-schedule-interval')
