From 1c192d2dd68724e292b6a30f463085a262e1e813 Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Wed, 15 Feb 2017 23:11:26 -0800 Subject: Moving all files to root directory Change-Id: Ica5535fd6ec85f350fe1640b42137b49f83f10f0 Signed-off-by: Patrick Brady --- .../domain-model-lib/.gitignore | 1 + .../org.eclipse.wst.common.project.facet.core.xml | 4 + .../domain-model-lib/pom.xml | 36 ++++++++ .../appc/domainmodel/lcm/ActionIdentifiers.java | 72 ++++++++++++++++ .../appc/domainmodel/lcm/CommonHeader.java | 95 +++++++++++++++++++++ .../org/openecomp/appc/domainmodel/lcm/Flags.java | 72 ++++++++++++++++ .../appc/domainmodel/lcm/RequestContext.java | 93 +++++++++++++++++++++ .../appc/domainmodel/lcm/ResponseContext.java | 83 ++++++++++++++++++ .../appc/domainmodel/lcm/RuntimeContext.java | 97 ++++++++++++++++++++++ .../org/openecomp/appc/domainmodel/lcm/Status.java | 53 ++++++++++++ .../openecomp/appc/domainmodel/lcm/VNFContext.java | 73 ++++++++++++++++ .../appc/domainmodel/lcm/VNFOperation.java | 55 ++++++++++++ 12 files changed, 734 insertions(+) create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/.gitignore create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ActionIdentifiers.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RequestContext.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ResponseContext.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFContext.java create mode 100644 appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFOperation.java (limited to 'appc-dispatcher/appc-dispatcher-common/domain-model-lib') diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/.gitignore b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/.gitignore new file mode 100644 index 000000000..b83d22266 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/.settings/org.eclipse.wst.common.project.facet.core.xml b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 000000000..f4ef8aa0a --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml new file mode 100644 index 000000000..5722d18ea --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + + org.openecomp.appc + appc-dispatcher-common + 1.0.0 + + domain-model-lib + bundle + + domain-model-lib + http://maven.apache.org + + + UTF-8 + + + + + + org.apache.felix + maven-bundle-plugin + + + ${project.artifactId} + ${project.version} + org.openecomp.appc.domainmodel.lcm + true + + + + + + + + diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ActionIdentifiers.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ActionIdentifiers.java new file mode 100644 index 000000000..dc01e8f20 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ActionIdentifiers.java @@ -0,0 +1,72 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + + +public class ActionIdentifiers { + private String serviceInstanceId; + private String vnfId; + private String vnfcName; + private String vServerId; + + public String getServiceInstanceId() { + return serviceInstanceId; + } + + public void setServiceInstanceId(String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + public String getVnfId() { + return vnfId; + } + + public void setVnfId(String vnfId) { + this.vnfId = vnfId; + } + + public String getVnfcName() { + return vnfcName; + } + + public void setVnfcName(String vnfcName) { + this.vnfcName = vnfcName; + } + + public String getVserverId() { + return vServerId; + } + + public void setvServerId(String vServerId) { + this.vServerId = vServerId; + } + + @Override + public String toString() { + return "ActionIdentifiers{" + + "serviceInstanceId='" + serviceInstanceId + '\'' + + ", vnfId='" + vnfId + '\'' + + ", vnfcName='" + vnfcName + '\'' + + ", vServerId='" + vServerId + '\'' + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java new file mode 100644 index 000000000..0819a58d5 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java @@ -0,0 +1,95 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + +import java.util.Date; + + +public class CommonHeader { + + private Flags flags; + private Date timestamp; + private String apiVer; + private String originatorId; + private String requestId; + private String subRequestId; + + public Flags getFlags() { + return flags; + } + + public void setFlags(Flags flags) { + this.flags = flags; + } + + public Date getTimeStamp() { + return timestamp; + } + + public void setTimestamp(Date timestamp) { + this.timestamp = timestamp; + } + + public String getApiVer() { + return apiVer; + } + + public void setApiVer(String apiVer) { + this.apiVer = apiVer; + } + + public String getOriginatorId() { + return originatorId; + } + + public void setOriginatorId(String originatorId) { + this.originatorId = originatorId; + } + + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getSubRequestId() { + return subRequestId; + } + + public void setSubRequestId(String subRequestId) { + this.subRequestId = subRequestId; + } + + @Override + public String toString() { + return "CommonHeader{" + + "flags=" + flags + + ", timestamp=" + timestamp + + ", apiVer='" + apiVer + '\'' + + ", originatorId='" + originatorId + '\'' + + ", requestId='" + requestId + '\'' + + ", subRequestId='" + subRequestId + '\'' + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java new file mode 100644 index 000000000..4f4ddba35 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java @@ -0,0 +1,72 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + + +public class Flags { + + private boolean force; + private int ttl; + private Mode mode; + + public boolean isForce() { + return force; + } + + public void setForce(boolean force) { + this.force = force; + } + + public int getTtl() { + return ttl; + } + + public void setTtl(int ttl) { + this.ttl = ttl; + } + + public Mode getMode() { + return mode; + } + + public void setMode(Mode mode) { + this.mode = mode; + } + + public void setMode(String mode) { + this.mode = Mode.valueOf(mode); + } + + @Override + public String toString() { + return "Flags{" + + "force=" + force + + ", ttl=" + ttl + + ", mode=" + mode + + '}'; + } + + public enum Mode { + EXCLUSIVE, + NORMAL + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RequestContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RequestContext.java new file mode 100644 index 000000000..c37262498 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RequestContext.java @@ -0,0 +1,93 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + +import java.util.HashMap; +import java.util.Map; + + +public class RequestContext { + + private CommonHeader commonHeader; + private ActionIdentifiers actionIdentifiers; + private VNFOperation action; + private String payload; + private Map additionalContext; + + public CommonHeader getCommonHeader() { + return commonHeader; + } + + public void setCommonHeader(CommonHeader commonHeader) { + this.commonHeader = commonHeader; + } + + public ActionIdentifiers getActionIdentifiers() { + return actionIdentifiers; + } + + public void setActionIdentifiers(ActionIdentifiers actionIdentifiers) { + this.actionIdentifiers = actionIdentifiers; + } + + public VNFOperation getAction() { + return action; + } + + public void setAction(VNFOperation action) { + this.action = action; + } + + public String getPayload() { + return payload; + } + + public void setPayload(String payload) { + this.payload = payload; + } + + public Map getAdditionalContext() { + return additionalContext; + } + + public void setAdditionalContext(Map additionalContext) { + this.additionalContext = additionalContext; + } + + public void addKeyValueToAdditionalContext(String key, String value ){ + if (this.additionalContext == null) { + this.additionalContext = new HashMap<>(); + } + this.additionalContext.put(key, value); + } + + @Override + public String toString() { + return "RequestContext{" + + "commonHeader=" + commonHeader + + ", actionIdentifiers=" + actionIdentifiers + + ", action=" + action + + ", payload='" + payload + '\'' + + ", additionalContext=" + additionalContext + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ResponseContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ResponseContext.java new file mode 100644 index 000000000..81fba28ee --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/ResponseContext.java @@ -0,0 +1,83 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + +import java.util.HashMap; +import java.util.Map; + + +public class ResponseContext { + private CommonHeader commonHeader; + private Status status; + private String payload; + private Map additionalContext; + + public CommonHeader getCommonHeader() { + return commonHeader; + } + + public void setCommonHeader(CommonHeader commonHeader) { + this.commonHeader = commonHeader; + } + + public Status getStatus() { + return status; + } + + public void setStatus(Status status) { + this.status = status; + } + + public String getPayload() { + return payload; + } + + public void setPayload(String payload) { + this.payload = payload; + } + + public Map getAdditionalContext() { + return additionalContext; + } + + public void setAdditionalContext(Map additionalContext) { + this.additionalContext = additionalContext; + } + + public void addKeyValueToAdditionalContext(String key, String value ){ + if (this.additionalContext == null) { + this.additionalContext = new HashMap<>(); + } + this.additionalContext.put(key, value); + } + + @Override + public String toString() { + return "ResponseContext{" + + "commonHeader=" + commonHeader + + ", status=" + status + + ", payload='" + payload + '\'' + + ", additionalContext=" + additionalContext + + '}'; + } + +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java new file mode 100644 index 000000000..fd2bcffbf --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java @@ -0,0 +1,97 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + +import java.util.Date; + + +public class RuntimeContext { + + private RequestContext requestContext; + private ResponseContext responseContext; + private VNFContext vnfContext; + + //TODO move fields timeStart abd isLockAcquired to a better place + private Date timeStart; + private boolean isLockAcquired; + private String rpcName; + + public String getRpcName() { + return rpcName; + } + + public void setRpcName(String rpcName) { + this.rpcName = rpcName; + } + + public Date getTimeStart() { + return timeStart; + } + + public boolean isLockAcquired() { + return isLockAcquired; + } + + public void setIsLockAcquired(boolean isLockAcquired) { + this.isLockAcquired = isLockAcquired; + } + + public void setTimeStart(Date timeStart) { + this.timeStart = timeStart; + } + + public RequestContext getRequestContext() { + return requestContext; + } + + public void setRequestContext(RequestContext requestContext) { + this.requestContext = requestContext; + } + + public ResponseContext getResponseContext() { + return responseContext; + } + + public void setResponseContext(ResponseContext responseContext) { + this.responseContext = responseContext; + } + + public VNFContext getVnfContext() { + return vnfContext; + } + + public void setVnfContext(VNFContext vnfContext) { + this.vnfContext = vnfContext; + } + + @Override + public String toString() { + return "RuntimeContext{" + + "requestContext=" + requestContext + + ", responseContext=" + responseContext + + ", vnfContext=" + vnfContext + + ", timeStart=" + timeStart + + ", isLockAcquired=" + isLockAcquired + + ", rpcName='" + rpcName + '\'' + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java new file mode 100644 index 000000000..a5fbefa9c --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + + +public class Status { + + private int code; + private String message; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String value) { + this.message = value; + } + + @Override + public String toString() { + return "Status{" + + "code='" + code + '\'' + + ", message='" + message + '\'' + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFContext.java new file mode 100644 index 000000000..4e2570139 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFContext.java @@ -0,0 +1,73 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + + +public class VNFContext { + private String id; + private String type; + private String version; + private String status; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + @Override + public String toString() { + return "VNFContext{" + + "id='" + id + '\'' + + ", type='" + type + '\'' + + ", version='" + version + '\'' + + ", status='" + status + '\'' + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFOperation.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFOperation.java new file mode 100644 index 000000000..c61901eb3 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/VNFOperation.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.appc.domainmodel.lcm; + +public enum VNFOperation { + + Configure, Test, HealthCheck, Start, Terminate, Restart, Rebuild, Stop, ModifyConfig, Backup, Snapshot, + SoftwareUpload, LiveUpgrade, Rollback, Sync, Audit, Test_lic, Migrate, Evacuate, + Lock(true), Unlock(true), CheckLock(true); + + private boolean builtIn; + + VNFOperation(boolean builtIn) { + this.builtIn = builtIn; + } + + VNFOperation() { + this(false); + } + + /** + * Operations handled directly by the RequestHandler without further call to DG are built-in operations. + */ + public boolean isBuiltIn() { + return builtIn; + } + + public static VNFOperation findByString(String operationName) { + for(VNFOperation operation: VNFOperation.values()) { + if(operation.name().equals(operationName)) { + return operation; + } + } + return null; + } +} -- cgit 1.2.3-korg