Merge "Unit tests for NeutronSubnetAware"
authorMartin Sunal <msunal@cisco.com>
Mon, 27 Jun 2016 11:59:28 +0000 (11:59 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 27 Jun 2016 11:59:28 +0000 (11:59 +0000)
1  2 
neutron-mapper/src/main/java/org/opendaylight/groupbasedpolicy/neutron/mapper/mapping/NeutronSubnetAware.java

index e808fd1d705b895b322f96813bea04199c07c98e,c4971c03a305205e5f8126245825b61b91ca467e..43d21d56751bf043670f2b9f2a08f5cf8e78876e
@@@ -118,7 -118,7 +118,7 @@@ public class NeutronSubnetAware impleme
          }
          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();
  
      @Deprecated
      private void processTenantSubnet(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.subnets.rev150712.subnets.attributes.subnets.Subnet neutronSubnet, Network networkOfSubnet, TenantId tenantId, ReadWriteTransaction rwTx) {
-         Subnet subnet = null;
+         Subnet subnet;
          if (NetworkUtils.isProviderPhysicalNetwork(networkOfSubnet)) {
              // add virtual router IP only in case it is provider physical network
              subnet = createTenantSubnet(neutronSubnet, neutronSubnet.getGatewayIp());