自己动手写OpenStack的QoS功能(4)

本文地址:http://blog.csdn.net/spch2008/article/details/9283561


数据库相应操作已完成,对OVS-Plugin进行修改。

在quantum\plugins\openvswitch\ovs_quantum_plugin.py中

使OVSQuantumPluginV2继承于上一篇所写的数据库操作类QuanlityOfServiceDbMixin。

class OVSQuantumPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
                         ovs_qos_db.QualityOfServiceDbMixin,
                         l3_db.L3_NAT_db_mixin):

在OVSQuantumPluginV2中,将相应的服务请求转到db类中去处理

    def get_ovsqoss(self, context, filters=None, fields=None):
        qoss = super(OVSQuantumPluginV2, self).get_ovsqoss(context, filters, fields)
        
        return qoss

    
    def get_ovsqos(self, context, id, fields=None):
        qos = super(OVSQuantumPluginV2, self).get_ovsqos(context, id, fields)
        
        return qos

    
    def delete_ovsqos(self, context, id):
        
        result = super(OVSQuantumPluginV2, self).delete_ovsqos(context, id)
        
        return result

    
    def update_ovsqos(self, context, id, ovsqos):
        result = super(OVSQuantumPluginV2, self).update_ovsqos(context, id, ovsqos)
        
        return result

    
    def create_ovsqos(self, context, ovsqos):
        qos = super(OVSQuantumPluginV2, self).create_ovsqos(context, ovsqos)
        
        return qos 


你可能感兴趣的:(自己动手写OpenStack的QoS功能(4))