allocate_dynamic_segment() returns different segment dicts if segment exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Low
|
Unassigned |
Bug Description
neutron.
class TestMultiSegmen
...
def test_allocate_
data = {'network': {'name': 'net1',
network_req = self.new_
network = self.deserializ
segment = {driver_
network_id = network[
seg1 = self.driver.
seg2 = self.driver.
Which results in this output:
testtools.
reference = {'id': 'a5c92a94-
'mtu': 1500,
'network_type': 'vlan',
'physical_
'segmentation_id': 83}
actual = {'id': 'a5c92a94-
'network_id': '9ac10cc3-
'network_type': 'vlan',
'physical_
'segmentation_id': 83}
This was tested on current neutron master (98c934ef6a8041
The easiest way to fix this would probably be to just fetch the segment again from the db if it was created. Then we also would not be at the mercy of whatever the typedriver returns on create, though this would result in an extra query on segment create. The other option I see would be to make _make_segment_
tags: | added: low-hanging-fruit |
tags: | added: ml2 |
Changed in neutron: | |
importance: | Undecided → Low |
Hello Sebastian:
How are you calling this method? Although this method belongs to the PortContext API, so far there is no active project using it [1]. Can you provide this info?
Regards.
[1]https:/ /codesearch. openstack. org/?q= allocate_ dynamic_ segment& i=nope& files=& excludeFiles= &repos=