Merge "Removing so-monitoring module"
[so.git] / so-etsi-nfvo / so-etsi-nfvo-ns-lcm / so-etsi-nfvo-ns-lcm-bpmn-flows / src / main / java / org / onap / so / etsi / nfvo / ns / lcm / bpmn / flows / tasks / MonitorInstantiateSol003AdapterNodeTask.java
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 package org.onap.so.etsi.nfvo.ns.lcm.bpmn.flows.tasks;
21
22 import org.onap.so.etsi.nfvo.ns.lcm.bpmn.flows.extclients.aai.AaiServiceProvider;
23 import org.onap.so.etsi.nfvo.ns.lcm.database.service.DatabaseServiceProvider;
24 import org.springframework.beans.factory.annotation.Autowired;
25 import org.springframework.stereotype.Component;
26
27 /**
28  * @author Waqas Ikram (waqas.ikram@est.tech)
29  *
30  */
31 @Component
32 public class MonitorInstantiateSol003AdapterNodeTask extends MonitorSol003AdapterNodeTask {
33     public static final String CREATE_VNF_NODE_STATUS = "createVnfNodeStatus";
34     public static final String VNF_CREATED = "Created";
35
36     @Autowired
37     public MonitorInstantiateSol003AdapterNodeTask(final DatabaseServiceProvider databaseServiceProvider,
38             final AaiServiceProvider aaiServiceProvider) {
39         super(databaseServiceProvider, aaiServiceProvider);
40     }
41
42     @Override
43     public String getNodeStatusVariableName() {
44         return CREATE_VNF_NODE_STATUS;
45     }
46
47     @Override
48     public boolean isOrchestrationStatusValid(final String orchestrationStatus) {
49         return VNF_CREATED.equalsIgnoreCase(orchestrationStatus);
50     }
51
52 }