public void startLSP(LSPTE lsp, ERO eroRSVP) {
    lsp.setEro(eroRSVP);

    boolean check = resourceManager.checkResources(lsp);
    if (check == false) {
      // No Resources Available --> Remove LSP from List
      LSPList.remove(new LSPKey(localIP, lsp.getIdLSP()));

      // FIXME: Crear el pathErr para enviar
      // Creamos Path Error Message
      RSVPPathErrMessage PathErr = new RSVPPathErrMessage();
      log.warning("There are no resources available");
    } else {
      // FIXME: ver si añadimos la lambda al LSP en otro momento o no
      // de momento la información de lambda asociada la tenemos en el RSVP Manager
      // lsp.setLambda(resourceManager.getLambda());
      Inet4Address prox = null;
      RSVPTEPathMessage path = resourceManager.getRSVPTEPathMessageFromPCEPResponse(lsp);
      // prox = (resourceManager.getProxHopIPv4List()).get(new
      // LSPKey((resourceManager.getProxHopIPv4List()).keys().nextElement().getSourceAddress(),
      // (resourceManager.getProxHopIPv4List()).keys().nextElement().getLspId()));
      prox =
          (resourceManager.getProxHopIPv4List()).get(new LSPKey(lsp.getIdSource(), lsp.getIdLSP()));
      timeEnd_Node = System.nanoTime();
      log.info(
          "LSP Time to Process RSVP Path Mssg in Node (ms): "
              + ((timeEnd_Node - timeIni_Node) / 1000000)
              + " --> Sending RSVP path Message to "
              + prox.toString()
              + " !");
      sendRSVPMessage(path, prox);
    }
  }
  /**
   * startLSP() Envía y recibe la respuesta del PCE con la ruta calculada Se encarga de crear el
   * mensaje RSVP path y enviarlo al primera nodo de destino
   *
   * <p>Hay que comprobar si tenemos interfaz disponible en el roadm para que enviar los datos. *
   *
   * @throws LSPCreationException
   */
  public void startLSP(LSPTE lsp) throws LSPCreationException {
    // Get specific request from Resource Manager
    PCEPRequest req = resourceManager.getPCEPRequest(lsp);
    // Send Request to the PCE
    PCEPResponse pr;

    try {
      pr = pcc.getCrm().newRequest(req);
    } catch (Exception e) {
      log.info(UtilsFunctions.exceptionToString(e));
      throw new LSPCreationException(LSPCreationErrorTypes.ERROR_REQUEST);
    }
    // No Response from PCE
    if (pr == null) {
      LSPList.remove(new LSPKey(localIP, lsp.getIdLSP()));
      throw new LSPCreationException(LSPCreationErrorTypes.NO_RESPONSE);
    }
    Response resp = pr.getResponse(0);
    // Response No Path from PCE
    if (resp.getNoPath() != null) {
      log.info("Response : No PATH: --> " + resp.getNoPath().toString());
      lsp.setPcepResponse(resp);
      LSPList.remove(new LSPKey(localIP, lsp.getIdLSP()));
      throw new LSPCreationException(LSPCreationErrorTypes.NO_PATH);
    }
    ERO eroRSVP = new ERO();
    if (rsvpMode == false) {
      log.info("Response : " + pr.toString());
      log.info("RSVP Mode false --> enviamos Notify LSP Established");
      established = true;
      lsp.setPcepResponse(resp);

      LinkedList<EROSubobject> clone =
          (LinkedList<EROSubobject>)
              resp.getPathList().get(0).geteRO().getEROSubobjectList().clone();
      eroRSVP.setEroSubobjects(clone);
      lsp.setEro(eroRSVP);
    } else {
      log.info("Response : " + pr.toString());
      // saveEroStats(resp.getPath(0).geteRO());
      // Response OK
      lsp.setPcepResponse(resp);
      if (resp.getPathList().get(0).geteRO() != null) {
        LinkedList<EROSubobject> clone =
            (LinkedList<EROSubobject>)
                resp.getPathList().get(0).geteRO().getEROSubobjectList().clone();
        eroRSVP.setEroSubobjects(clone);
        lsp.setEro(eroRSVP);

        boolean check = resourceManager.checkResources(lsp);
        if (check == false) {
          // No Resources Available --> Remove LSP from List
          LSPList.remove(new LSPKey(localIP, lsp.getIdLSP()));

          // FIXME: Crear el pathErr para enviar
          // Creamos Path Error Message
          RSVPPathErrMessage PathErr = new RSVPPathErrMessage();
          log.warning("There are no resources available");
          throw new LSPCreationException(LSPCreationErrorTypes.NO_RESOURCES);
        } else {
          // FIXME: ver si añadimos la lambda al LSP en otro momento o no
          // de momento la información de lambda asociada la tenemos en el RSVP Manager
          // lsp.setLambda(resourceManager.getLambda());
          Inet4Address prox = null;
          RSVPTEPathMessage path = resourceManager.getRSVPTEPathMessageFromPCEPResponse(lsp);
          // prox = (resourceManager.getProxHopIPv4List()).get(new
          // LSPKey((resourceManager.getProxHopIPv4List()).keys().nextElement().getSourceAddress(),
          // (resourceManager.getProxHopIPv4List()).keys().nextElement().getLspId()));
          prox =
              (resourceManager.getProxHopIPv4List())
                  .get(new LSPKey(lsp.getIdSource(), lsp.getIdLSP()));
          timeEnd_Node = System.nanoTime();
          log.info(
              "LSP Time to Process RSVP Path Mssg in Node (ms): "
                  + ((timeEnd_Node - timeIni_Node) / 1000000)
                  + " --> Sending RSVP path Message to "
                  + prox.toString()
                  + " !");
          sendRSVPMessage(path, prox);
        }
      } else if (resp.getPathList().get(0).geteRO() != null) {
        ExplicitRouteObject srero = new ExplicitRouteObject();
        LinkedList<EROSubobject> clone =
            (LinkedList<EROSubobject>)
                resp.getPathList().get(0).geteRO().getEROSubobjectList().clone();
        srero.setEROSubobjectList(clone);
        lsp.setSRERO(srero);
        log.info("SID encontrado: " + srero.toString());

        //				boolean check = resourceManager.checkResources(lsp);
        //				if (check==false){
        //					// No Resources Available --> Remove LSP from List
        //					LSPList.remove(new LSPKey(localIP, lsp.getIdLSP()));
        //
        //					//FIXME: Crear el pathErr para enviar
        //					//Creamos Path Error Message
        //					RSVPPathErrMessage PathErr = new RSVPPathErrMessage();
        //					log.warning("There are no resources available");
        //					throw new LSPCreationException(LSPCreationErrorTypes.NO_RESOURCES);
        //				}else{
        //					//FIXME: ver si añadimos la lambda al LSP en otro momento o no
        //					// de momento la información de lambda asociada la tenemos en el RSVP Manager
        //					//lsp.setLambda(resourceManager.getLambda());
        //					Inet4Address prox = null;
        //					RSVPTEPathMessage path = resourceManager.getRSVPTEPathMessageFromPCEPResponse(lsp);
        //					//prox = (resourceManager.getProxHopIPv4List()).get(new
        // LSPKey((resourceManager.getProxHopIPv4List()).keys().nextElement().getSourceAddress(),
        // (resourceManager.getProxHopIPv4List()).keys().nextElement().getLspId()));
        //					prox = (resourceManager.getProxHopIPv4List()).get(new LSPKey(lsp.getIdSource(),
        // lsp.getIdLSP()));
        //					timeEnd_Node=System.nanoTime();
        //					log.info("LSP Time to Process RSVP Path Mssg in Node (ms):
        // "+((timeEnd_Node-timeIni_Node)/1000000) + " --> Sending RSVP path Message to
        // "+prox.toString()+" !");
        //					sendRSVPMessage(path,prox);
        //				}

      }
    }
  }