use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.GetFixedIPsForNeutronPortInputBuilder in project netvirt by opendaylight.
the class InterfaceStateEventListener method getFixedIpsForPort.
private List<String> getFixedIpsForPort(String interfname) {
LOG.debug("getFixedIpsForPort : getFixedIpsForPort method is called for interface {}", interfname);
try {
Future<RpcResult<GetFixedIPsForNeutronPortOutput>> result = neutronVpnService.getFixedIPsForNeutronPort(new GetFixedIPsForNeutronPortInputBuilder().setPortId(new Uuid(interfname)).build());
RpcResult<GetFixedIPsForNeutronPortOutput> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.error("getFixedIpsForPort : RPC Call to GetFixedIPsForNeutronPortOutput returned with Errors {}", rpcResult.getErrors());
} else {
return rpcResult.getResult().getFixedIPs();
}
} catch (InterruptedException | ExecutionException | NullPointerException ex) {
LOG.error("getFixedIpsForPort : Exception while receiving fixedIps for port {}", interfname, ex);
}
return null;
}
Aggregations