'Check all input params'

def check_params(self):

    if self.bridge_domain_id:
        if (not self.bridge_domain_id.isdigit()):
            self.module.fail_json(msg='Error:    Bridge    domain    id    is    not    digit.')
        if ((int(self.bridge_domain_id) < 1) or (int(self.bridge_domain_id) > 16777215)):
            self.module.fail_json(msg='Error:    Bridge    domain    id    is    not    in    the    range    from    1    to    16777215.')
    if self.bind_vlan_id:
        self.is_vlan_valid(self.bind_vlan_id, 'bind_vlan_id')
    if (self.l2_sub_interface and (not self.is_l2_sub_intf_valid(self.l2_sub_interface))):
        self.module.fail_json(msg='Error:    l2_sub_interface    is    invalid.')
    if self.ce_vid:
        self.is_vlan_valid(self.ce_vid, 'ce_vid')
        if ((not self.encapsulation) or (self.encapsulation not in ['dot1q', 'qinq'])):
            self.module.fail_json(msg=("Error:    ce_vid    can    not    be    set    when    encapsulation    is    '%s'." % self.encapsulation))
        if ((self.encapsulation == 'qinq') and (not self.pe_vid)):
            self.module.fail_json(msg=("Error:    ce_vid    and    pe_vid    must    be    set    at    the    same    time    when    encapsulation    is    '%s'." % self.encapsulation))
    if self.pe_vid:
        self.is_vlan_valid(self.pe_vid, 'pe_vid')
        if ((not self.encapsulation) or (self.encapsulation != 'qinq')):
            self.module.fail_json(msg=("Error:    pe_vid    can    not    be    set    when    encapsulation    is    '%s'." % self.encapsulation))
        if (not self.ce_vid):
            self.module.fail_json(msg=("Error:    ce_vid    and    pe_vid    must    be    set    at    the    same    time    when    encapsulation    is    '%s'." % self.encapsulation))
