1d6123fd33d290b9b373e6abb8bd9d41d29d85ba
[vfc/nfvo/resmanagement.git] /
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 package org.openo.nfvo.resmanagement.mocoserver;
18
19 import org.openo.sdno.testframework.moco.MocoHttpServer;
20
21 /**
22  * <br>
23  * <p>
24  * </p>
25  * 
26  * @author
27  * @version NFVO 0.5 Sep 28, 2016
28  */
29 public class VimDriverSuccessServer extends MocoHttpServer {
30
31     private static final String GET_CPU_LIMITS = "src/integration-test/resources/mocoserver/getcpulimits.json";
32
33     private static final String GET_DISK_LIMITS = "src/integration-test/resources/mocoserver/getdisklimits.json";
34
35     private static final String GET_HOSTS_FILE = "src/integration-test/resources/mocoserver/gethosts.json";
36
37     private static final String GET_HOST_FILE = "src/integration-test/resources/mocoserver/gethost.json";
38
39     private static final String GET_NETWORKS_FILE = "src/integration-test/resources/mocoserver/getnetworks.json";
40
41     private static final String GET_PORTS_FILE = "src/integration-test/resources/mocoserver/getports.json";
42
43     private static final String SEND_ADD_MONITOR_FILE =
44             "src/integration-test/resources/mocoserver/sendmsgmonitor1.json";
45
46     private static final String SEND_MOD_MONITOR_FILE =
47             "src/integration-test/resources/mocoserver/sendmsgmonitor2.json";
48
49     private static final String SEND_DEL_MONITOR_FILE =
50             "src/integration-test/resources/mocoserver/sendmsgmonitor3.json";
51
52     public VimDriverSuccessServer() {
53         super();
54     }
55
56     public VimDriverSuccessServer(int port) {
57         super(port);
58     }
59
60     @Override
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);
71     }
72 }