diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-05-29 15:15:14 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-05-29 15:15:14 +0200 |
commit | 4dce3cd25ec520ce51da1ed34e5b439eea19232d (patch) | |
tree | 6331e0ad9aab5aad042f0629c187f70942c9ac44 /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java | |
parent | ac1c9bbcce723dbbec2d9900b7b8e2a9f32a8db6 (diff) |
cleanup v3po customizers
- remove unnecessary full paths
- reformat
Change-Id: If918be3de8b4839cd3a50d73d9de7c3e0b32ab3d
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java index 611c1942f..b83e1fba5 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/SubInterfaceL2Customizer.java @@ -28,7 +28,9 @@ import io.fd.honeycomb.translate.util.RWUtils; 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; @@ -83,37 +85,29 @@ public class SubInterfaceL2Customizer } @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); } } |