@Override public void execute() { CallContext.current().setEventDetails("TrafficType Id: " + getEntityId()); PhysicalNetworkTrafficType result = _networkService.getPhysicalNetworkTrafficType(getEntityId()); if (result != null) { TrafficTypeResponse response = _responseGenerator.createTrafficTypeResponse(result); response.setResponseName(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException( ApiErrorCode.INTERNAL_ERROR, "Failed to add traffic type to physical network"); } }
@Override public void execute() { PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType( getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), getHypervLabel(), getOvm3Label()); if (result != null) { TrafficTypeResponse response = _responseGenerator.createTrafficTypeResponse(result); response.setResponseName(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update traffic type"); } }