Search in sources :

Example 81 with Path

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.

the class ArpTpaConvertor method convert.

@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
    ArpTpaCaseValue arpTpaCaseValue = (ArpTpaCaseValue) input.getMatchEntryValue();
    Ipv4Address ipv4Address = IpConverter.longToIpv4Address(arpTpaCaseValue.getArpTpaValues().getValue());
    return resolveAugmentation(new NxmOfArpTpaBuilder().setIpv4Address(ipv4Address).build(), path, NxmOfArpTpaKey.class);
}
Also used : NxmOfArpTpaBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.arp.tpa.grouping.NxmOfArpTpaBuilder) ArpTpaCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.ArpTpaCaseValue) Ipv4Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)

Example 82 with Path

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.

the class CtStateConvertor method convert.

@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
    CtStateCaseValue ctStateCaseValue = (CtStateCaseValue) input.getMatchEntryValue();
    NxmNxCtStateBuilder ctStateBuilder = new NxmNxCtStateBuilder();
    ctStateBuilder.setCtState(ctStateCaseValue.getCtStateValues().getCtState());
    ctStateBuilder.setMask(ctStateCaseValue.getCtStateValues().getMask());
    return resolveAugmentation(ctStateBuilder.build(), path, NxmNxCtStateKey.class);
}
Also used : NxmNxCtStateBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.ct.state.grouping.NxmNxCtStateBuilder) CtStateCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.CtStateCaseValue)

Example 83 with Path

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.

the class UdpSrcConvertor method convert.

@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
    UdpSrcCaseValue udpSrcCaseValue = (UdpSrcCaseValue) input.getMatchEntryValue();
    NxmOfUdpSrcBuilder udpSrcBuilder = new NxmOfUdpSrcBuilder();
    udpSrcBuilder.setPort(udpSrcCaseValue.getUdpSrcValues().getPort());
    udpSrcBuilder.setMask(udpSrcCaseValue.getUdpSrcValues().getMask());
    return resolveAugmentation(udpSrcBuilder.build(), path, NxmOfUdpSrcKey.class);
}
Also used : NxmOfUdpSrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.udp.src.grouping.NxmOfUdpSrcBuilder) UdpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.UdpSrcCaseValue)

Example 84 with Path

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.

the class RegConvertor method convert.

@SuppressWarnings("unchecked")
@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
    NxmNxRegBuilder nxRegBuilder = new NxmNxRegBuilder();
    if (!org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg.class.isAssignableFrom(input.getOxmMatchField())) {
        String msg = input.getOxmMatchField() + " does not implement " + org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg.class;
        LOG.warn(msg);
        throw new IllegalStateException(msg);
    }
    nxRegBuilder.setReg((Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg>) input.getOxmMatchField());
    RegCaseValue regCaseValue = (RegCaseValue) input.getMatchEntryValue();
    nxRegBuilder.setValue(regCaseValue.getRegValues().getValue());
    if (input.isHasMask()) {
        nxRegBuilder.setMask(regCaseValue.getRegValues().getMask());
    }
    return resolveAugmentation(nxRegBuilder.build(), path, resolveRegKey(input.getOxmMatchField()));
}
Also used : NxmNxReg(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.reg.grouping.NxmNxReg) RegCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.RegCaseValue) NxmNxRegBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.reg.grouping.NxmNxRegBuilder)

Example 85 with Path

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.

the class TcpSrcConvertor method convert.

@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
    TcpSrcCaseValue tcpSrcCaseValue = (TcpSrcCaseValue) input.getMatchEntryValue();
    NxmOfTcpSrcBuilder tcpSrcBuilder = new NxmOfTcpSrcBuilder();
    tcpSrcBuilder.setPort(tcpSrcCaseValue.getTcpSrcValues().getPort());
    tcpSrcBuilder.setMask(tcpSrcCaseValue.getTcpSrcValues().getMask());
    return resolveAugmentation(tcpSrcBuilder.build(), path, NxmOfTcpSrcKey.class);
}
Also used : NxmOfTcpSrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.of.tcp.src.grouping.NxmOfTcpSrcBuilder) TcpSrcCaseValue(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.TcpSrcCaseValue)

Aggregations

Test (org.junit.Test)45 ArrayList (java.util.ArrayList)42 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)22 TransportZone (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.TransportZone)19 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)19 Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)18 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)17 ExecutionException (java.util.concurrent.ExecutionException)16 AttributesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.AttributesBuilder)16 ByteBuf (io.netty.buffer.ByteBuf)15 ReadFailedException (org.opendaylight.controller.md.sal.common.api.data.ReadFailedException)15 TransportZones (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.TransportZones)15 Update (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Update)15 List (java.util.List)14 DataBroker (org.opendaylight.controller.md.sal.binding.api.DataBroker)14 AsPathBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.AsPathBuilder)14 Logger (org.slf4j.Logger)14 LoggerFactory (org.slf4j.LoggerFactory)14 TransportZoneKey (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.TransportZoneKey)13 BigInteger (java.math.BigInteger)12