use of org.onap.so.entity.MsoRequest in project so by onap.
the class MsoVnfAdapterImplTest method updateVnfTest_HeatStackNotFound.
@Test
public void updateVnfTest_HeatStackNotFound() throws Exception {
expectedException.expect(VnfNotFound.class);
MsoRequest msoRequest = getMsoRequest();
mockOpenStackResponseAccess(wireMockServer, wireMockPort);
Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId", "88a6ca3ee0394ade9403f075db23167e", map, msoRequest, new Holder<Map<String, String>>(), new Holder<VnfRollback>());
}
use of org.onap.so.entity.MsoRequest in project so by onap.
the class MsoVnfAdapterImplTest method deleteVnfTest.
@Test
@Ignore
public void deleteVnfTest() throws MsoException {
Map<String, Object> outputs = new HashMap<>();
outputs.put("Key1", "value1");
when(heatUtils.queryStackForOutputs("mdt1", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12")).thenReturn(outputs);
MsoVnfAdapterImpl instance = new MsoVnfAdapterImpl();
MsoRequest msoRequest = getMsoRequest();
try {
instance.deleteVfModule("mdt1", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12", null, msoRequest, new Holder<Map<String, String>>());
} catch (Exception e) {
}
assertNotNull(outputs);
}
use of org.onap.so.entity.MsoRequest in project so by onap.
the class MsoVnfAdapterImplTest method createVnfTest_ExceptionInGettingNestedHeat.
@Test
public void createVnfTest_ExceptionInGettingNestedHeat() throws Exception {
expectedException.expect(VnfException.class);
mockOpenStackResponseAccess(wireMockServer, wireMockPort);
mockOpenStackGetStackVfModule_404(wireMockServer);
wireMockServer.stubFor(get(urlPathEqualTo("/mockPublicUrl/stacks/volumeGroupHeatStackId")).willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR)));
MsoRequest msoRequest = getMsoRequest();
Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, msoRequest, new Holder<>());
}
use of org.onap.so.entity.MsoRequest in project so by onap.
the class MsoVnfAdapterImplTest method createVnfTest_NestedHeatStatusNotFound.
@Test
public void createVnfTest_NestedHeatStatusNotFound() throws Exception {
expectedException.expect(VnfException.class);
mockOpenStackResponseAccess(wireMockServer, wireMockPort);
mockOpenStackGetStackVfModule_404(wireMockServer);
MsoRequest msoRequest = getMsoRequest();
Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD", "volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, msoRequest, new Holder<>());
}
use of org.onap.so.entity.MsoRequest in project so by onap.
the class MsoVnfAdapterImplTest method updateVnfTest_CloudSiteIdNotFound.
@Test
public void updateVnfTest_CloudSiteIdNotFound() throws Exception {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mdt1", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD", "volumeGroupHeatStackId|1", "baseVfHeatStackId", "vfModuleStackId", "88a6ca3ee0394ade9403f075db23167e", map, msoRequest, new Holder<Map<String, String>>(), new Holder<VnfRollback>());
}
Aggregations