@ApiOperation( value = "Returns the list of VNF Dependency for a VNF from the NSD", notes = "Returns all the VNF Dependencies only for a specific VNF specified in the NSD") @RequestMapping( value = "{idNsd}/vnfdependencies/{idVnfd}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.OK) public VNFDependency getVNFDependency( @PathVariable("idNsd") String idNsd, @PathVariable("idVnfd") String idVnfd, @RequestHeader(value = "project-id") String projectId) throws NotFoundException { return networkServiceDescriptorManagement.getVnfDependency(idNsd, idVnfd, projectId); }
@Test @SuppressWarnings({"unsafe", "unchecked"}) public void VNFDependencyNotFoundException() throws NotFoundException { exception.expect(NotFoundException.class); when(nsdManagement.getVnfDependency(anyString(), anyString(), anyString())) .thenThrow(NotFoundException.class); restNetworkService.getVNFDependency(networkServiceDescriptor.getId(), "-1", "pi"); }