'Check whether all undo parameters is existed'

def check_undo_params_if_exist(self):

    if self.vpn_target_import:
        for ele in self.vpn_target_import:
            if ((ele not in self.evpn_info['vpn_target_import']) and (ele not in self.evpn_info['vpn_target_both'])):
                self.module.fail_json(msg=('Error:    VPN    target    import    attribute    value    %s    doesnot    exist.' % ele))
    if self.vpn_target_export:
        for ele in self.vpn_target_export:
            if ((ele not in self.evpn_info['vpn_target_export']) and (ele not in self.evpn_info['vpn_target_both'])):
                self.module.fail_json(msg=('Error:    VPN    target    export    attribute    value    %s    doesnot    exist.' % ele))
    if self.vpn_target_both:
        for ele in self.vpn_target_both:
            if (ele not in self.evpn_info['vpn_target_both']):
                self.module.fail_json(msg=('Error:    VPN    target    export    and    import    attribute    value    %s    doesnot    exist.' % ele))
