[ONOS-4992] Modify the return signature for FlowRuleService for consistent return object
Change-Id: I06154d79ea9d875c503369dcb77d5fffcfbd4467
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
index fa5c3c7..36b8d4c 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
@@ -206,12 +206,13 @@
public Response getFlowByAppId(@PathParam("appId") String appId) {
final ApplicationService appService = get(ApplicationService.class);
final ApplicationId idInstant = nullIsNotFound(appService.getId(appId), APP_ID_NOT_FOUND);
- final Iterable<FlowRule> flowRules = service.getFlowRulesById(idInstant);
+ final Iterable<FlowEntry> flowEntries = service.getFlowEntriesById(idInstant);
- flowRules.forEach(flow -> flowsNode.add(codec(FlowRule.class).encode(flow, this)));
+ flowEntries.forEach(flow -> flowsNode.add(codec(FlowEntry.class).encode(flow, this)));
return ok(root).build();
}
+
/**
* Removes flow rules by application ID.
* Removes a collection of flow rules generated by the given application.