d94641846db2800c065af3c4ad76edd4fcc2a598
[so.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2020 Nordix Foundation.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.bpmn.infrastructure.service.level.impl;
22
23 import java.util.Arrays;
24 import java.util.List;
25 import java.util.Map;
26
27 public class ServiceLevelConstants {
28     public static final String BPMN_REQUEST = "bpmnRequest";
29     public static final String RESOURCE_TYPE = "resourceType";
30     public static final String SERVICE_INSTANCE_ID = "serviceInstanceId";
31     public static final String PNF_NAME = "pnfName";
32     public static final String PNF = "pnf";
33     public static final String VNF = "vnf";
34     public static final String EMPTY_STRING = "";
35     public static final String HEALTH_CHECK_WORKFLOW_TO_INVOKE = "healthCheckWorkflow";
36     public static final String SOFTWARE_WORKFLOW_TO_INVOKE = "softwareUpgradeWorkflow";
37     public static final String HEALTH_CHECK_OPERATION = "ResourceHealthCheck";
38     public static final String SW_UP_OPERATION = "ResourceSoftwareUpgrade";
39     public static final String CONTROLLER_STATUS = "ControllerStatus";
40     public static final int ERROR_CODE = 601;
41
42     // TODO GenericVNFHealthCheck and GenericVnfSoftwareUpgrade workflow names should be updated once the workflow is
43     // implemented.
44     public static final Map<String, String> DEFAULT_HEALTH_CHECK_WORKFLOWS =
45             Map.of(PNF, "GenericPnfHealthCheck", VNF, "GenericVNFHealthCheck");
46
47     public static final Map<String, String> DEFAULT_SOFTWARE_UP_WORKFLOWS =
48             Map.of(PNF, "PNFSoftwareUpgrade", VNF, "GenericVnfSoftwareUpgrade");
49
50     // Maps operation name with workflows
51     public static final Map<String, Map<String, String>> WORKFLOW_OPERATIONS_MAP = Map.of(HEALTH_CHECK_OPERATION,
52             DEFAULT_HEALTH_CHECK_WORKFLOWS, SW_UP_OPERATION, DEFAULT_SOFTWARE_UP_WORKFLOWS);
53
54     public static final List<String> VALID_CONTROLLER_SCOPE = Arrays.asList(PNF, VNF);
55
56
57
58 }