2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.network;
\r
23 import java.util.ArrayList;
\r
25 import org.junit.Ignore;
\r
26 import org.junit.Test;
\r
27 import org.openecomp.mso.entity.MsoRequest;
\r
28 import org.openecomp.mso.openstack.beans.NetworkRollback;
\r
30 public class MsoNetworkAdapterAsyncImplTest {
\r
33 public void healthCheckATest() {
\r
34 MsoNetworkAdapterAsyncImpl mNAAimpl = new MsoNetworkAdapterAsyncImpl();
\r
35 mNAAimpl.healthCheckA();
\r
39 @Ignore // 1802 merge
\r
40 public void rollbackNetworkATest() {
\r
41 NetworkRollback nrb = new NetworkRollback();
\r
42 nrb.setCloudId("cloudId");
\r
43 nrb.setMsoRequest(new MsoRequest());
\r
44 nrb.setModelCustomizationUuid("modelCustomizationUuid");
\r
45 nrb.setNetworkCreated(true);
\r
46 nrb.setNetworkId("networkId");
\r
47 nrb.setNetworkName("networkName");
\r
48 nrb.setNetworkStackId("networkStackId");
\r
49 nrb.setNetworkType("networkType");
\r
50 nrb.setNeutronNetworkId("neutronNetworkId");
\r
51 nrb.setPhysicalNetwork("physicalNetwork");
\r
52 nrb.setTenantId("tenantId");
\r
53 nrb.setVlans(new ArrayList<>());
\r
55 MsoNetworkAdapterAsyncImpl impl = new MsoNetworkAdapterAsyncImpl();
\r
56 impl.rollbackNetworkA(nrb, "messageId", "/notificationUrl");
\r
60 @Ignore // 1802 merge
\r
61 public void deleteNetworkATest() {
\r
62 MsoNetworkAdapterAsyncImpl impl = new MsoNetworkAdapterAsyncImpl();
\r
63 impl.deleteNetworkA("cloudSiteId", "tenantId", "networkType", "modelCustomizationUuid", "networkId",
\r
64 "messageId", new MsoRequest(), "/notificationUrl");
\r
68 @Ignore // 1802 merge
\r
69 public void updateNetworkATest() {
\r
70 MsoNetworkAdapterAsyncImpl impl = new MsoNetworkAdapterAsyncImpl();
\r
71 impl.updateNetworkA("cloudSiteId", "tenantId", "networkType", "modelCustomizationUuid", "networkId",
\r
72 "networkName", "physicalNetworkName", new ArrayList<>(), new ArrayList<>(), "messageId",
\r
73 new MsoRequest(), "/notificationUrl");
\r
77 @Ignore // 1802 merge
\r
78 public void queryNetworkATest() {
\r
79 MsoNetworkAdapterAsyncImpl impl = new MsoNetworkAdapterAsyncImpl();
\r
80 impl.queryNetworkA("cloudSiteId", "tenantId", "networkNameOrId", "messageId", new MsoRequest(),
\r
81 "/notificationUrl");
\r
85 @Ignore // 1802 merge
\r
86 public void createNetworkATest() {
\r
87 MsoNetworkAdapterAsyncImpl impl = new MsoNetworkAdapterAsyncImpl();
\r
88 impl.createNetworkA("cloudSiteId", "tenantId", "networkType", "modelCustomizationUuid", "networkName",
\r
89 "physicalNetworkName", new ArrayList<>(), false, false, new ArrayList<>(), "messageId",
\r
90 new MsoRequest(), "/notificationUrl");
\r