public Status disconnect(Node node) { Connection connection = getConnection(node); if (connection != null) { ovsdbConnections.remove(normalizeId(node.getId().getValue())); connection.disconnect(); ovsdbInventoryService.removeNode(node); return new Status(StatusCode.SUCCESS); } else { return new Status(StatusCode.NOTFOUND); } }
public static Status convertOvsdbStatusToSalStatus(org.opendaylight.ovsdb.plugin.api.Status status){ if(status.getRequestId() != 0){ return new org.opendaylight.controller.sal.utils.Status(convertOvsdbStatusCodeToSalStatusCode(status.getCode()),status.getRequestId()); }else{ return new org.opendaylight.controller.sal.utils.Status(convertOvsdbStatusCodeToSalStatusCode(status.getCode()),status.getDescription()); } }
if (status.isSuccess()) { return Response.noContent().build();
return new Status(StatusCode.SUCCESS);