Hyunsun Moon
Committed by Gerrit Code Review

Fixed sona refactoring related issues

Change-Id: Ied0ce985921be2fda503fefc6af3388c5289c2d6
......@@ -18,7 +18,7 @@
category="default" url="http://onosproject.org"
featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
features="${project.artifactId}"
apps="org.onosproject.ovsdb-base,org.onosproject.openstackswitching,org.onosproject.dhcp">
apps="org.onosproject.ovsdb-base,org.onosproject.openstacknetworking,org.onosproject.dhcp">
<description>${project.description}</description>
<artifact>mvn:${project.groupId}/onos-app-cordvtn/${project.version}</artifact>
</app>
......
......@@ -304,9 +304,26 @@ public class OpenstackNetworkingManager implements OpenstackNetworkingService {
@Override
public OpenstackNetwork network(String networkId) {
return getNetworks().stream()
Collection<OpenstackSubnet> subnets = getSubnets().stream()
.filter(s -> s.networkId().equals(networkId))
.collect(Collectors.toList());
OpenstackNetwork openstackNetwork = getNetworks().stream()
.filter(n -> n.id().equals(networkId))
.findAny().orElse(null);
if (openstackNetwork == null) {
return null;
}
return OpenstackNetwork.builder()
.id(openstackNetwork.id())
.name(openstackNetwork.name())
.networkType(openstackNetwork.networkType())
.segmentId(openstackNetwork.segmentId())
.tenantId(openstackNetwork.tenantId())
.subnets(subnets)
.build();
}
@Override
......