2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.onap.appc.seqgen.objects;
27 public class Constants {
28 public static final String RETRY_COUNT = "retry-count";
29 public static final String WAIT_TIME = "wait-time";
30 public static final Integer WAIT_TIME_VALUE = 60;
31 public static final Integer RETRY_COUNT_VALUE = 4;
32 public static final String STRATEGY = "strategy";
33 public static final String VNFC_TYPE = "vnfc-type";
35 public enum CapabilityLevel{
36 VNF("vnf"),VNFC("vnfc"),VM("vm");
38 CapabilityLevel(String level) {
42 public String getLevel() {
47 public enum Capabilties{
48 START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication");
49 private String capability;
51 Capabilties(String capability) {
52 this.capability=capability;
54 public String getCapability(){
59 public enum ResponseMessage{
60 HEALTHY("healthy"),UNHEALTHY("unhealthy"),SUCCESS("success"),FAILURE("failure");
62 public String getResponse() {
66 private String response;
67 ResponseMessage(String response){
68 this.response=response;
73 public enum ResponseAction{
74 STOP("stop"),RETRY("retry"),IGNORE("ignore"),WAIT("wait"),CONTINUE("Continue"),JUMP("jump");
76 ResponseAction(String action) {
80 private String action;
82 public String getAction() {
89 START("Start"),START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication"),STOP("Stop");
91 Action(String actionType) {
92 this.actionType=actionType;
95 public String getActionType() {
99 private String actionType;
102 public enum ActionLevel{
103 VM("vm"),VNFC("vnfc"),VNF("vnf"),VF_MODULE("vf-module");
104 private String action;
105 ActionLevel(String action){
109 public String getAction() {
113 public static ActionLevel findByString(String actoinLevel) {
114 for (ActionLevel acnlevel : ActionLevel.values()) {
115 if (acnlevel.name().equals(actoinLevel))
122 public enum PreCheckOperator{
123 ANY("any"),ALL("all");
125 PreCheckOperator(String operator){
126 this.operator=operator;
129 public String getOperator() {
133 private String operator;