Search in sources :

Example 1 with PortSubnetIpPrefixes

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixes in project netvirt by opendaylight.

the class NeutronvpnUtils method populateSubnetIpPrefixes.

protected void populateSubnetIpPrefixes(Port port) {
    List<IpPrefixOrAddress> subnetIpPrefixes = getSubnetIpPrefixes(port);
    if (subnetIpPrefixes != null) {
        String portId = port.getUuid().getValue();
        InstanceIdentifier<PortSubnetIpPrefixes> portSubnetIpPrefixIdentifier = NeutronvpnUtils.buildPortSubnetIpPrefixIdentifier(portId);
        PortSubnetIpPrefixesBuilder subnetIpPrefixesBuilder = new PortSubnetIpPrefixesBuilder().setKey(new PortSubnetIpPrefixesKey(portId)).setPortId(portId).setSubnetIpPrefixes(subnetIpPrefixes);
        MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.OPERATIONAL, portSubnetIpPrefixIdentifier, subnetIpPrefixesBuilder.build());
        LOG.debug("Created Subnet IP Prefixes for port {}", port.getUuid().getValue());
    }
}
Also used : PortSubnetIpPrefixesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixesKey) PortSubnetIpPrefixesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixesBuilder) IpPrefixOrAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.IpPrefixOrAddress) PortSubnetIpPrefixes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixes)

Aggregations

IpPrefixOrAddress (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.IpPrefixOrAddress)1 PortSubnetIpPrefixes (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixes)1 PortSubnetIpPrefixesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixesBuilder)1 PortSubnetIpPrefixesKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.ports.subnet.ip.prefixes.PortSubnetIpPrefixesKey)1