@staticmethod
def create_class(intf: str, qid: int, max_bw: int, rate=None, parent_qid=None, skip_filter=False) -> int:
    if (not rate):
        rate = DEFAULT_RATE
    if (not parent_qid):
        parent_qid = ROOT_QID
    if (parent_qid == qid):
        LOG.error('parent and self qid equal, setting parent_qid to root')
        parent_qid = ROOT_QID
    qid_hex = hex(qid)
    parent_qid_hex = ('1:' + hex(parent_qid))
    err = TrafficClass.tc_ops.create_htb(intf, qid_hex, max_bw, rate, parent_qid_hex)
    if ((err < 0) or skip_filter):
        return err
    return TrafficClass.tc_ops.create_filter(intf, qid_hex, qid_hex)
@staticmethod
def create_class(intf: str, qid: int, max_bw: int, rate=None, parent_qid=None, skip_filter=False) -> int:
    if (not rate):
        rate = DEFAULT_RATE
    if (not parent_qid):
        parent_qid = ROOT_QID
    if (parent_qid == qid):
        LOG.error('parent and self qid equal, setting parent_qid to root')
        parent_qid = ROOT_QID
    qid_hex = hex(qid)
    parent_qid_hex = ('1:' + hex(parent_qid))
    err = TrafficClass.tc_ops.create_htb(intf, qid_hex, max_bw, rate, parent_qid_hex)
    if ((err < 0) or skip_filter):
        return err
    return TrafficClass.tc_ops.create_filter(intf, qid_hex, qid_hex)