Fixed parent of subnet in neutron mapping 71/40671/1
authorMartin Sunal <msunal@cisco.com>
Wed, 22 Jun 2016 10:20:05 +0000 (12:20 +0200)
committerMartin Sunal <msunal@cisco.com>
Wed, 22 Jun 2016 10:20:05 +0000 (12:20 +0200)
network-domain (neturon subnet) had forwarding-context (neutron subnet) as parent
but it should have forwarding-context (neutron network) as parent.

Change-Id: Ic3975a6a3386381bf25e60295fbb101b5b9ecff8
Signed-off-by: Martin Sunal <msunal@cisco.com>
neutron-mapper/src/main/java/org/opendaylight/groupbasedpolicy/neutron/mapper/mapping/NeutronSubnetAware.java

index 9381f5b0a14841e6cff888af3eb88af69469e5ec..e808fd1d705b895b322f96813bea04199c07c98e 100644 (file)
@@ -118,7 +118,7 @@ public class NeutronSubnetAware implements
         }
         ndb.setNetworkDomainId(new NetworkDomainId(subnet.getUuid().getValue()));
         ndb.setNetworkDomainType(MappingUtils.SUBNET);
-        ndb.setParent(MappingUtils.createParent(new NetworkDomainId(subnet.getUuid().getValue()), L2FloodDomain.class));
+        ndb.setParent(MappingUtils.createParent(new NetworkDomainId(subnet.getNetworkId().getValue()), L2FloodDomain.class));
         ndb.addAugmentation(SubnetAugmentForwarding.class, new SubnetAugmentForwardingBuilder().setSubnet(sb.build())
             .build());
         return ndb.build();