class AppcOrchestratorPreProcessor {

    protected void getVserversForAppc(BuildingBlockExecution execution, GenericVnf vnf) throws Exception {
        AAIResultWrapper aaiRW = aaiVnfResources.queryVnfWrapperById(vnf);

        if (aaiRW != null && aaiRW.getRelationships().isPresent()) {
            Relationships relationships = aaiRW.getRelationships().get();
            if (relationships != null) {
                List<AAIResourceUri> vserverUris = relationships.getRelatedUris(Types.VSERVER);
                ArrayList<String> vserverIds = new ArrayList<String>();
                ArrayList<String> vserverSelfLinks = new ArrayList<String>();
                for (AAIResourceUri j : vserverUris) {
                    String vserverId = j.getURIKeys().get(AAIFluentTypeBuilder.Types.VSERVER.getUriParams().vserverId);
                    vserverIds.add(vserverId);
                    Optional<Vserver> oVserver = aaiVnfResources.getVserver(j);
                    if (oVserver.isPresent()) {
                        Vserver vserver = oVserver.get();
                        String vserverSelfLink = vserver.getVserverSelflink();
                        vserverSelfLinks.add(vserverSelfLink);
                    }
                }
                logger.debug("vmIdsArray is: {}", vserverSelfLinks);
                logger.debug("vserverIdsArray is: {}", vserverIds);
                execution.setVariable("vmIdList", vserverSelfLinks);
                execution.setVariable("vserverIdList", vserverIds);
            }
        }
    }

}