@Nonnull
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.AfPacket> init(
- @Nonnull final InstanceIdentifier<AfPacket> id,
- @Nonnull final AfPacket readValue,
- @Nonnull final ReadContext ctx) {
- return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.AfPacketBuilder()
+ public Initialized<AfPacket> init(@Nonnull final InstanceIdentifier<AfPacket> id, @Nonnull final AfPacket readValue,
+ @Nonnull final ReadContext ctx) {
+ return Initialized.create(getCfgId(id), new AfPacketBuilder()
.setHostInterfaceName(readValue.getHostInterfaceName())
.setMac(readValue.getMac())
.build());
}
@VisibleForTesting
- static InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.AfPacket> getCfgId(
- final InstanceIdentifier<AfPacket> id) {
+ static InstanceIdentifier<AfPacket> getCfgId(final InstanceIdentifier<AfPacket> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
- .augmentation(VppInterfaceAugmentation.class)
- .child(
- org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.AfPacket.class);
+ .augmentation(VppInterfaceAugmentation.class)
+ .child(AfPacket.class);
}
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Gre> init(
- @Nonnull final InstanceIdentifier<Gre> id, @Nonnull final Gre readValue, @Nonnull final ReadContext ctx) {
+ public Initialized<Gre> init(@Nonnull final InstanceIdentifier<Gre> id, @Nonnull final Gre readValue,
+ @Nonnull final ReadContext ctx) {
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.GreBuilder()
+ new GreBuilder()
.setDst(readValue.getDst())
.setSrc(readValue.getSrc())
.setOuterFibId(readValue.getOuterFibId())
.build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Gre> getCfgId(
- final InstanceIdentifier<Gre> id) {
+ private InstanceIdentifier<Gre> getCfgId(final InstanceIdentifier<Gre> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Gre.class);
+ .child(Gre.class);
}
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface> init(
+ public Initialized<Interface> init(
@Nonnull final InstanceIdentifier<Interface> id, @Nonnull final Interface readValue,
@Nonnull final ReadContext ctx) {
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.InterfaceBuilder()
+ new InterfaceBuilder()
.setName(readValue.getName())
.setType(readValue.getType())
.setEnabled(AdminStatus.Up.equals(readValue.getAdminStatus()))
.build());
}
- public static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface> getCfgId(
- final InstanceIdentifier<Interface> id) {
- return InstanceIdentifier.create(Interfaces.class).child(
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.Interface.class,
- new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev180220.interfaces.InterfaceKey(
- id.firstKeyOf(Interface.class).getName()));
+ public static InstanceIdentifier<Interface> getCfgId(final InstanceIdentifier<Interface> id) {
+ return InstanceIdentifier.create(Interfaces.class)
+ .child(Interface.class, new InterfaceKey(id.firstKeyOf(Interface.class).getName()));
}
}
@Nonnull
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Routing> init(
- @Nonnull final InstanceIdentifier<Routing> id,
- @Nonnull final Routing readValue,
- @Nonnull final ReadContext ctx) {
- return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.RoutingBuilder()
- .setIpv4VrfId(readValue.getIpv4VrfId())
- .setIpv6VrfId(readValue.getIpv6VrfId())
- .build());
+ public Initialized<Routing> init(@Nonnull final InstanceIdentifier<Routing> id, @Nonnull final Routing readValue,
+ @Nonnull final ReadContext ctx) {
+ return Initialized.create(getCfgId(id), new RoutingBuilder()
+ .setIpv4VrfId(readValue.getIpv4VrfId())
+ .setIpv6VrfId(readValue.getIpv6VrfId())
+ .build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Routing> getCfgId(
- final InstanceIdentifier<Routing> id) {
+ private InstanceIdentifier<Routing> getCfgId(final InstanceIdentifier<Routing> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(
- org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Routing.class);
+ .child(Routing.class);
}
}
private static final Logger LOG = LoggerFactory.getLogger(L2Customizer.class);
private final InterconnectionReadUtils icReadUtils;
- public L2Customizer(@Nonnull final FutureJVppCore futureJVppCore,
- @Nonnull final NamingContext interfaceContext,
+ public L2Customizer(@Nonnull final FutureJVppCore futureJVppCore, @Nonnull final NamingContext interfaceContext,
@Nonnull final NamingContext bridgeDomainContext,
@Nonnull final InterfaceCacheDumpManager dumpManager) {
super(futureJVppCore);
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.L2> init(
- @Nonnull final InstanceIdentifier<L2> id,
- @Nonnull final L2 readValue,
- @Nonnull final ReadContext ctx) {
- final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.L2Builder
- l2Builder =
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.L2Builder();
+ public Initialized<L2> init(@Nonnull final InstanceIdentifier<L2> id, @Nonnull final L2 readValue,
+ @Nonnull final ReadContext ctx) {
+ final L2Builder l2Builder = new L2Builder();
final Interconnection interconnection = readValue.getInterconnection();
if (interconnection != null) {
return Initialized.create(getCfgId(id), l2Builder.build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.L2> getCfgId(
- final InstanceIdentifier<L2> id) {
+ private InstanceIdentifier<L2> getCfgId(final InstanceIdentifier<L2> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.L2.class);
+ .child(L2.class);
}
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterface> init(
+ public Initialized<SubInterface> init(
@Nonnull final InstanceIdentifier<SubInterface> id, @Nonnull final SubInterface readValue,
@Nonnull final ReadContext ctx) {
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterfaceBuilder()
+ new SubInterfaceBuilder()
.setEnabled(SubInterfaceStatus.Up.equals(readValue.getAdminStatus()))
.setIdentifier(readValue.getIdentifier())
.setMatch(readValue.getMatch())
.build());
}
- public static InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterface> getCfgId(
- final InstanceIdentifier<SubInterface> id) {
+ public static InstanceIdentifier<SubInterface> getCfgId(final InstanceIdentifier<SubInterface> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(SubinterfaceAugmentation.class)
.child(SubInterfaces.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterface.class,
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterfaceKey(
- id.firstKeyOf(SubInterface.class).getIdentifier()));
+ .child(SubInterface.class, new SubInterfaceKey(id.firstKeyOf(SubInterface.class).getIdentifier()));
}
}
import io.fd.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.l2.config.attributes.interconnection.BridgeBased;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.l2.config.attributes.interconnection.BridgeBasedBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.l2.config.attributes.interconnection.XconnectBased;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.l2.config.attributes.interconnection.XconnectBasedBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterface;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterfaceBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterfaceKey;
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.sub._interface.l2.config.attributes.L2> init(
- @Nonnull final InstanceIdentifier<L2> id,
- @Nonnull final L2 readValue,
- @Nonnull final ReadContext ctx) {
+ public Initialized<L2> init(@Nonnull final InstanceIdentifier<L2> id, @Nonnull final L2 readValue,
+ @Nonnull final ReadContext ctx) {
- org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.sub._interface.l2.config.attributes.L2Builder
- builder =
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.sub._interface.l2.config.attributes.L2Builder();
+ L2Builder builder = new L2Builder();
if (readValue.getInterconnection() instanceof XconnectBased) {
XconnectBased state = (XconnectBased) readValue.getInterconnection();
- builder.setInterconnection(
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.l2.config.attributes.interconnection.XconnectBasedBuilder()
- .setXconnectOutgoingInterface(state.getXconnectOutgoingInterface())
- .build());
+ builder.setInterconnection(new XconnectBasedBuilder()
+ .setXconnectOutgoingInterface(state.getXconnectOutgoingInterface())
+ .build());
} else {
BridgeBased state = (BridgeBased) readValue.getInterconnection();
- builder.setInterconnection(
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.l2.config.attributes.interconnection.BridgeBasedBuilder()
- .setBridgeDomain(state.getBridgeDomain())
- .setBridgedVirtualInterface(state.isBridgedVirtualInterface())
- .setSplitHorizonGroup(state.getSplitHorizonGroup())
- .build());
+ builder.setInterconnection(new BridgeBasedBuilder()
+ .setBridgeDomain(state.getBridgeDomain())
+ .setBridgedVirtualInterface(state.isBridgedVirtualInterface())
+ .setSplitHorizonGroup(state.getSplitHorizonGroup())
+ .build());
}
return Initialized.create(getCfgId(id), builder.setRewrite(readValue.getRewrite()).build());
}
- static InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.sub._interface.l2.config.attributes.L2> getCfgId(
- final InstanceIdentifier<L2> id) {
- return SubInterfaceCustomizer.getCfgId(RWUtils.cutId(id, SubInterface.class))
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.sub._interface.l2.config.attributes.L2.class);
+ static InstanceIdentifier<L2> getCfgId(final InstanceIdentifier<L2> id) {
+ return SubInterfaceCustomizer.getCfgId(RWUtils.cutId(id, SubInterface.class)).child(L2.class);
}
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.TapV2> init(
- @Nonnull final InstanceIdentifier<TapV2> id, @Nonnull final TapV2 readValue,
- @Nonnull final ReadContext ctx) {
+ public Initialized<TapV2> init(@Nonnull final InstanceIdentifier<TapV2> id, @Nonnull final TapV2 readValue,
+ @Nonnull final ReadContext ctx) {
// The MAC address & tag is set from interface details, those details are retrieved from cache
final InterfaceKey key = id.firstKeyOf(Interface.class);
}
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.TapV2Builder()
+ new TapV2Builder()
.setMac(new PhysAddress(vppPhysAddrToYang(ifcDetails.l2Address)))
.setHostInterfaceName(readValue.getHostInterfaceName())
.setTag(ifcDetails.tag[0] == 0
.build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.TapV2> getCfgId(
- final InstanceIdentifier<TapV2> id) {
+ private InstanceIdentifier<TapV2> getCfgId(final InstanceIdentifier<TapV2> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.TapV2.class);
+ .child(TapV2.class);
}
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VhostUser> init(
- @Nonnull final InstanceIdentifier<VhostUser> id,
- @Nonnull final VhostUser readValue,
- @Nonnull final ReadContext ctx) {
+ public Initialized<VhostUser> init(@Nonnull final InstanceIdentifier<VhostUser> id,
+ @Nonnull final VhostUser readValue, @Nonnull final ReadContext ctx) {
// The tag is set from interface details, those details are retrieved from cache
final InterfaceKey key = id.firstKeyOf(Interface.class);
final SwInterfaceDetails ifcDetails;
throw new IllegalStateException(format("Unable to find VHost interface %s", key.getName()), e);
}
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VhostUserBuilder()
+ new VhostUserBuilder()
.setRole(readValue.getRole())
.setSocket(readValue.getSocket())
.setTag(ifcDetails.tag[0] == 0
.build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VhostUser> getCfgId(
- final InstanceIdentifier<VhostUser> id) {
+ private InstanceIdentifier<VhostUser> getCfgId(final InstanceIdentifier<VhostUser> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VhostUser.class);
+ .child(VhostUser.class);
}
}
}
@Override
- public void merge(@Nonnull Builder<? extends DataObject> parentBuilder,
- @Nonnull Vxlan readValue) {
+ public void merge(@Nonnull Builder<? extends DataObject> parentBuilder, @Nonnull Vxlan readValue) {
((VppInterfaceAugmentationBuilder) parentBuilder).setVxlan(readValue);
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Vxlan> init(
+ public Initialized<Vxlan> init(
@Nonnull final InstanceIdentifier<Vxlan> id, @Nonnull final Vxlan readValue,
@Nonnull final ReadContext ctx) {
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VxlanBuilder()
+ new VxlanBuilder()
.setDst(readValue.getDst())
.setSrc(readValue.getSrc())
.setEncapVrfId(readValue.getEncapVrfId())
.build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Vxlan> getCfgId(
- final InstanceIdentifier<Vxlan> id) {
+ private InstanceIdentifier<Vxlan> getCfgId(final InstanceIdentifier<Vxlan> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Vxlan.class);
+ .child(Vxlan.class);
}
}
}
@Override
- public Initialized<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VxlanGpe> init(
- @Nonnull final InstanceIdentifier<VxlanGpe> id, @Nonnull final VxlanGpe readValue,
- @Nonnull final ReadContext ctx) {
+ public Initialized<VxlanGpe> init(@Nonnull final InstanceIdentifier<VxlanGpe> id, @Nonnull final VxlanGpe readValue,
+ @Nonnull final ReadContext ctx) {
return Initialized.create(getCfgId(id),
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VxlanGpeBuilder()
+ new VxlanGpeBuilder()
.setLocal(readValue.getLocal())
.setRemote(readValue.getRemote())
.setVni(new VxlanGpeVni(readValue.getVni()))
.build());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VxlanGpe> getCfgId(
+ private InstanceIdentifier<VxlanGpe> getCfgId(
final InstanceIdentifier<VxlanGpe> id) {
return InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.VxlanGpe.class);
+ .child(VxlanGpe.class);
}
}
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.VppInterfaceAugmentation;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Span;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.SpanBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfacesBuilder;
public Initialized<? extends DataObject> init(@Nonnull final InstanceIdentifier<MirroredInterfaces> id,
@Nonnull final MirroredInterfaces readValue,
@Nonnull final ReadContext ctx) {
- final InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces>
- cfgId =
+ final InstanceIdentifier<MirroredInterfaces> cfgId =
InterfaceCustomizer.getCfgId(RWUtils.cutId(id, Interface.class))
.augmentation(VppInterfaceAugmentation.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.interfaces._interface.Span.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces.class);
- final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces
- cfgValue = new MirroredInterfacesBuilder()
- .setMirroredInterface(Optional.ofNullable(readValue.getMirroredInterface()).orElse(Collections.emptyList())
- .stream()
- .map(mirroredInterface -> new MirroredInterfaceBuilder()
- .setState(mirroredInterface.getState())
- .withKey(new MirroredInterfaceKey(mirroredInterface.key().getIfaceRef()))
- .setIfaceRef(mirroredInterface.getIfaceRef())
- .build())
- .collect(Collectors.toList()))
+ .child(Span.class)
+ .child(MirroredInterfaces.class);
+ final MirroredInterfaces cfgValue = new MirroredInterfacesBuilder()
+ .setMirroredInterface(
+ Optional.ofNullable(readValue.getMirroredInterface()).orElse(Collections.emptyList())
+ .stream()
+ .map(mirroredInterface -> new MirroredInterfaceBuilder()
+ .setState(mirroredInterface.getState())
+ .withKey(new MirroredInterfaceKey(mirroredInterface.key().getIfaceRef()))
+ .setIfaceRef(mirroredInterface.getIfaceRef())
+ .build())
+ .collect(Collectors.toList()))
.build();
return Initialized.create(cfgId, cfgValue);
}
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev190527.interfaces._interface.sub.interfaces.sub._interface.Span;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.subinterface.span.rev190527.interfaces._interface.sub.interfaces.sub._interface.SpanBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfacesBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder;
+import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.mirrored.interfaces.MirroredInterfaceKey;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev190527.interfaces._interface.sub.interfaces.SubInterface;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.DataObject;
public Initialized<? extends DataObject> init(@Nonnull InstanceIdentifier<MirroredInterfaces> id,
@Nonnull MirroredInterfaces readValue,
@Nonnull ReadContext readContext) {
- final InstanceIdentifier<org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces>
+ final InstanceIdentifier<MirroredInterfaces>
cfgId =
SubInterfaceCustomizer.getCfgId(RWUtils.cutId(id, SubInterface.class))
.augmentation(VppSubinterfaceSpanAugmentation.class)
.child(Span.class)
- .child(org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces.class);
+ .child(MirroredInterfaces.class);
- final org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfaces
- cfgValue =
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.MirroredInterfacesBuilder()
+ final MirroredInterfaces cfgValue = new MirroredInterfacesBuilder()
.setMirroredInterface(
Optional.ofNullable(readValue.getMirroredInterface()).orElse(Collections.emptyList())
.stream()
- .map(mirroredInterface -> new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder()
- .withKey(
- new org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.v3po.rev190527.span.attributes.mirrored.interfaces.MirroredInterfaceKey(
- mirroredInterface.key().getIfaceRef()))
+ .map(mirroredInterface -> new MirroredInterfaceBuilder()
+ .withKey(new MirroredInterfaceKey(mirroredInterface.key().getIfaceRef()))
.setIfaceRef(mirroredInterface.getIfaceRef())
.setState(mirroredInterface.getState())
.build())