'Check all input params'

def check_params(self):

    if (not self.type):
        self.module.fail_json(msg='Error:    The    value    of    type    cannot    be    empty.')
    if self.host_port:
        if (not self.host_port.isdigit()):
            self.module.fail_json(msg='Error:    Host    port    is    invalid.')
        if ((int(self.host_port) < 1) or (int(self.host_port) > 65535)):
            self.module.fail_json(msg='Error:    Host    port    is    not    in    the    range    from    1    to    65535.')
    if self.host_vpn:
        if (self.host_vpn == '_public_'):
            self.module.fail_json(msg='Error:    The    host    vpn    name    _public_    is    reserved.')
        if ((len(self.host_vpn) < 1) or (len(self.host_vpn) > 31)):
            self.module.fail_json(msg='Error:    The    host    vpn    name    length    is    not    in    the    range    from    1    to    31.')
    if ((self.type == 'vxlan') and (self.version == '5')):
        self.module.fail_json(msg='Error:    When    type    is    vxlan,    version    must    be    9.')
    if ((self.type == 'ip') and (self.version == '5') and (self.bgp_netxhop == 'enable')):
        self.module.fail_json(msg='Error:    When    type=ip    and    version=5,    bgp_netxhop    is    not    supported.')
    if ((self.host_ip and (not self.host_port)) or (self.host_port and (not self.host_ip))):
        self.module.fail_json(msg='Error:    host_ip    and    host_port    must    both    exist    or    not    exist.')
