aboutsummaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-interfaces-service
diff options
context:
space:
mode:
authorDilip kumar Pampana <dp583p@att.com>2018-01-08 15:08:21 -0500
committerPatrick Brady <pb071s@att.com>2018-01-09 22:13:48 +0000
commit108ff43f43cb3a662514c6f27d806fe3a86caade (patch)
tree0ba58fbb226450fc47b93e8c356c31d3c9ef282d /appc-inbound/appc-interfaces-service
parent57c37a4a6f390ed059897d5b382a59d1e1443852 (diff)
Appc Interface Services
Scope Overlap API Or REST service Issue-ID: APPC-348 Change-Id: Id32b4c88f57a9f9ce2234598d03dcca5946d4683 Signed-off-by: Dilip kumar Pampana <dp583p@att.com>
Diffstat (limited to 'appc-inbound/appc-interfaces-service')
-rw-r--r--appc-inbound/appc-interfaces-service/.gitignore22
-rw-r--r--appc-inbound/appc-interfaces-service/.pydevproject5
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/.gitignore1
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/pom.xml129
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java66
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java76
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ActionIdentifier.java86
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/Request.java53
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ScopeOverlap.java76
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/RequestValidator.java78
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/ServiceExecutor.java79
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java156
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/utils/ServiceConstants.java40
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml44
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/test/java/org/onap/appc/interfaceService/serviceExecutor/TestServiceExecutor.java41
-rw-r--r--appc-inbound/appc-interfaces-service/features/.gitignore1
-rw-r--r--appc-inbound/appc-interfaces-service/features/pom.xml83
-rw-r--r--appc-inbound/appc-interfaces-service/features/src/main/resources/features.xml52
-rw-r--r--appc-inbound/appc-interfaces-service/installer/.gitignore1
-rw-r--r--appc-inbound/appc-interfaces-service/installer/pom.xml134
-rw-r--r--appc-inbound/appc-interfaces-service/installer/resources/scripts/install-feature.sh39
-rw-r--r--appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_installer_zip.xml62
-rw-r--r--appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_mvnrepo_zip.xml50
-rw-r--r--appc-inbound/appc-interfaces-service/installer/src/main/resources/scripts/install-feature.sh43
-rw-r--r--appc-inbound/appc-interfaces-service/jacoco.execbin0 -> 771339 bytes
-rw-r--r--appc-inbound/appc-interfaces-service/model/.gitignore1
-rw-r--r--appc-inbound/appc-interfaces-service/model/pom.xml156
-rw-r--r--appc-inbound/appc-interfaces-service/model/scripts/python/yang2props.py57
-rw-r--r--appc-inbound/appc-interfaces-service/model/src/main/yang/appc-interfaces-service.yang122
-rw-r--r--appc-inbound/appc-interfaces-service/pom.xml94
30 files changed, 1847 insertions, 0 deletions
diff --git a/appc-inbound/appc-interfaces-service/.gitignore b/appc-inbound/appc-interfaces-service/.gitignore
new file mode 100644
index 000000000..75b68b80e
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/.gitignore
@@ -0,0 +1,22 @@
+# Target dirs in all projects
+**/target/*
+
+# Generated models and features
+**/bin/*
+
+# MANIFEST.MF is updated on every clean install
+**/src/main/resources/META-INF/
+**/src/main/yang-gen-sal
+**/src/main/yang-gen-config
+
+.project
+
+*.prefs
+.classpath
+**/.classpath
+/target/
+logs/
+debug-logs/
+/.settings/
+**/*.iml
+/.idea/
diff --git a/appc-inbound/appc-interfaces-service/.pydevproject b/appc-inbound/appc-interfaces-service/.pydevproject
new file mode 100644
index 000000000..40e9f40a0
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/.pydevproject
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?><pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+</pydev_project>
diff --git a/appc-inbound/appc-interfaces-service/bundle/.gitignore b/appc-inbound/appc-interfaces-service/bundle/.gitignore
new file mode 100644
index 000000000..b83d22266
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-inbound/appc-interfaces-service/bundle/pom.xml b/appc-inbound/appc-interfaces-service/bundle/pom.xml
new file mode 100644
index 000000000..db24f603c
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/pom.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>appc-interfaces-service</artifactId>
+ <groupId>org.onap.appc</groupId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>appc-interfaces-service-bundle</artifactId>
+ <packaging>bundle</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>org.onap.appc.interfaces.services</Export-Package>
+ <Import-Package>org.onap.appc.aai.client,*;resolution:=optional</Import-Package>
+ <DynamicImport-Package>*</DynamicImport-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-aai-client-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.8.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+ <artifactId>aai-service-provider</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>config-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-config</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-common-util</artifactId>
+ </dependency>
+ <dependency>
+ <artifactId>sal-test-model</artifactId>
+ <groupId>org.opendaylight.controller</groupId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <artifactId>sal-rest-connector</artifactId>
+ <groupId>org.opendaylight.netconf</groupId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-broker-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.att.eelf</groupId>
+ <artifactId>eelf-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>1.17</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.dataformat</groupId>
+ <artifactId>jackson-dataformat-yaml</artifactId>
+ <version>2.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.7</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java
new file mode 100644
index 000000000..df9371f66
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.InterfacesServiceService;
+import org.onap.appc.interfaces.service.InterfacesServiceProviderImpl;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public class InterfacesServiceProvider{
+
+ private static final EELFLogger log = EELFManager.getInstance().getLogger(InterfacesServiceProvider.class);
+
+ private final DataBroker dataBroker;
+ private final RpcProviderRegistry rpcProviderRegistry;
+ private RpcRegistration <InterfacesServiceService> serviceRegistration;
+
+ public InterfacesServiceProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry) {
+ this.dataBroker = dataBroker;
+ this.rpcProviderRegistry = rpcProviderRegistry;
+ }
+ /**
+ * Method called when the blueprint container is created.
+ */
+ public void init() {
+ // initialize data broker
+ this.serviceRegistration = this.rpcProviderRegistry.addRpcImplementation(InterfacesServiceService.class,
+ new InterfacesServiceProviderImpl());
+ log.info("DataCollectorProvider Session Initiated");
+ }
+ /**
+ * Method called when the blueprint container is destroyed.
+ */
+ public void close() {
+ if(this.serviceRegistration != null){
+ this.serviceRegistration.close();
+ }
+ log.info("DataCollectorProvider Closed");
+ }
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java
new file mode 100644
index 000000000..8e114a3c6
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service;
+
+import java.util.concurrent.Future;
+
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.ExecuteServiceInput;
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.ExecuteServiceOutput;
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.ExecuteServiceOutputBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.InterfacesServiceService;
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.response.info.ResponseInfoBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.appc.interfaces.service.rev170818.status.StatusBuilder;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.onap.appc.interfaces.service.executor.ServiceExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.util.concurrent.Futures;
+
+public class InterfacesServiceProviderImpl implements InterfacesServiceService{
+
+ private static final Logger log = LoggerFactory.getLogger(InterfacesServiceProviderImpl.class);
+
+ @Override
+ public Future<RpcResult<ExecuteServiceOutput>> executeService(ExecuteServiceInput input) {
+
+ log.info("Received Request: " + input.getRequest().getRequestId() + " Action : " +
+ input.getRequest().getAction() + " with RequestData :" + input.getRequest().getRequestData() + " and data-Type : " + input.getRequest().getRequestDataType());
+ String request_id = input.getRequest().getRequestId();
+ String action = input.getRequest().getAction();
+ ResponseInfoBuilder responseInfoBuilder = new ResponseInfoBuilder();
+ ExecuteServiceOutputBuilder executeServicebuilder = new ExecuteServiceOutputBuilder();
+ ServiceExecutor serviceExecutor = new ServiceExecutor();
+ StatusBuilder statusBuilder = new StatusBuilder();
+ try{
+ String response = serviceExecutor.execute(action, input.getRequest().getRequestData(), input.getRequest().getRequestDataType());
+ responseInfoBuilder.setBlock(response);
+ responseInfoBuilder.setRequestId(request_id);
+ statusBuilder.setCode("400");
+ statusBuilder.setMessage("success");
+ }
+ catch(Exception e){
+ log.error("Error" + e.getMessage());
+ e.printStackTrace();
+ statusBuilder.setCode("401");
+ statusBuilder.setMessage("failuer");
+ }
+ executeServicebuilder.setResponseInfo(responseInfoBuilder.build());
+ executeServicebuilder.setStatus(statusBuilder.build());
+ RpcResult<ExecuteServiceOutput> result = RpcResultBuilder.<ExecuteServiceOutput>status(true).withResult(executeServicebuilder.build()).build();
+ return Futures.immediateFuture(result);
+ }
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ActionIdentifier.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ActionIdentifier.java
new file mode 100644
index 000000000..50a47831d
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ActionIdentifier.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ActionIdentifier {
+
+ @JsonProperty("service-instance-id")
+ private String serviceInstanceID;
+
+ @JsonProperty("vnf-id")
+ private String vnfId;
+
+ @JsonProperty("vf-module-id")
+ private String vfModuleId;
+
+ @JsonProperty("vserver-id")
+ private String vServerId;
+
+ @JsonProperty("vnfc-name")
+ private String vnfcName;
+
+ 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 getVfModuleId() {
+ return vfModuleId;
+ }
+
+ public void setVfModuleId(String vfModuleId) {
+ this.vfModuleId = vfModuleId;
+ }
+
+ public String getvServerId() {
+ return vServerId;
+ }
+
+ public void setvServerId(String vServerId) {
+ this.vServerId = vServerId;
+ }
+
+ public String getVnfcName() {
+ return vnfcName;
+ }
+
+ public void setVnfcName(String vnfcName) {
+ this.vnfcName = vnfcName;
+ }
+
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/Request.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/Request.java
new file mode 100644
index 000000000..eff4814de
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/Request.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Request {
+
+ @JsonProperty("action")
+ private String action;
+
+ @JsonProperty("action-identifiers")
+ private ActionIdentifier actionIdentifiers;
+
+ public String getAction() {
+ return action;
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ public ActionIdentifier getActionIdentifiers() {
+ return actionIdentifiers;
+ }
+
+ public void setActionIdentifiers(ActionIdentifier actionIdentifiers) {
+ this.actionIdentifiers = actionIdentifiers;
+ }
+
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ScopeOverlap.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ScopeOverlap.java
new file mode 100644
index 000000000..bfeb70fce
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/data/ScopeOverlap.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.data;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ScopeOverlap {
+
+ @JsonProperty("vnf-id")
+ private String vnfId;
+
+ @JsonProperty("current-request")
+ private Request currentRequest;
+
+ @JsonProperty("in-progress-requests")
+ private List<Request> inProgressRequests;
+
+ private String overlap;
+
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ public void setVnfId(String vnfId) {
+ this.vnfId = vnfId;
+ }
+
+ public Request getCurrentRequest() {
+ return currentRequest;
+ }
+
+ public void setCurrentRequest(Request currentRequest) {
+ this.currentRequest = currentRequest;
+ }
+
+ public List<Request> getInProgressRequest() {
+ return inProgressRequests;
+ }
+
+ public void setInProgressRequest(List<Request> inProgressRequests) {
+ this.inProgressRequests = inProgressRequests;
+ }
+
+ public String getOverlap() {
+ return overlap;
+ }
+
+ public void setOverlap(String overlap) {
+ this.overlap = overlap;
+ }
+
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/RequestValidator.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/RequestValidator.java
new file mode 100644
index 000000000..b37a5e4c8
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/RequestValidator.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.executor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.onap.appc.interfaces.service.utils.ServiceConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class RequestValidator {
+
+ private static final Logger log = LoggerFactory.getLogger(RequestValidator.class);
+
+ public static void validate(String action, String requestData, String requestDataType) throws Exception {
+ log.debug("Received validation for action= " + action + " Data :" + requestData);
+ try {
+ if (requestData.isEmpty()) {
+ throw new Exception("Request Data is Empty");
+ }
+ ObjectMapper objectMapper = new ObjectMapper();
+ JsonNode payloadObject = objectMapper.readTree(requestData);
+ log.info("payloadObject" + payloadObject);
+ if (payloadObject.get(ServiceConstants.VNF) == null)
+ throw new Exception("VNF-ID is null");
+ String vnfId = payloadObject.get(ServiceConstants.VNF).toString();
+ if (vnfId.isEmpty())
+ throw new Exception("VNF-ID is blank");
+ if (payloadObject.get(ServiceConstants.CURRENTREQUEST) == null)
+ throw new Exception("Current request is null");
+ String cRequest = payloadObject.get(ServiceConstants.CURRENTREQUEST).toString();
+ if (cRequest.isEmpty())
+ throw new Exception("Current Request is blank");
+ JsonNode currentRequest = payloadObject.get(ServiceConstants.CURRENTREQUEST);
+ if (currentRequest.get(ServiceConstants.ACTION) == null)
+ throw new Exception("Action is null in Current Request");
+ String cRequestAction = currentRequest.get(ServiceConstants.ACTION).toString();
+ if (cRequestAction.isEmpty())
+ throw new Exception("Action is blank in Current Request");
+ if (currentRequest.get(ServiceConstants.ACTIONIDENTIFIER) == null)
+ throw new Exception("Action Identifier is null in Current Request");
+ String cRequestActionIdentifier = currentRequest.get(ServiceConstants.ACTIONIDENTIFIER).toString();
+ if (cRequestActionIdentifier.isEmpty())
+ throw new Exception("Action Identifier is blank in Current Request");
+ } catch (Exception e) {
+ e.printStackTrace();
+ log.debug("Error while validating: " + e.getMessage());
+ throw e;
+ }
+ }
+
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/ServiceExecutor.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/ServiceExecutor.java
new file mode 100644
index 000000000..f72157656
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executor/ServiceExecutor.java
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.executor;
+
+import java.io.IOException;
+
+import org.onap.appc.interfaces.service.InterfacesServiceProviderImpl;
+import org.onap.appc.interfaces.service.executorImpl.ServiceExecutorImpl;
+import org.onap.appc.interfaces.service.utils.ServiceConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
+public class ServiceExecutor {
+
+ private static final Logger log = LoggerFactory.getLogger(ServiceExecutor.class);
+ public String execute(String action, String requestData, String requestDataType) throws Exception{
+ String response = null;
+ log.info("Received execute request for action : " + action + " with Payload : " + requestData);
+ try{
+ RequestValidator.validate(action, requestData, requestData);
+ switch (action) {
+ case ServiceConstants.REQUESTOVERLAP:
+ response = isRequestOverLap(requestData);
+ break;
+ case ServiceConstants.GEDATABYMODEL:
+ response = getDataByModel(action, requestData, requestDataType);
+ break;
+ default:
+ throw new Exception(" Action " + action + " not found while processing request ");
+ }
+ }catch(Exception e){
+ log.info("Error while checking for ScopeOverlap " + e.getMessage());
+ e.printStackTrace();
+ throw e;
+ }
+ return response;
+ }
+
+ private String getDataByModel(String action, String requestData, String requestDataType) {
+
+ return null;
+ }
+
+ private String isRequestOverLap(String requestData) throws Exception {
+
+ ServiceExecutorImpl serviceExecutor = new ServiceExecutorImpl();
+ try {
+ return serviceExecutor.isRequestOverLap(requestData);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java
new file mode 100644
index 000000000..3b30c3e8c
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/executorImpl/ServiceExecutorImpl.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.executorImpl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.onap.appc.aai.client.aai.AaiService;
+import org.onap.appc.interfaces.service.data.Request;
+import org.onap.appc.interfaces.service.data.ScopeOverlap;
+import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.adaptors.aai.AAIClient;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Strings;
+
+public class ServiceExecutorImpl {
+
+ private static final EELFLogger log = EELFManager.getInstance().getLogger(ServiceExecutorImpl.class);
+ private AAIClient aaiClient;
+ public String isRequestOverLap(String requestData) throws Exception {
+ String response = "\"requestOverlap\" : ";
+ log.info("Response from ServiceExecutorImpl");
+ ScopeOverlap scopeOverlap = new ScopeOverlap();
+ ObjectMapper mapper = new ObjectMapper();
+ scopeOverlap = mapper.readValue(requestData, ScopeOverlap.class);
+ // return response + String.valueOf(checkForOverLap(scopeOverlap));
+ boolean isOverlap = checkForOverLap(scopeOverlap);
+ scopeOverlap.setOverlap(String.valueOf(isOverlap));
+ if (scopeOverlap.getOverlap() != null && scopeOverlap.getOverlap().equalsIgnoreCase("false")){
+ log.info(response + "false");
+ return response + "false";
+ }
+ else{
+ log.info(response + "true");
+ return response + "true";
+ }
+ }
+
+ private boolean checkForOverLap(ScopeOverlap scopeOverlap) throws Exception {
+ log.info("Checking for isScopeOverlap");
+ if (scopeOverlap.getInProgressRequest() == null) {
+ return Boolean.FALSE;
+ }else if ( scopeOverlap.getInProgressRequest().isEmpty()){
+ return Boolean.FALSE;
+ }
+ else if (scopeOverlap.getInProgressRequest().size() == 0) {
+ return Boolean.FALSE;
+ }
+ if (scopeOverlap.getCurrentRequest().getActionIdentifiers().getVnfId() != null) {
+ return Boolean.TRUE;
+ } else if (scopeOverlap.getCurrentRequest().getActionIdentifiers().getVfModuleId() != null) {
+ return Boolean.TRUE;
+ } else if (scopeOverlap.getCurrentRequest().getActionIdentifiers().getvServerId() != null) {
+ return isVserverOrVnfcIdOverLap(scopeOverlap);
+ } else if (scopeOverlap.getCurrentRequest().getActionIdentifiers().getVnfcName() != null) {
+ return isVserverOrVnfcIdOverLap(scopeOverlap);
+ } else {
+ throw new Exception(" Action Identifier doesn't have VnfId, VfModuleId, VServerId, VnfcName ");
+ }
+ }
+
+ private boolean isVnfcNameOverLap(ScopeOverlap scopeOverlap) throws Exception {
+
+ AaiService aaiService =new AaiService(aaiClient);
+ SvcLogicContext ctx = new SvcLogicContext();
+ Map<String, String> params = new HashMap<String, String>();
+ List<String> inProgressVServerIds = new ArrayList<String>();
+ String currentVnfcVserverId = new String();
+ String currentRequestVnfcName = scopeOverlap.getCurrentRequest().getActionIdentifiers().getVnfcName();
+ String currentRequestVServerId = scopeOverlap.getCurrentRequest().getActionIdentifiers().getvServerId();
+ List<Request> inProgressRequests = scopeOverlap.getInProgressRequest();
+ params.put("vnfId", scopeOverlap.getVnfId());
+ try {
+ aaiService.getGenericVnfInfo(params, ctx);
+ int vm_count = Integer.parseInt(ctx.getAttribute("vm-count"));
+ for(Request inprogressRequest:inProgressRequests){
+ if(inprogressRequest.getActionIdentifiers().getVnfcName() != null){
+ for (int i = 0; i < vm_count; i++){
+ if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name")
+ .equals(inprogressRequest.getActionIdentifiers().getVnfcName()))
+ inProgressVServerIds.add(ctx.getAttribute("vm[" + i + "].vserver-id"));
+ log.debug("Received vserver-id from AAI: "+ inProgressVServerIds);
+ }
+ }
+ }
+ for(Request inProgVserverIds:inProgressRequests)
+ if(inProgVserverIds.getActionIdentifiers().getvServerId()!=null)
+ inProgressVServerIds.add(inProgVserverIds.getActionIdentifiers().getvServerId());
+ if(currentRequestVnfcName != null){
+ for (int i = 0; i < vm_count; i++)
+ if (ctx.getAttribute("vm[" + i + "].vnfc-name") != null && ctx.getAttribute("vm[" + i + "].vnfc-name")
+ .equals(currentRequestVnfcName))
+ currentVnfcVserverId = ctx.getAttribute("vm[" + i + "].vserver-id");
+ log.debug("Received vserver-id from AAI: "+ currentVnfcVserverId);
+ return inProgressVServerIds.contains(currentVnfcVserverId);
+ }
+ for (Request request : inProgressRequests) {
+ if(!Strings.isNullOrEmpty(currentRequestVServerId) && currentRequestVServerId.equalsIgnoreCase(request.getActionIdentifiers().getvServerId()))
+ return Boolean.TRUE;
+ }
+ if(currentRequestVServerId != null) {
+ return inProgressVServerIds.contains(currentRequestVServerId);
+ }
+ return Boolean.FALSE;
+ } catch (Exception e) {
+ e.printStackTrace();
+ log.debug(e.getMessage());
+ throw e;
+ }
+ }
+
+ private boolean isVserverOrVnfcIdOverLap(ScopeOverlap scopeOverlap) throws Exception {
+ List<Request> inProgressRequests = scopeOverlap.getInProgressRequest();
+ for (Request request : inProgressRequests) {
+ if(request.getActionIdentifiers().getVnfId()!= null)
+ return Boolean.TRUE ;
+ }
+ for (Request request : inProgressRequests) {
+ if(request.getActionIdentifiers().getVfModuleId()!= null)
+ return Boolean.TRUE ;
+ }
+ String currentVserverID = scopeOverlap.getCurrentRequest().getActionIdentifiers().getvServerId();
+ for (Request request : inProgressRequests) {
+ if(currentVserverID != null && currentVserverID.equalsIgnoreCase(request.getActionIdentifiers().getvServerId()))
+ return Boolean.TRUE ;
+ }
+ return isVnfcNameOverLap(scopeOverlap);
+ }
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/utils/ServiceConstants.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/utils/ServiceConstants.java
new file mode 100644
index 000000000..2ac4172a8
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/utils/ServiceConstants.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaces.service.utils;
+
+public class ServiceConstants {
+
+ public static final String REQUESTOVERLAP = "isScopeOverlap";
+ public static final String GEDATABYMODEL = "getdatabymodel";
+ public static final String VNF = "vnf-id";
+ public static final String VNFCNAME = "vnfc-name";
+ public static final String VFMODULE = "vf-module-id";
+ public static final String VSERVER = "vserver-id";
+ public static final String CURRENTREQUEST = "current-request";
+ public static final String INPROGRESSREQUEST = "in-progress-requests";
+ public static final String ACTION = "action";
+ public static final String ACTIONIDENTIFIER = "action-identifiers";
+ public static final String SERVICEINSTANCEID = "service-instance-id";
+}
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/appc-inbound/appc-interfaces-service/bundle/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
new file mode 100644
index 000000000..239aa2354
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Copyright (C) 2017 Amdocs
+ =============================================================================
+ 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.
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!-- Copyright ? 2016 AT&T and others. All rights reserved. -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ odl:use-default-for-reference-types="true">
+
+ <reference id="dataBroker"
+ interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+ odl:type="default" />
+
+ <reference id="rpcRegistry"
+ interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry" />
+
+ <bean id="provider" class="org.onap.appc.interfaces.service.InterfacesServiceProvider"
+ init-method="init" destroy-method="close">
+ <argument ref="dataBroker" />
+ <argument ref="rpcRegistry" />
+ </bean>
+</blueprint>
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/test/java/org/onap/appc/interfaceService/serviceExecutor/TestServiceExecutor.java b/appc-inbound/appc-interfaces-service/bundle/src/test/java/org/onap/appc/interfaceService/serviceExecutor/TestServiceExecutor.java
new file mode 100644
index 000000000..0c91964c2
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/bundle/src/test/java/org/onap/appc/interfaceService/serviceExecutor/TestServiceExecutor.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.appc.interfaceService.serviceExecutor;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import org.onap.appc.interfaces.service.executorImpl.ServiceExecutorImpl;
+
+public class TestServiceExecutor {
+
+ @Test
+ public void serviceExecutorTest() throws Exception {
+ ServiceExecutorImpl sei = new ServiceExecutorImpl();
+ String requestData = "{\"vnf-id\":\"ibcx8888v\",\"current-request\" :{\"action\" : \"Audit\",\"action-identifiers\" : {\"service-instance-id\" : \"service-instance-id\",\"vnf-id\" : \"vnf-id\",\"vnfc-name\" : \"vnfc-name\",\"vf-module-id\" : \"vf-module-id\",\"vserver-id\": \"vserver-id\"}},\"in-progress-requests\" :[{\"action\" : \"HealthCheck\",\"action-identifiers\" : {\"service-instance-id\" : \"service-instance-id1\",\"vnf-id\" : \"vnf-id1\",\"vnfc-name\" : \"vnfc-name1\",\"vf-module-id\" : \"vf-module-id\",\"vserver-id\": \"vserver-id1\"}},{\"action\" : \"CheckLock\",\"action-identifiers\" : {\"service-instance-id\" : \"service-instance-id2\",\"vnf-id\" : \"vnf-id2\",\"vnfc-name\" : \"vnfc-name2\",\"vf-module-id\" : \"vf-module-id2\",\"vserver-id\": \"vserver-id2\"}}]}";
+ sei.isRequestOverLap(requestData);
+ }
+}
diff --git a/appc-inbound/appc-interfaces-service/features/.gitignore b/appc-inbound/appc-interfaces-service/features/.gitignore
new file mode 100644
index 000000000..b83d22266
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/features/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-inbound/appc-interfaces-service/features/pom.xml b/appc-inbound/appc-interfaces-service/features/pom.xml
new file mode 100644
index 000000000..a1c8d1a18
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/features/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>appc-interfaces-service</artifactId>
+ <groupId>org.onap.appc</groupId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>appc-interfaces-service-features</artifactId>
+ <name>APPC Interfaces Service - Feature</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-model</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-bundle</artifactId>
+ </dependency>
+ <!-- dependency for opendaylight-karaf-empty for use by testing -->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>opendaylight-karaf-empty</artifactId>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <!-- Required for launching the feature tests -->
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <scope>test</scope>
+ <version>${odl.commons.opendaylight.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/${features.file}</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/appc-inbound/appc-interfaces-service/features/src/main/resources/features.xml b/appc-inbound/appc-interfaces-service/features/src/main/resources/features.xml
new file mode 100644
index 000000000..2d3198cd7
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/features/src/main/resources/features.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Copyright (C) 2017 Amdocs
+ =============================================================================
+ 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.
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<features name="appc-interfaces-service-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+ <repository>mvn:org.opendaylight.yangtools/features-yangtools/${odl.yangtools.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.controller/features-mdsal/${odl.controller.mdsal.features.version}/xml/features</repository>
+ <!-- <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${odl.mdsal.model.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.netconf/features-restconf/${odl.controller.mdsal.features.version}/xml/features</repository> -->
+
+ <feature name='appc-interfaces-service' description="Application Controller Interfaces Services"
+ version='${project.version}'>
+
+ <feature version='${odl.mdsal.model.version}'>odl-mdsal-models</feature>
+ <bundle>mvn:org.onap.appc/appc-interfaces-service-model/${project.version}</bundle>
+
+ <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
+ <feature version='${odl.mdsal.version}'>odl-mdsal-broker</feature>
+ <feature>sdnc-sli</feature>
+ <bundle>mvn:org.onap.appc/appc-interfaces-service-bundle/${project.version}</bundle>
+ <bundle>mvn:org.onap.appc/appc-aai-client-provider/${project.version}</bundle>
+ <bundle>wrap:mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.3.0</bundle>
+ <feature version='${odl.mdsal.version}'>odl-restconf</feature>
+
+ </feature>
+
+</features>
diff --git a/appc-inbound/appc-interfaces-service/installer/.gitignore b/appc-inbound/appc-interfaces-service/installer/.gitignore
new file mode 100644
index 000000000..b83d22266
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/installer/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-inbound/appc-interfaces-service/installer/pom.xml b/appc-inbound/appc-interfaces-service/installer/pom.xml
new file mode 100644
index 000000000..1716689bc
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/installer/pom.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>appc-interfaces-service</artifactId>
+ <groupId>org.onap.appc</groupId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>appc-interfaces-service-installer</artifactId>
+ <name>appc-interfaces-service-installer</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <application.name>appc-interfaces-service</application.name>
+ <features.boot>appc-interfaces-service</features.boot>
+ <features.repositories>mvn:org.onap.appc/appc-interfaces-service-features/${project.version}/xml/features</features.repositories>
+ <include.transitive.dependencies>false</include.transitive.dependencies>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-bundle</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <attach>false</attach>
+ <finalName>stage/${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <attach>true</attach>
+ <finalName>${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>true</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <excludeGroupIds>org.opendaylight</excludeGroupIds>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/scripts</directory>
+ <includes>
+ <include>install-feature.sh</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/appc-inbound/appc-interfaces-service/installer/resources/scripts/install-feature.sh b/appc-inbound/appc-interfaces-service/installer/resources/scripts/install-feature.sh
new file mode 100644
index 000000000..f2f254bac
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/installer/resources/scripts/install-feature.sh
@@ -0,0 +1,39 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP : 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=========================================================
+###
+
+#!/bin/bash
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -n -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_installer_zip.xml b/appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 000000000..8bb2ad925
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,62 @@
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Copyright (C) 2017 Amdocs
+ =============================================================================
+ 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.
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>controller</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>755</fileMode>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>644</fileMode>
+ <excludes>
+ <exclude>*.sh</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_mvnrepo_zip.xml b/appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 000000000..489d6f562
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,50 @@
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Copyright (C) 2017 Amdocs
+ =============================================================================
+ 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.
+
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>controller</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+</assembly>
diff --git a/appc-inbound/appc-interfaces-service/installer/src/main/resources/scripts/install-feature.sh b/appc-inbound/appc-interfaces-service/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 000000000..d0210eb06
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,43 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP : APPC
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Copyright (C) 2017 Amdocs
+# =============================================================================
+# 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.
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# ============LICENSE_END=========================================================
+###
+
+#!/bin/bash
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -n -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/appc-inbound/appc-interfaces-service/jacoco.exec b/appc-inbound/appc-interfaces-service/jacoco.exec
new file mode 100644
index 000000000..9dbd5754a
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/jacoco.exec
Binary files differ
diff --git a/appc-inbound/appc-interfaces-service/model/.gitignore b/appc-inbound/appc-interfaces-service/model/.gitignore
new file mode 100644
index 000000000..b83d22266
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/model/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-inbound/appc-interfaces-service/model/pom.xml b/appc-inbound/appc-interfaces-service/model/pom.xml
new file mode 100644
index 000000000..63e855f06
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/model/pom.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>appc-interfaces-service</artifactId>
+ <groupId>org.onap.appc</groupId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>appc-interfaces-service-model</artifactId>
+ <packaging>bundle</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>*</Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <version>${odl.yangtools.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>${odl.sal.api.gen.plugin.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <yangFilesRootDir>${yang.file.directory}</yangFilesRootDir>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
+ <outputBaseDir>${salGeneratorPath}</outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <configuration>
+ <executable>python</executable>
+ <arguments>
+ <argument>scripts/python/yang2props.py</argument>
+ <argument>src/main/yang/appc-interfaces-service.yang</argument>
+ <argument>target/appc-interfaces-service.properties</argument>
+ </arguments>
+ </configuration>
+ <id>generation</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/appc-interfaces-service.properties</file>
+ <type>properties</type>
+ <classifier>appc-interfaces-service</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.codehaus.mojo
+ </groupId>
+ <artifactId>
+ exec-maven-plugin
+ </artifactId>
+ <versionRange>
+ [1.2.1,)
+ </versionRange>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>yang-binding</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/appc-inbound/appc-interfaces-service/model/scripts/python/yang2props.py b/appc-inbound/appc-interfaces-service/model/scripts/python/yang2props.py
new file mode 100644
index 000000000..559d31b8b
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/model/scripts/python/yang2props.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+
+import re
+import sys
+
+
+# Convert word from foo-bar to FooBar
+# words begining with a digit will be converted to _digit
+def to_enum(s):
+ if s[0].isdigit():
+ s = "_" + s
+ else:
+ s = s[0].upper() + s[1:]
+ return re.sub(r'(?!^)-([a-zA-Z])', lambda m: m.group(1).upper(), s)
+
+leaf = ""
+val = ""
+li = []
+
+if len(sys.argv) < 3:
+ print 'yang2props.py <input yang> <output properties>'
+ sys.exit(2)
+
+with open(sys.argv[1], "r") as ins:
+ for line in ins:
+ # if we see a leaf save the name for later
+ if "leaf " in line:
+ match = re.search(r'leaf (\S+)', line)
+ if match:
+ leaf = match.group(1)
+
+ # if we see enum convert the value to enum format and see if it changed
+ # if the value is different write a property entry
+ if "enum " in line:
+ match = re.search(r'enum "(\S+)";', line)
+ if match:
+ val = match.group(1)
+ enum = to_enum(val)
+
+ # see if converting to enum changed the string
+ if val != enum:
+ property = "yang."+leaf+"."+enum+"="+val
+ if property not in li:
+ li.append( property)
+
+
+# Open output file
+fo = open(sys.argv[2], "wb")
+fo.write("# yang conversion properties \n")
+fo.write("# used to convert Enum back to the original yang value \n")
+fo.write("\n".join(li))
+fo.write("\n")
+
+# Close opend file
+fo.close()
+
+
diff --git a/appc-inbound/appc-interfaces-service/model/src/main/yang/appc-interfaces-service.yang b/appc-inbound/appc-interfaces-service/model/src/main/yang/appc-interfaces-service.yang
new file mode 100644
index 000000000..b6e0438a8
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/model/src/main/yang/appc-interfaces-service.yang
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+/*
+ * Yang model for the Application Controller (APP-C) component of ECOMP
+ *
+ *
+ *The main purpose of this model to provide an interface bewteen APPC Runtime and other interface
+ * to communicate.
+ *
+ *
+ *
+ * Author: Anand Chaturvedi (ac204h@att.com)
+ */
+
+module interfaces-service {
+
+ yang-version 1;
+ namespace "org:onap:appc:interfaces:service";
+ prefix interfaces.service;
+ organization "AT&T. Copyright (C) 2015. All rights reserved.";
+ contact
+ "Anand Chaturvedi <ac204h@att.com>";
+
+ description
+ "Defines the services provided by Application Controller to external interfaces.";
+
+ /*
+ * Note, the revision changes the package name of the generated java code. Do not
+ * change the revision unless you also update all references to the bindings.
+ */
+ revision "2017-08-18" {
+ description
+ "APP-C Interface services version 1.1.0";
+ }
+
+ grouping request-info {
+ container request {
+ leaf request-id {
+ type string;
+ description "The request ID ";
+ mandatory true;
+ }
+ leaf action {
+ type string;
+ description "The Action Name";
+ mandatory true;
+ }
+ leaf request-data {
+ type string;
+ description "The Payload";
+ }
+ leaf request-data-type {
+ description "Data type for validation";
+ type string;
+ }
+ }
+ }
+
+ grouping response-info {
+ description "The Generic Data response which includes data key value pair as requested in Model";
+ container response-info {
+ description "Data returned from APPC to external Interaface";
+ leaf block {
+ description "Response message";
+ type string;
+ }
+ leaf requestId {
+ description "Response message reqesut ID";
+ type string;
+ mandatory true;
+ }
+ }
+ }
+ grouping status {
+ description "The specific response codes are to be aligned with APPC/ECOMP messaging Systems";
+ container status {
+ description "The specific response codes are to be aligned with APPC.";
+ leaf code {
+ description "Response code";
+ type string;
+ mandatory true;
+ }
+ leaf message {
+ description "Response message";
+ type string;
+ }
+ }
+ }
+
+ rpc execute-service {
+ description "Runs a given action if it exists.";
+ input {
+ uses request-info;
+ }
+ output {
+ uses response-info ;
+ uses status;
+ }
+ }
+}
diff --git a/appc-inbound/appc-interfaces-service/pom.xml b/appc-inbound/appc-interfaces-service/pom.xml
new file mode 100644
index 000000000..91df11252
--- /dev/null
+++ b/appc-inbound/appc-interfaces-service/pom.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-inbound</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+
+ <packaging>pom</packaging>
+ <artifactId>appc-interfaces-service</artifactId>
+ <name>APPC Interface Services</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-features</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-bundle</artifactId>
+ <version>${project.version}</version>
+ <classifier>config</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-interfaces-service-bundle</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+
+ <modules>
+ <module>model</module>
+ <module>features</module>
+ <module>bundle</module>
+ <module>installer</module>
+ </modules>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.codehaus.mojo
+ </groupId>
+ <artifactId>
+ properties-maven-plugin
+ </artifactId>
+ <versionRange>
+ [1.0.0,)
+ </versionRange>
+ <goals>
+ <goal>
+ set-system-properties
+ </goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>