use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv6 in project lispflowmapping by opendaylight.
the class PortDataProcessor method delete.
@Override
public void delete(Port port) {
// TODO if port ips existed in MapServer, delete them. Else, log error.
LOG.info("Neutron Port Deleted: Port name: " + port.getName() + " Port Fixed IP: " + (port.getFixedIps() != null ? port.getFixedIps().get(0) : "No Fixed IP assigned"));
LOG.debug("Neutron Port Deleted : " + port.toString());
List<FixedIps> fixedIPs = port.getFixedIps();
if (fixedIPs != null && fixedIPs.size() > 0) {
Eid eidAddress;
for (FixedIps ip : fixedIPs) {
// TODO Add check/support for IPv6.
// Get subnet for this port, based on v4 or v6 decide address
// iana code.
eidAddress = LispAddressUtil.asIpv4PrefixEid(ip.getIpAddress().getIpv4Address().getValue() + "/32");
lispNeutronService.getMappingDbService().removeMapping(LispUtil.buildRemoveMappingInput(eidAddress));
LOG.info("Neutron Port mapping deleted from lisp: " + " Port Fixed IP: " + ip + "Port host IP: ");
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv6 in project lispflowmapping by opendaylight.
the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withIpv6Address.
/**
* Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with Ipv6 type address.
*/
@Test
public void getTransportAddressFromRlocTest_withIpv6Address() {
final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV6_BINARY)).setPort(new PortNumber(LispMessage.PORT_NUM)).build();
assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_IPV6));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv6 in project lispflowmapping by opendaylight.
the class LispNotificationHelperTest method getTransportAddressFromRlocTest_withApplicationDataIpv6Address.
/**
* Tests {@link LispNotificationHelper#getTransportAddressFromRloc} method with ApplicationData type Ipv6 address.
*/
@Test
public void getTransportAddressFromRlocTest_withApplicationDataIpv6Address() {
final TransportAddress result = new TransportAddressBuilder().setIpAddress(new IpAddressBinary(ADDRESS_IPV6_BINARY)).setPort(new PortNumber(PORT)).build();
assertEquals(result, LispNotificationHelper.getTransportAddressFromRloc(RLOC_APPLICATION_DATA_IPV6));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv6 in project lispflowmapping by opendaylight.
the class LispNotificationHelperTest method getMappingTest_SiteIdNotPresent.
/**
* Tests {@link LispNotificationHelper#getMapping} method with invalid address, isXtrSiteIdPresent == false.
*/
@Test
public void getMappingTest_SiteIdNotPresent() {
final MappingBuilder mappingBuilder_1 = new MappingBuilder().setMappingRecord(new MappingRecordBuilder().setEid(EID_IPV4).build()).setEidUri(new EidUri("ipv4:" + IPV4_STRING)).setOrigin(MappingOrigin.Southbound);
final MappingBuilder mappingBuilder_2 = new MappingBuilder().setMappingRecord(new MappingRecordBuilder().setEid(EID_IPV6).build()).setEidUri(new EidUri("ipv6:" + IPV6_STRING)).setOrigin(MappingOrigin.Southbound);
assertEquals(Lists.newArrayList(mappingBuilder_1.build(), mappingBuilder_2.build()), LispNotificationHelper.getMapping(getDefaultAddMapping(false)));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv6 in project bgpcep by opendaylight.
the class PMSITunnelAttributeHandlerTestUtil method buildMldpP2mpLspIpv6Attribute.
static Attributes buildMldpP2mpLspIpv6Attribute() {
final PmsiTunnelBuilder pmsiTunnelBuilder = new PmsiTunnelBuilder();
pmsiTunnelBuilder.setLeafInformationRequired(true);
pmsiTunnelBuilder.setMplsLabel(MPLS_LABEL);
pmsiTunnelBuilder.setTunnelIdentifier(buildMldpP2mpLsp(IPV6, Ipv6AddressFamily.class, createOpaqueList()));
return buildAttribute(pmsiTunnelBuilder);
}
Aggregations