diff --git a/src/main/java/net/floodlightcontroller/core/IOFSwitch.java b/src/main/java/net/floodlightcontroller/core/IOFSwitch.java index d63624cbd80848777e676e2aefa8bd2164e21534..60df97b40d5b858ac3e2cc8a8ac60a8100aced8a 100644 --- a/src/main/java/net/floodlightcontroller/core/IOFSwitch.java +++ b/src/main/java/net/floodlightcontroller/core/IOFSwitch.java @@ -250,7 +250,7 @@ public interface IOFSwitch { * @return Future object wrapping OFStatisticsReply * @throws IOException */ - public Future<OFFeaturesReply> getFeaturesReplyFromSwitch() + public Future<OFFeaturesReply> querySwitchFeaturesReply() throws IOException; /** diff --git a/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java b/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java index f0389a46cfeff34baded619aa907a7103c89d934..e93b627bdb279d162e65f0b98ba371422a4eab7a 100644 --- a/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java +++ b/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java @@ -803,9 +803,11 @@ public class OFSwitchImpl implements IOFSwitch { } @Override - public Future<OFFeaturesReply> getFeaturesReplyFromSwitch() + public Future<OFFeaturesReply> querySwitchFeaturesReply() throws IOException { - OFMessage request = new OFFeaturesRequest(); + OFMessage request = + floodlightProvider.getOFMessageFactory(). + getMessage(OFType.FEATURES_REQUEST); request.setXid(getNextTransactionId()); OFFeaturesReplyFuture future = new OFFeaturesReplyFuture(threadPool, this, request.getXid()); diff --git a/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java b/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java index d810024d188877d1642d6f38868196bbe0ff3982..81f07bee01ad87ad5f04734df644c658135c77be 100644 --- a/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java +++ b/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java @@ -140,7 +140,7 @@ public class SwitchResourceBase extends ServerResource { OFFeaturesReply featuresReply = null; if (sw != null) { try { - future = sw.getFeaturesReplyFromSwitch(); + future = sw.querySwitchFeaturesReply(); featuresReply = future.get(10, TimeUnit.SECONDS); } catch (Exception e) { log.error("Failure getting features reply from switch" + sw, e); diff --git a/src/test/java/net/floodlightcontroller/util/OFMessageDamperMockSwitch.java b/src/test/java/net/floodlightcontroller/util/OFMessageDamperMockSwitch.java index 59e0a51b8b24e98449a8c7598c5cab019620eaea..616d4377c6058d8a79008b2c4dabc3cd9236efe3 100644 --- a/src/test/java/net/floodlightcontroller/util/OFMessageDamperMockSwitch.java +++ b/src/test/java/net/floodlightcontroller/util/OFMessageDamperMockSwitch.java @@ -304,7 +304,7 @@ public class OFMessageDamperMockSwitch implements IOFSwitch { } @Override - public Future<OFFeaturesReply> getFeaturesReplyFromSwitch() + public Future<OFFeaturesReply> querySwitchFeaturesReply() throws IOException { // TODO Auto-generated method stub return null;