@Override
 @Transactional
 public void deleteSecurity(String id, String idS) {
   Security s = networkServiceDescriptorRepository.findFirstById(id).getNsd_security();
   if (s.getId().equals(securityRepository.findOne(idS).getId())) {
     networkServiceDescriptorRepository.findFirstById(id).setNsd_security(null);
     securityRepository.delete(idS);
   }
 }
 @Override
 @Transactional
 public Security addSecurity(String id, Security security) {
   security = securityRepository.save(security);
   networkServiceDescriptorRepository.findFirstById(id).setNsd_security(security);
   return security;
 }
 @Override
 @Transactional
 public VNFDependency addVnfDependency(VNFDependency vnfd, String id) {
   vnfd = vnfDependencyRepository.save(vnfd);
   networkServiceDescriptorRepository.findFirstById(id).getVnf_dependency().add(vnfd);
   return vnfd;
 }
 @Override
 @Transactional
 public PhysicalNetworkFunctionDescriptor addPnfDescriptor(
     PhysicalNetworkFunctionDescriptor pnfDescriptor, String id) {
   pnfDescriptor = pnfDescriptorRepository.save(pnfDescriptor);
   networkServiceDescriptorRepository.findFirstById(id).getPnfd().add(pnfDescriptor);
   return pnfDescriptor;
 }
 @Override
 @Transactional
 public VirtualNetworkFunctionDescriptor addVnfd(
     VirtualNetworkFunctionDescriptor vnfd, String id) {
   vnfd = vnfdRepository.save(vnfd);
   networkServiceDescriptorRepository.findFirstById(id).getVnfd().add(vnfd);
   return vnfd;
 }
 @Override
 @Transactional
 public void deleteVnfd(String idNsd, String idVnfd) {
   networkServiceDescriptorRepository
       .findFirstById(idNsd)
       .getVnfd()
       .remove(vnfdRepository.findOne(idVnfd));
   vnfdRepository.delete(idVnfd);
 }
 @Override
 @Transactional
 public void deletePhysicalNetworkFunctionDescriptor(String idNsd, String idPnf) {
   networkServiceDescriptorRepository
       .findFirstById(idNsd)
       .getVnfd()
       .remove(pnfDescriptorRepository.findOne(idPnf));
   pnfDescriptorRepository.delete(idPnf);
   return;
 }