private void sendHandshakeOFPortDescRequest() throws IOException { // Get port description for 1.3 switch OFPortDescStatsRequest preq = factory13 .buildPortDescStatsRequest() .setXid(handshakeTransactionIds--) .build(); channel.write(Collections.singletonList(preq)); }
/** Move the channel from scratch to WAIT_CONFIG_REPLY state * Builds on moveToWaitFeaturesReply * adds testing for WAIT_FEATURES_REPLY state */ @Test public void moveToWaitPortDescStatsReply() throws Exception { testInitState(); switchHandler.beginHandshake(); OFMessage msg = connection.retrieveMessage(); assertThat(msg, CoreMatchers.instanceOf(OFPortDescStatsRequest.class)); verifyUniqueXids(msg); assertThat(switchHandler.getStateForTesting(), CoreMatchers.instanceOf(OFSwitchHandshakeHandler.WaitPortDescStatsReplyState.class)); }
private void sendHandshakeOFPortDescRequest() throws IOException { log.debug("Sending OF_PORT_DESC_REQUEST to {}", channel.remoteAddress()); // Get port description for 1.3+ switch OFPortDescStatsRequest preq = factory .buildPortDescStatsRequest() .setXid(handshakeTransactionIds--) .build(); channel.writeAndFlush(Collections.singletonList(preq)); }