2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.mso.adapters.vnf;
\r
23 import java.util.HashMap;
\r
24 import java.util.Map;
\r
25 import javax.xml.ws.Holder;
\r
26 import org.junit.Test;
\r
27 import org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl;
\r
28 import org.openecomp.mso.entity.MsoRequest;
\r
29 import org.openecomp.mso.openstack.beans.VnfRollback;
\r
31 public class MsoVnfAdapterImplTest {
\r
34 public void healthCheckVNFTest() {
\r
35 MsoVnfAdapterImpl instance = new MsoVnfAdapterImpl();
\r
36 instance.healthCheck();
\r
40 public void createVnfTest() {
\r
41 MsoVnfAdapterImpl instance = new MsoVnfAdapterImpl();
\r
42 MsoRequest msoRequest = new MsoRequest();
\r
43 msoRequest.setRequestId("12345");
\r
44 msoRequest.setServiceInstanceId("12345");
\r
46 Map<String, String> map = new HashMap<>();
\r
47 map.put("key1", "value1");
\r
49 instance.createVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
\r
50 "volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
\r
51 Boolean.FALSE, Boolean.TRUE, msoRequest, new Holder<>(), new Holder<>(),
\r
53 } catch (Exception e) {
\r
59 public void updateVnfTest() {
\r
60 MsoVnfAdapterImpl instance = new MsoVnfAdapterImpl();
\r
61 MsoRequest msoRequest = new MsoRequest();
\r
62 msoRequest.setRequestId("12345");
\r
63 msoRequest.setServiceInstanceId("12345");
\r
65 Map<String, String> map = new HashMap<>();
\r
66 map.put("key1", "value1");
\r
68 instance.updateVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
\r
69 "volumeGroupHeatStackId|1", "baseVfHeatStackId", "vfModuleStackId",
\r
70 "88a6ca3ee0394ade9403f075db23167e", map, msoRequest, new Holder<>(),
\r
72 } catch (Exception e) {
\r
78 public void deleteVnfTest() {
\r
79 MsoVnfAdapterImpl instance = new MsoVnfAdapterImpl();
\r
80 MsoRequest msoRequest = new MsoRequest();
\r
81 msoRequest.setRequestId("12345");
\r
82 msoRequest.setServiceInstanceId("12345");
\r
84 instance.deleteVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12", msoRequest,
\r
86 } catch (Exception e) {
\r