use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.Dhcpv6Base in project netvirt by opendaylight.
the class NeutronvpnUtils method getSubnetInfo.
@Nullable
protected List<SubnetInfo> getSubnetInfo(Port port) {
Map<FixedIpsKey, FixedIps> keyFixedIpsMap = port.getFixedIps();
if (keyFixedIpsMap == null) {
LOG.error("Failed to get Fixed IPs for the port {}", port.getName());
return null;
}
List<SubnetInfo> subnetInfoList = new ArrayList<>();
for (FixedIps portFixedIp : keyFixedIpsMap.values()) {
Uuid subnetId = portFixedIp.getSubnetId();
Subnet subnet = getNeutronSubnet(subnetId);
if (subnet != null) {
Class<? extends IpVersionBase> ipVersion = NeutronSecurityGroupConstants.IP_VERSION_MAP.get(subnet.getIpVersion());
Class<? extends Dhcpv6Base> raMode = subnet.getIpv6RaMode() == null ? null : NeutronSecurityGroupConstants.RA_MODE_MAP.get(subnet.getIpv6RaMode());
SubnetInfo subnetInfo = new SubnetInfoBuilder().withKey(new SubnetInfoKey(subnetId)).setIpVersion(ipVersion).setIpPrefix(new IpPrefixOrAddress(subnet.getCidr())).setIpv6RaMode(raMode).setGatewayIp(subnet.getGatewayIp()).build();
subnetInfoList.add(subnetInfo);
}
}
return subnetInfoList;
}
Aggregations