fix so cisco plugin db model to not override count methods
bug 1083696 also fixes bug 1083180, which has L3 plugin base class implement get_*_count methods and raise NotImplemented, which is the "right" thing to do from a code-as-documentation perspective. Change-Id: I0367953bcea930b1ca70e416d3de22eeea1aa99d
This commit is contained in:
parent
4a4626282b
commit
78eb1a0d53
@ -249,3 +249,9 @@ class RouterPluginBase(object):
|
|||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_floatingips(self, context, filters=None, fields=None):
|
def get_floatingips(self, context, filters=None, fields=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def get_routers_count(self, context, filters=None):
|
||||||
|
raise qexception.NotImplementedError()
|
||||||
|
|
||||||
|
def get_floatingips_count(self, context, filters=None):
|
||||||
|
raise qexception.NotImplementedError()
|
||||||
|
@ -289,10 +289,6 @@ class VirtualPhysicalSwitchModelV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
|||||||
"""For this model this method will be delegated to vswitch plugin"""
|
"""For this model this method will be delegated to vswitch plugin"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_networks_count(self, context, filters=None):
|
|
||||||
"""For this model this method will be delegated to vswitch plugin"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def create_port(self, context, port):
|
def create_port(self, context, port):
|
||||||
"""For this model this method will be delegated to vswitch plugin"""
|
"""For this model this method will be delegated to vswitch plugin"""
|
||||||
pass
|
pass
|
||||||
@ -305,10 +301,6 @@ class VirtualPhysicalSwitchModelV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
|||||||
"""For this model this method will be delegated to vswitch plugin"""
|
"""For this model this method will be delegated to vswitch plugin"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_ports_count(self, context, filters=None):
|
|
||||||
"""For this model this method will be delegated to vswitch plugin"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def update_port(self, context, id, port):
|
def update_port(self, context, id, port):
|
||||||
"""For this model this method will be delegated to vswitch plugin"""
|
"""For this model this method will be delegated to vswitch plugin"""
|
||||||
pass
|
pass
|
||||||
@ -336,7 +328,3 @@ class VirtualPhysicalSwitchModelV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
|||||||
def get_subnets(self, context, filters=None, fields=None):
|
def get_subnets(self, context, filters=None, fields=None):
|
||||||
"""For this model this method will be delegated to vswitch plugin"""
|
"""For this model this method will be delegated to vswitch plugin"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_subnets_count(self, context, filters=None):
|
|
||||||
"""For this model this method will be delegated to vswitch plugin"""
|
|
||||||
pass
|
|
||||||
|
@ -117,6 +117,7 @@ class L3NatExtensionTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
instance = self.plugin.return_value
|
instance = self.plugin.return_value
|
||||||
instance.create_router.return_value = return_value
|
instance.create_router.return_value = return_value
|
||||||
|
instance.get_routers_count.return_value = 0
|
||||||
|
|
||||||
res = self.api.post_json(_get_path('routers'), data)
|
res = self.api.post_json(_get_path('routers'), data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user