'Check all input params'

def check_params(self):

    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))
    if (self.version == 'v4'):
        if (not is_valid_v4addr(self.addr)):
            self.module.fail_json(msg=('Error:    The    %s    is    not    a    valid    address.' % self.addr))
        if (not self.mask.isdigit()):
            self.module.fail_json(msg='Error:    mask    is    invalid.')
        if ((int(self.mask) > 32) or (int(self.mask) < 1)):
            self.module.fail_json(msg='Error:    mask    must    be    an    integer    between    1    and    32.')
    if (self.version == 'v6'):
        if self.addr:
            if (not self.mask.isdigit()):
                self.module.fail_json(msg='Error:    mask    is    invalid.')
            if ((int(self.mask) > 128) or (int(self.mask) < 1)):
                self.module.fail_json(msg='Error:    mask    must    be    an    integer    between    1    and    128.')
    self.intf_info = self.get_interface_dict(self.interface)
    if (not self.intf_info):
        self.module.fail_json(msg=('Error:    interface    %s    does    not    exist.' % self.interface))
    if (self.intf_info['isL2SwitchPort'] == 'true'):
        self.module.fail_json(msg=('Error:    interface    %s    is    layer2.' % self.interface))
