2 * Copyright 2016 Huawei Technologies Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.openo.nfvo.resmanagement.mocoserver;
19 import org.openo.sdno.testframework.moco.MocoHttpServer;
27 * @version NFVO 0.5 Sep 28, 2016
29 public class VimDriverSuccessServer extends MocoHttpServer {
31 private static final String GET_CPU_LIMITS = "src/integration-test/resources/mocoserver/getcpulimits.json";
33 private static final String GET_DISK_LIMITS = "src/integration-test/resources/mocoserver/getdisklimits.json";
35 private static final String GET_HOSTS_FILE = "src/integration-test/resources/mocoserver/gethosts.json";
37 private static final String GET_HOST_FILE = "src/integration-test/resources/mocoserver/gethost.json";
39 private static final String GET_NETWORKS_FILE = "src/integration-test/resources/mocoserver/getnetworks.json";
41 private static final String GET_PORTS_FILE = "src/integration-test/resources/mocoserver/getports.json";
43 private static final String SEND_ADD_MONITOR_FILE =
44 "src/integration-test/resources/mocoserver/sendmsgmonitor1.json";
46 private static final String SEND_MOD_MONITOR_FILE =
47 "src/integration-test/resources/mocoserver/sendmsgmonitor2.json";
49 private static final String SEND_DEL_MONITOR_FILE =
50 "src/integration-test/resources/mocoserver/sendmsgmonitor3.json";
52 public VimDriverSuccessServer() {
56 public VimDriverSuccessServer(int port) {
61 public void addRequestResponsePairs() {
62 this.addRequestResponsePair(GET_CPU_LIMITS);
63 this.addRequestResponsePair(GET_DISK_LIMITS);
64 this.addRequestResponsePair(GET_HOSTS_FILE);
65 this.addRequestResponsePair(GET_HOST_FILE);
66 this.addRequestResponsePair(GET_NETWORKS_FILE);
67 this.addRequestResponsePair(GET_PORTS_FILE);
68 this.addRequestResponsePair(SEND_ADD_MONITOR_FILE);
69 this.addRequestResponsePair(SEND_MOD_MONITOR_FILE);
70 this.addRequestResponsePair(SEND_DEL_MONITOR_FILE);