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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.so.bpmn.infrastructure.service.level.impl;
23 import java.util.Arrays;
24 import java.util.List;
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;
42 // TODO GenericVNFHealthCheck and GenericVnfSoftwareUpgrade workflow names should be updated once the workflow is
44 public static final Map<String, String> DEFAULT_HEALTH_CHECK_WORKFLOWS =
45 Map.of(PNF, "GenericPnfHealthCheck", VNF, "GenericVNFHealthCheck");
47 public static final Map<String, String> DEFAULT_SOFTWARE_UP_WORKFLOWS =
48 Map.of(PNF, "PNFSoftwareUpgrade", VNF, "GenericVnfSoftwareUpgrade");
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);
54 public static final List<String> VALID_CONTROLLER_SCOPE = Arrays.asList(PNF, VNF);