def set_queue(self, vsctl_qos, max_rate, min_rate,
                  queue_id):

        ovsrec_qos = vsctl_qos.qos_cfg[0]
        try:
            ovsrec_queue = ovsrec_qos.queues[queue_id]
        except (__HOLE__, KeyError):
            ovsrec_queue = self.txn.insert(
                self.txn.idl.tables[vswitch_idl.OVSREC_TABLE_QUEUE])
        if max_rate is not None:
            self.set_column(ovsrec_queue, 'other_config',
                            'max-rate', max_rate)
        if min_rate is not None:
            self.set_column(ovsrec_queue, 'other_config',
                            'min-rate', min_rate)
        self.set_column(ovsrec_qos, 'queues', queue_id,
                        ['uuid', str(ovsrec_queue.uuid)])
        self.add_queue_to_cache(vsctl_qos, ovsrec_queue)
        return ovsrec_queue
dataset/ETHPy150Open osrg/ryu/ryu/lib/ovs/vsctl.py/VSCtlContext.set_queue