Add l3 attribute to network
The fix is to add l3 attribute(s) to the returned objects in get_network() and get_networks() Fixes: bug #1180971 Change-Id: I4b9c932fae90a169ad1c0119f45e90a2ee260acd
This commit is contained in:
parent
59d6ad2035
commit
eb6182fa61
@ -486,6 +486,27 @@ class QuantumRestProxyV2(db_base_plugin_v2.QuantumDbPluginV2,
|
|||||||
"network: %s"), e.message)
|
"network: %s"), e.message)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
def get_network(self, context, id, fields=None):
|
||||||
|
session = context.session
|
||||||
|
with session.begin(subtransactions=True):
|
||||||
|
net = super(QuantumRestProxyV2, self).get_network(context,
|
||||||
|
id, None)
|
||||||
|
self._extend_network_dict_l3(context, net)
|
||||||
|
return self._fields(net, fields)
|
||||||
|
|
||||||
|
def get_networks(self, context, filters=None, fields=None,
|
||||||
|
sorts=None,
|
||||||
|
limit=None, marker=None, page_reverse=False):
|
||||||
|
session = context.session
|
||||||
|
with session.begin(subtransactions=True):
|
||||||
|
nets = super(QuantumRestProxyV2,
|
||||||
|
self).get_networks(context, filters, None, sorts,
|
||||||
|
limit, marker, page_reverse)
|
||||||
|
for net in nets:
|
||||||
|
self._extend_network_dict_l3(context, net)
|
||||||
|
|
||||||
|
return [self._fields(net, fields) for net in nets]
|
||||||
|
|
||||||
def create_port(self, context, port):
|
def create_port(self, context, port):
|
||||||
"""Create a port, which is a connection point of a device
|
"""Create a port, which is a connection point of a device
|
||||||
(e.g., a VM NIC) to attach to a L2 Quantum network.
|
(e.g., a VM NIC) to attach to a L2 Quantum network.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user