use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService in project genius by opendaylight.
the class ArpUtilImpl method getEgressAction.
private List<Action> getEgressAction(String interfaceName) {
List<Action> actions = new ArrayList<>();
try {
GetEgressActionsForInterfaceInputBuilder egressAction = new GetEgressActionsForInterfaceInputBuilder().setIntfName(interfaceName);
OdlInterfaceRpcService intfRpc = odlInterfaceRpcService;
if (intfRpc == null) {
LOG.error("Unable to obtain interfaceMgrRpc service, ignoring egress actions for interfaceName {}", interfaceName);
return actions;
}
Future<RpcResult<GetEgressActionsForInterfaceOutput>> result = intfRpc.getEgressActionsForInterface(egressAction.build());
RpcResult<GetEgressActionsForInterfaceOutput> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}", interfaceName, rpcResult.getErrors());
} else {
actions = rpcResult.getResult().getAction();
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("Exception when egress actions for interface {}", interfaceName, e);
}
return actions;
}
Aggregations