'Check all input params'

def check_params(self):

    if ((not self.interface) and (not self.interface_type)):
        self.module.fail_json(msg='Error:    Interface    or    interface_type    must    be    set.')
    if (self.interface and self.interface_type):
        self.module.fail_json(msg='Error:    Interface    or    interface_type    can    not    be    set    at    the    same    time.')
    if self.interface:
        self.intf_type = get_interface_type(self.interface)
        if (not self.intf_type):
            self.module.fail_json(msg=('Error:    interface    name    of    %s    is    error.' % self.interface))
    elif self.interface_type:
        self.intf_type = get_interface_type(self.interface_type)
        if ((not self.intf_type) or (self.intf_type != self.interface_type.replace('    ', '').lower())):
            self.module.fail_json(msg=('Error:    interface    type    of    %s    is    error.' % self.interface_type))
    if (not self.intf_type):
        self.module.fail_json(msg='Error:    interface    or    interface    type    %s    is    error.')
    if ((not is_admin_state_enable(self.intf_type)) and (self.state == 'present') and (self.admin_state == 'down')):
        self.module.fail_json(msg=('Error:    The    %s    interface    can    not    be    shutdown.' % self.intf_type))
    if ((not is_portswitch_enalbe(self.intf_type)) and self.mode and (self.state == 'present')):
        self.module.fail_json(msg=('Error:    The    %s    interface    can    not    manage    Layer    2    or    Layer    3    state.' % self.intf_type))
    if self.description:
        if ((len(self.description) > 242) or (len(self.description.replace('    ', '')) < 1)):
            self.module.fail_json(msg='Error:    interface    description    is    not    in    the    range    from    1    to    242.')
    if self.l2sub:
        if (not self.interface):
            self.module.fail_json(msg='Error:    L2sub    flag    can    not    be    set    when    there    no    interface    set    with.')
        if (self.interface.count('.') != 1):
            self.module.fail_json(msg='Error:    Interface    name    is    invalid,    it    is    not    sub-interface.')
