diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-06-11 16:45:47 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-06-11 17:43:03 +0200 |
commit | 076ed09e9eaeeb751ce87bac67ae0becc7b2417b (patch) | |
tree | a78613196db4710cf4b26a6149e9bba781f62f8d /v3po/v3po2vpp/src/test | |
parent | 887fb8a181146390bccb6eaf5caeb0a84659c750 (diff) |
HC2VPP-354: use hw_interface_set_mtu for Ethernet interfaces
The API was renamed by
https://gerrit.fd.io/r/#/c/12930/
The VPP change spearates setting of hardware interface
and software interface MTU.
More details:
https://git.fd.io/vpp/tree/src/vnet/MTU.md
HC supports only hardware interface MTU configuration
for Ethernet interfaces.
MTU for software interfaces (per protocol MTU) is not
supported (HC2VPP-355).
Change-Id: I7eb1cb035a7b0f428a7bc7a9bb1c73819b52f0fa
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java index eb47fddfb..6ddcc9bb2 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/EthernetCustomizerTest.java @@ -24,8 +24,8 @@ import static org.mockito.Mockito.when; import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.honeycomb.translate.write.WriteFailedException; -import io.fd.vpp.jvpp.core.dto.SwInterfaceSetMtu; -import io.fd.vpp.jvpp.core.dto.SwInterfaceSetMtuReply; +import io.fd.vpp.jvpp.core.dto.HwInterfaceSetMtu; +import io.fd.vpp.jvpp.core.dto.HwInterfaceSetMtuReply; import org.junit.Test; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; @@ -55,22 +55,22 @@ public class EthernetCustomizerTest extends WriterCustomizerTest { @Test public void testWrite() throws WriteFailedException { - when(api.swInterfaceSetMtu(any())).thenReturn(future(new SwInterfaceSetMtuReply())); + when(api.hwInterfaceSetMtu(any())).thenReturn(future(new HwInterfaceSetMtuReply())); final int mtu = 1234; customizer.writeCurrentAttributes(IF_IID, ethernet(mtu), writeContext); - verify(api).swInterfaceSetMtu(mtuSetRequest(mtu)); + verify(api).hwInterfaceSetMtu(mtuSetRequest(mtu)); } @Test public void testUpdate() throws WriteFailedException { - when(api.swInterfaceSetMtu(any())).thenReturn(future(new SwInterfaceSetMtuReply())); + when(api.hwInterfaceSetMtu(any())).thenReturn(future(new HwInterfaceSetMtuReply())); final int mtu = 5678; customizer.updateCurrentAttributes(IF_IID, mock(Ethernet.class), ethernet(mtu), writeContext); - verify(api).swInterfaceSetMtu(mtuSetRequest(mtu)); + verify(api).hwInterfaceSetMtu(mtuSetRequest(mtu)); } - private SwInterfaceSetMtu mtuSetRequest(final int mtu) { - final SwInterfaceSetMtu request = new SwInterfaceSetMtu(); + private HwInterfaceSetMtu mtuSetRequest(final int mtu) { + final HwInterfaceSetMtu request = new HwInterfaceSetMtu(); request.swIfIndex = IF_INDEX; request.mtu = (short)mtu; return request; |