2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * =============================================================================
9 * Modifications Copyright (C) 2019 Ericsson
10 * =============================================================================
11 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 * ============LICENSE_END=========================================================
26 package org.onap.appc.instar.utils;
28 import java.io.FileInputStream;
29 import java.io.FileNotFoundException;
30 import java.io.InputStream;
32 public class InstarClientConstant {
34 public static final String INPUT_PARAM_RESPONSE_PRIFIX = "responsePrefix";
35 public static final String OUTPUT_PARAM_STATUS = "status";
36 public static final String OUTPUT_PARAM_ERROR_MESSAGE = "error-message";
37 public static final String OUTPUT_STATUS_SUCCESS = "success";
38 public static final String OUTPUT_STATUS_FAILURE = "failure";
40 public static final String INSTAR_KEYS = "instarKeys";
41 public static final String INTERFACE_IP_ADDRESS = "interface-ip-address";
42 public static final String SOURCE_SYSTEM_INSTAR = "INSTAR";
43 public static final String VNF_TYPE = "vnf-type";
44 public static final String ADDRESSFDQN = "addressfqdn";
45 public static final String VNF_NAME = "vnf-name";
46 public static final String INSTAR_KEY_VALUES = "INSTAR-KEY-VALUES";
47 public static final String INSTAR_RESPONSE_BLOCK_NAME = "vnfConfigurationParameterDetails";
48 public static final String FDQN = "fqdn";
50 public static final String MOCK_INSTAR = "mock_instar";
51 public static final String AFT_LATITUDE = "aft_latitude";
52 public static final String AFT_LONGITUDE = "aft_latitude";
53 public static final String AFT_ENVIRONMENT = "aft_environment";
54 public static final String SCLD_PLATFORM = "scld_platform";
55 public static final String AUTHORIZATION = "authorization";
56 public static final String DME2_CLIENT_TIMEOUTMS = "dme2_client_timeoutms";
57 public static final String DME2_CLIENT_SENDANDWAIT = "dme2_client_sendandwait";
58 public static final String BASE_URL = "_base_url";
59 public static final String HTTP_HEADERS = "_http_headers";
61 public static final String V6_ADDRESS = "ipaddress-v6";
62 public static final String INSTAR_V6_ADDRESS = "v6IPAddress";
63 public static final String INSTAR_V6_SUBNET = "v6Subnet";
64 public static final String INSTAR_V6_DEFAULT_GATEWAY = "v6DefaultGateway";
66 public static final String V4_ADDRESS = "ipaddress-v4";
67 public static final String INSTAR_V4_ADDRESS = "v4IPAddress";
68 public static final String INSTAR_V4_SUBNET = "v4Subnet";
69 public static final String INSTAR_V4_DEFAULT_GATEWAY = "v4DefaultGateway";
70 public static final String SUB_CONTEXT_BYIPADDRESS = "_sub_context_byipaddress";
71 public static final String SUB_CONTEXT_BYMASK = "_sub_context_bymask";
72 public static final String SUB_CONTEXT = "_sub_context";
73 public static final String URL_SUFFIX = "_suffix";
74 public static final String VERSION = "_version";
75 public static final String ENV_CONTEXT = "_env_context";
76 public static final String ROUTEOFFER = "_routeoffer";
77 public static final String APPC_PROPERTIES = "appc.properties";
78 public static final String METHOD = "_method";
79 public static final String OPERATION_GET_IPADDRESS_BY_VNF_NAME = "getIpAddressByVnf";
80 public static final String OUTBOUND_PROPERTIES = "/outbound.properties";
82 private InstarClientConstant() {}
84 public static String getEnvironmentVariable(String env) {
85 return System.getenv(env);
88 public static InputStream getInputStream(String file) throws FileNotFoundException {
89 return new FileInputStream(file);