'Check all input params'

def check_params(self):

    if (not self.bgp_instance):
        self.module.fail_json(msg='Error:    The    bgp_instance    can    not    be    none.')
    if ((not self.peer_enable) and (not self.advertise_router_type) and (not self.advertise_l2vpn_evpn)):
        self.module.fail_json(msg='Error:    The    peer_enable,    advertise_router_type,    advertise_l2vpn_evpn    can    not    be    none    at    the    same    time.')
    if self.as_number:
        if (not is_valid_as_number(self.as_number)):
            self.module.fail_json(msg=('Error:    The    parameter    of    as_number    %s    is    invalid.' % self.as_number))
    if self.bgp_instance:
        if (not is_valid_as_number(self.bgp_instance)):
            self.module.fail_json(msg=('Error:    The    parameter    of    bgp_instance    %s    is    invalid.' % self.bgp_instance))
    if self.peer_address:
        if (not is_valid_address(self.peer_address)):
            self.module.fail_json(msg=('Error:    The    %s    is    not    a    valid    ip    address.' % self.peer_address))
    if self.peer_group_name:
        if ((len(self.peer_group_name) > 47) or (len(self.peer_group_name.replace('    ', '')) < 1)):
            self.module.fail_json(msg='Error:    peer    group    name    is    not    in    the    range    from    1    to    47.')
    if self.vpn_name:
        if ((len(self.vpn_name) > 31) or (len(self.vpn_name.replace('    ', '')) < 1)):
            self.module.fail_json(msg='Error:    peer    group    name    is    not    in    the    range    from    1    to    31.')
