def create_class_async(self, d: FlowMatch.Direction, qos_info: QosInfo, qid, parent, skip_filter, cleanup_rule):
    intf = (self._uplink if (d == FlowMatch.UPLINK) else self._downlink)
    gbr = qos_info.gbr
    if (gbr is None):
        gbr = self._gbr_rate
    err = TrafficClass.create_class(intf, qid, qos_info.mbr, rate=gbr, parent_qid=parent, skip_filter=skip_filter)
    err_no = int(err)
    if (err_no < 0):
        if cleanup_rule:
            cleanup_rule()
        LOG.error('qos create error: qid %d err %d', qid, err_no)
        return
    LOG.debug('create done: if: %s qid %d err %s', intf, qid, err_no)
def create_class_async(self, d: FlowMatch.Direction, qos_info: QosInfo, qid, parent, skip_filter, cleanup_rule):
    intf = (self._uplink if (d == FlowMatch.UPLINK) else self._downlink)
    gbr = qos_info.gbr
    if (gbr is None):
        gbr = self._gbr_rate
    err = TrafficClass.create_class(intf, qid, qos_info.mbr, rate=gbr, parent_qid=parent, skip_filter=skip_filter)
    err_no = int(err)
    if (err_no < 0):
        if cleanup_rule:
            cleanup_rule()
        LOG.error('qos create error: qid %d err %d', qid, err_no)
        return
    LOG.debug('create done: if: %s qid %d err %s', intf, qid, err_no)