2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Copyright (C) 2017 Amdocs
8 * =============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * ============LICENSE_END=========================================================
24 package org.onap.appc.seqgen.objects;
26 public class Constants {
27 public static final String RETRY_COUNT = "retry-count";
28 public static final String WAIT_TIME = "wait-time";
29 public static final Integer WAIT_TIME_VALUE = 60;
30 public static final Integer RETRY_COUNT_VALUE = 4;
31 public static final String STRATEGY = "strategy";
32 public static final String VNFC_TYPE = "vnfc-type";
34 public enum CapabilityLevel{
35 VNF("vnf"),VNFC("vnfc"),VM("vm");
37 CapabilityLevel(String level) {
41 public String getLevel() {
46 public enum Capabilties{
47 START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication");
48 private String capability;
50 Capabilties(String capability) {
51 this.capability=capability;
53 public String getCapability(){
58 public enum ResponseMessage{
59 HEALTHY("healthy"),UNHEALTHY("unhealthy"),SUCCESS("success"),FAILURE("failure");
61 public String getResponse() {
65 private String response;
66 ResponseMessage(String response){
67 this.response=response;
72 public enum ResponseAction{
73 STOP("stop"),RETRY("retry"),IGNORE("ignore"),WAIT("wait"),CONTINUE("Continue"),JUMP("jump");
75 ResponseAction(String action) {
79 private String action;
81 public String getAction() {
88 START("Start"),START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication"),STOP("Stop");
90 Action(String actionType) {
91 this.actionType=actionType;
94 public String getActionType() {
98 private String actionType;
101 public enum ActionLevel{
102 VM("vm"),VNFC("vnfc"),VNF("vnf"),VF_MODULE("vf-module");
103 private String action;
104 ActionLevel(String action){
108 public String getAction() {
112 public static ActionLevel findByString(String actoinLevel) {
113 for (ActionLevel acnlevel : ActionLevel.values()) {
114 if (acnlevel.name().equals(actoinLevel))
121 public enum PreCheckOperator{
122 ANY("any"),ALL("all");
124 PreCheckOperator(String operator){
125 this.operator=operator;
128 public String getOperator() {
132 private String operator;