summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2017-02-15 23:11:26 -0800
committerPatrick Brady <pb071s@att.com>2017-02-15 23:13:06 -0800
commit1c192d2dd68724e292b6a30f463085a262e1e813 (patch)
treed0e2b3a396e169863cd0efaa835c8675e9d5aaac /appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test
parentc69ba05c7508aa7d7f675189a45c8c87569369ef (diff)
Moving all files to root directory
Change-Id: Ica5535fd6ec85f350fe1640b42137b49f83f10f0 Signed-off-by: Patrick Brady <pb071s@att.com>
Diffstat (limited to 'appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test')
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java312
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java157
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/resources/org/openecomp/appc/default.properties102
3 files changed, 571 insertions, 0 deletions
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java
new file mode 100644
index 000000000..0504c3998
--- /dev/null
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java
@@ -0,0 +1,312 @@
+/*-
+ * ============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.executor;
+/**
+ *
+ */
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.openecomp.appc.domainmodel.lcm.*;
+import org.openecomp.appc.executor.impl.CommandTask;
+import org.openecomp.appc.executor.impl.CommandTaskFactory;
+import org.openecomp.appc.executor.impl.LCMCommandTask;
+import org.openecomp.appc.executor.impl.LCMReadonlyCommandTask;
+import org.openecomp.appc.executor.impl.objects.CommandRequest;
+import org.openecomp.appc.executor.impl.objects.LCMCommandRequest;
+import org.openecomp.appc.executor.impl.objects.LCMReadOnlyCommandRequest;
+import org.openecomp.appc.executor.objects.*;
+import org.openecomp.appc.lifecyclemanager.LifecycleManager;
+import org.openecomp.appc.requesthandler.RequestHandler;
+import org.openecomp.appc.workflow.WorkFlowManager;
+import org.openecomp.appc.workflow.objects.WorkflowRequest;
+import org.openecomp.appc.workflow.objects.WorkflowResponse;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.aai.AAIService;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static junit.framework.Assert.assertEquals;
+import static org.mockito.Matchers.*;
+
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest( {FrameworkUtil.class, CommandTask.class, LCMCommandTask.class})
+public class TestCommandExecutionTask {
+
+ private static final String TTL_FLAG= "TTL";
+ private static final String API_VERSION= "2.0.0";
+ private static final String ORIGINATOR_ID= "1";
+ private LCMCommandTask executionTask;
+ private LCMReadonlyCommandTask LCMReadonlyCommandTask;
+ private CommandTaskFactory factory ;
+
+ private RequestHandler requestHandler;
+ private WorkFlowManager workflowManager;
+ private AAIService aaiService;
+ private LifecycleManager lifecyclemanager;
+
+ private final BundleContext bundleContext=Mockito.mock(BundleContext.class);
+ private final Bundle bundleService=Mockito.mock(Bundle.class);
+ private final ServiceReference sref=Mockito.mock(ServiceReference.class);
+
+ @Before
+ public void init() throws SvcLogicException {
+
+ // ***
+ AAIService aaiService = Mockito.mock(AAIService.class);;
+ PowerMockito.mockStatic(FrameworkUtil.class);
+ PowerMockito.when(FrameworkUtil.getBundle(AAIService.class)).thenReturn(bundleService);
+ PowerMockito.when(bundleService.getBundleContext()).thenReturn(bundleContext);
+ PowerMockito.when(bundleContext.getServiceReference(AAIService.class.getName())).thenReturn(sref);
+ PowerMockito.when(bundleContext.getService(sref)).thenReturn(aaiService);
+ PowerMockito.when(aaiService.query(anyString(),anyBoolean(),anyString(),anyString(),anyString(),anyString(),(SvcLogicContext)anyObject())).thenAnswer(new Answer<SvcLogicResource.QueryStatus>() {
+ @Override
+ public SvcLogicResource.QueryStatus answer(InvocationOnMock invocation) throws Throwable {
+ Object[] args = invocation.getArguments();
+ SvcLogicContext ctx =(SvcLogicContext)args[6];
+ String prefix = (String)args[4];
+ String key = (String)args[3];
+ if(key.contains("'28'")){
+ return SvcLogicResource.QueryStatus.FAILURE ;
+ }else if ( key.contains("'8'")) {
+ return SvcLogicResource.QueryStatus.NOT_FOUND ;
+ }else {
+ ctx.setAttribute(prefix + ".vnf-type", "FIREWALL");
+ ctx.setAttribute(prefix + ".orchestration-status", "INSTANTIATED");
+ }
+ return SvcLogicResource.QueryStatus.SUCCESS ;
+ }
+ });
+ PowerMockito.when(aaiService.update(anyString(),anyString(),(Map)anyObject(),anyString(),(SvcLogicContext)anyObject())).thenReturn(SvcLogicResource.QueryStatus.SUCCESS);
+
+ requestHandler = Mockito.mock(RequestHandler.class);
+ workflowManager = Mockito.mock(WorkFlowManager.class);
+ lifecyclemanager = Mockito.mock(LifecycleManager.class );
+
+ executionTask = new LCMCommandTask(requestHandler,workflowManager,lifecyclemanager);
+ LCMReadonlyCommandTask = new LCMReadonlyCommandTask(requestHandler,workflowManager);
+ factory = new CommandTaskFactory();
+ factory.setLifecyclemanager(lifecyclemanager);
+ factory.setWorkflowManager(workflowManager);
+ factory.setRequestHandler(requestHandler);
+ Mockito.when(workflowManager.executeWorkflow((WorkflowRequest)anyObject())).thenReturn(getWorkflowResponse () );
+ }
+
+
+ @Test
+ public void testFactory(){
+ CommandTask task;
+ task = factory.getExecutionTask("Configure");
+ assertEquals(LCMCommandTask.class,task.getClass() );
+ task = factory.getExecutionTask("Sync");
+ assertEquals(LCMReadonlyCommandTask.class,task.getClass() );
+
+ }
+
+
+
+ @Test
+ public void testOnRequestCompletion(){
+ Mockito.doNothing().when(requestHandler).onRequestTTLEnd((RuntimeContext) anyObject(),anyBoolean());
+ LCMCommandRequest request = getLCMCommandRequest("FIREWALL",30,new Date(), "11" ,setTTLInFlags("30"), VNFOperation.Configure, "1", "1.0");
+ CommandResponse response = getCommandResponse(VNFOperation.Configure, true, "11", "","1");
+ executionTask.onRequestCompletion(request, response);
+ }
+
+ @Test
+ public void testRunGetConfig(){
+ LCMReadOnlyCommandRequest request = getConfigCommandRequest("FIREWALL",30,new Date(), "11" ,setTTLInFlags("30"),VNFOperation.Sync, "1", "1.0");
+ LCMReadonlyCommandTask.setCommandRequest(request);
+ LCMReadonlyCommandTask.run();
+ }
+
+ @Test
+ public void testRun(){
+ LCMCommandRequest request = getLCMCommandRequest("FIREWALL",30,new Date(), "11" ,setTTLInFlags("30"),VNFOperation.Sync, "1", "1.0");
+ executionTask.setCommandRequest(request);
+ executionTask.run();
+ }
+
+ @Test
+ public void testRunNegative(){
+ LCMCommandRequest request = getLCMCommandRequest("FIREWALL",30,new Date(), "11" ,setTTLInFlags("30"),VNFOperation.Sync, "1", "1.0");
+ executionTask.setCommandRequest(request);
+ executionTask.run();
+ }
+
+
+ CommandResponse getCommandResponse(VNFOperation action , boolean success, String responseId, String payload, String vnfId){
+ CommandResponse commandResponse = new CommandResponse();
+ RuntimeContext runtimeContext = new RuntimeContext();
+ commandResponse.setRuntimeContext(runtimeContext);
+ ResponseContext responseContext = new ResponseContext();
+ runtimeContext.setResponseContext(responseContext);
+ RequestContext requestContext = new RequestContext();
+ runtimeContext.setRequestContext(requestContext);
+ CommonHeader commonHeader = new CommonHeader();
+ requestContext.setCommonHeader(commonHeader);
+ responseContext.setCommonHeader(commonHeader);
+ Flags flags = new Flags();
+ commonHeader.setFlags(flags);
+ ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
+ requestContext.setActionIdentifiers(actionIdentifiers);
+ VNFContext vnfContext = new VNFContext();
+ runtimeContext.setVnfContext(vnfContext);
+ requestContext.setAction(action);
+ runtimeContext.setRpcName(action.name().toLowerCase());
+ commonHeader.setApiVer(API_VERSION);
+ Status status = new Status();
+ status.setCode(100);
+ responseContext.setStatus(status);
+ commonHeader.setRequestId(responseId);
+ responseContext.setPayload(payload);
+ commonHeader.setTimestamp(new Date());
+ vnfContext.setId(vnfId);
+ return commandResponse;
+ }
+
+
+
+ @Test
+ public void testPositiveFlow_configure() {
+
+ Date timeStamp = new Date();
+ String requestId = "1";
+
+ CommandExecutorInput commandExecutorInput = pouplateCommandExecutorInput("FIREWALL",30, "1.0", timeStamp, API_VERSION, requestId, ORIGINATOR_ID, "", VNFOperation.Configure, "33", "");
+ CommandRequest request = new CommandRequest(commandExecutorInput);
+ }
+
+
+ private Map<String,Object> setTTLInFlags( String value){
+ Map<String,Object> flags = new HashMap<String,Object>();
+ if( value != null || !("".equalsIgnoreCase(value))){
+ flags.put(TTL_FLAG, value);
+ }
+ return flags;
+ }
+
+
+ private LCMReadOnlyCommandRequest getConfigCommandRequest(String vnfType , Integer ttl , Date timeStamp, String requestId,
+ Map<String,Object> flags, VNFOperation command , String vnfId, String vnfVersion ){
+
+ CommandExecutorInput commandExecutorInput = pouplateCommandExecutorInput(vnfType, ttl, vnfVersion, timeStamp, API_VERSION, requestId, ORIGINATOR_ID, "", command, vnfId, "");
+ LCMReadOnlyCommandRequest request = new LCMReadOnlyCommandRequest(commandExecutorInput);
+
+ return request;
+ }
+
+ private LCMCommandRequest getLCMCommandRequest(String vnfType , Integer ttl ,Date timeStamp, String requestId,
+ Map<String,Object> flags, VNFOperation command , String vnfId, String vnfVersion ){
+
+ CommandExecutorInput commandExecutorInput = pouplateCommandExecutorInput(vnfType, ttl, vnfVersion, timeStamp, API_VERSION, requestId, ORIGINATOR_ID, "", command, vnfId, "");
+ LCMCommandRequest request = new LCMCommandRequest(commandExecutorInput);
+
+ return request;
+ }
+
+ public WorkflowResponse getWorkflowResponse (){
+ WorkflowResponse wfResponse = new WorkflowResponse();
+ ResponseContext responseContext = createResponseContextWithSuObjects();
+ wfResponse.setResponseContext(responseContext);
+ responseContext.setPayload("");
+ wfResponse.getResponseContext().getStatus().setCode(100);
+ return wfResponse;
+ }
+
+ private CommandExecutorInput pouplateCommandExecutorInput(String vnfType, int ttl, String vnfVersion, Date timeStamp, String apiVersion, String requestId, String originatorID, String subRequestID, VNFOperation action, String vnfId , String payload){
+ CommandExecutorInput commandExecutorInput = createCommandExecutorInputWithSubObjects();
+ RuntimeContext runtimeContext = commandExecutorInput.getRuntimeContext();
+ RequestContext requestContext = runtimeContext.getRequestContext();
+ ResponseContext responseContext = createResponseContextWithSuObjects();
+ runtimeContext.setResponseContext(responseContext);
+
+ requestContext.getCommonHeader().getFlags().setTtl(ttl);
+ requestContext.getCommonHeader().setApiVer(apiVersion);
+ requestContext.getCommonHeader().setTimestamp(timeStamp);
+ requestContext.getCommonHeader().setRequestId(requestId);
+ requestContext.getCommonHeader().setSubRequestId(subRequestID);
+ requestContext.getCommonHeader().setOriginatorId(originatorID);
+ requestContext.setAction(action);
+ requestContext.setPayload(payload);
+ requestContext.getActionIdentifiers().setVnfId(vnfId);
+ VNFContext vnfContext = runtimeContext.getVnfContext();
+ vnfContext.setType(vnfType);
+ vnfContext.setId(vnfId);
+ vnfContext.setVersion(vnfVersion);
+ return commandExecutorInput;
+ }
+
+ private CommandExecutorInput createCommandExecutorInputWithSubObjects() {
+ CommandExecutorInput commandExecutorInput = new CommandExecutorInput();
+ RuntimeContext runtimeContext = createRuntimeContextWithSubObjects();
+ commandExecutorInput.setRuntimeContext(runtimeContext);
+ return commandExecutorInput;
+ }
+
+ private RuntimeContext createRuntimeContextWithSubObjects() {
+ RuntimeContext runtimeContext = new RuntimeContext();
+ RequestContext requestContext = new RequestContext();
+ runtimeContext.setRequestContext(requestContext);
+ CommonHeader commonHeader = new CommonHeader();
+ requestContext.setCommonHeader(commonHeader);
+ Flags flags = new Flags();
+ commonHeader.setFlags(flags);
+ ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
+ requestContext.setActionIdentifiers(actionIdentifiers);
+ VNFContext vnfContext = new VNFContext();
+ runtimeContext.setVnfContext(vnfContext);
+ return runtimeContext;
+
+ }
+
+ private ResponseContext createResponseContextWithSuObjects(){
+ ResponseContext responseContext = new ResponseContext();
+ CommonHeader commonHeader = new CommonHeader();
+ Flags flags = new Flags();
+ Status status = new Status();
+ responseContext.setCommonHeader(commonHeader);
+ responseContext.setStatus(status);
+ commonHeader.setFlags(flags);
+ return responseContext;
+ }
+
+}
+
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java
new file mode 100644
index 000000000..473e14e88
--- /dev/null
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java
@@ -0,0 +1,157 @@
+/*-
+ * ============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.executor;
+/**
+ *
+ */
+
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.openecomp.appc.domainmodel.lcm.*;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.appc.executionqueue.ExecutionQueueService;
+import org.openecomp.appc.executor.impl.CommandExecutorImpl;
+import org.openecomp.appc.executor.impl.CommandTaskFactory;
+import org.openecomp.appc.executor.impl.LCMCommandTask;
+import org.openecomp.appc.executor.impl.LCMReadonlyCommandTask;
+import org.openecomp.appc.executor.objects.CommandExecutorInput;
+import org.openecomp.appc.lifecyclemanager.LifecycleManager;
+import org.openecomp.appc.requesthandler.RequestHandler;
+import org.openecomp.appc.workflow.WorkFlowManager;
+
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+
+import static junit.framework.Assert.assertTrue;
+
+
+@SuppressWarnings("deprecation")
+public class TestCommandExecutor {
+
+ private static final String TTL_FLAG= "TTL";
+ private static final String API_VERSION= "2.0.0";
+ private static final String ORIGINATOR_ID= "1";
+
+ CommandExecutorImpl commandExecutor;
+
+ CommandTaskFactory executionTaskFactory;
+
+ private RequestHandler requestHandler;
+ private WorkFlowManager workflowManager;
+ private LifecycleManager lifecyclemanager;
+
+ private ExecutionQueueService executionQueueService;
+
+ @Before
+ public void init()throws Exception {
+ requestHandler= Mockito.mock(RequestHandler.class);
+ lifecyclemanager= Mockito.mock(LifecycleManager.class);
+ workflowManager= Mockito.mock(WorkFlowManager.class);
+
+ executionQueueService = Mockito.mock(ExecutionQueueService.class);
+
+ commandExecutor = new CommandExecutorImpl();
+ executionTaskFactory = Mockito.mock(CommandTaskFactory.class);
+ commandExecutor.setExecutionTaskFactory(executionTaskFactory);
+ commandExecutor.setExecutionQueueService(executionQueueService);
+ LCMCommandTask lcmCommandTask = Mockito.mock(LCMCommandTask.class);
+ LCMReadonlyCommandTask LCMReadonlyCommandTask = Mockito.mock(LCMReadonlyCommandTask.class);
+ Mockito.when(executionTaskFactory.getExecutionTask("Configure")).thenReturn(lcmCommandTask);
+ Mockito.when(executionTaskFactory.getExecutionTask("Sync")).thenReturn(LCMReadonlyCommandTask);
+// Mockito.when(executionQueueService.putMessage((Runnable) Mockito.anyObject(),Mockito.anyLong(),(TimeUnit)Mockito.anyObject())).thenReturn(true);
+
+ }
+
+
+ @Test
+ public void testPositiveFlow_LCM(){
+ //Map <String,Object> flags = setTTLInFlags("30");
+ Date timeStamp = new Date();
+ String requestId = "1";
+ CommandExecutorInput commandExecutorInput = pouplateCommandExecutorInput("FIREWALL", 30, "1.0", timeStamp, API_VERSION, requestId, ORIGINATOR_ID, "2", VNFOperation.Configure, "15", "") ;
+ try {
+ commandExecutor.executeCommand(commandExecutorInput);
+ } catch (APPCException e) {
+ Assert.fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testPositiveFlow_GetConfig(){
+ Date timeStamp = new Date();
+ String requestId = "1";
+
+ CommandExecutorInput commandExecutorInput = pouplateCommandExecutorInput("FIREWALL", 30, "1.0", timeStamp, API_VERSION, requestId, ORIGINATOR_ID, "2", VNFOperation.Sync,"15","") ;
+ try {
+ commandExecutor.executeCommand(commandExecutorInput);
+ } catch (APPCException e) {
+ Assert.fail(e.toString());
+ }
+
+ }
+
+
+ private CommandExecutorInput pouplateCommandExecutorInput(String vnfType, int ttl, String vnfVersion, Date timeStamp, String apiVersion, String requestId, String originatorID, String subRequestID, VNFOperation action, String vnfId , String payload){
+ CommandExecutorInput commandExecutorInput = createCommandExecutorInputWithSubObjects();
+ RuntimeContext runtimeContext = commandExecutorInput.getRuntimeContext();
+ RequestContext requestContext = runtimeContext.getRequestContext();
+ requestContext.getCommonHeader().getFlags().setTtl(ttl);
+ requestContext.getCommonHeader().setApiVer(apiVersion);
+ requestContext.getCommonHeader().setTimestamp(timeStamp);
+ requestContext.getCommonHeader().setRequestId(requestId);
+ requestContext.getCommonHeader().setSubRequestId(subRequestID);
+ requestContext.getCommonHeader().setOriginatorId(originatorID);
+ requestContext.setAction(action);
+ requestContext.setPayload(payload);
+ requestContext.getActionIdentifiers().setVnfId(vnfId);
+ VNFContext vnfContext = runtimeContext.getVnfContext();
+ vnfContext.setType(vnfType);
+ vnfContext.setId(vnfId);
+ vnfContext.setVersion(vnfVersion);
+ return commandExecutorInput;
+ }
+
+ private CommandExecutorInput createCommandExecutorInputWithSubObjects() {
+ CommandExecutorInput commandExecutorInput = new CommandExecutorInput();
+ RuntimeContext runtimeContext = new RuntimeContext();
+ commandExecutorInput.setRuntimeContext(runtimeContext);
+ RequestContext requestContext = new RequestContext();
+ runtimeContext.setRequestContext(requestContext);
+ CommonHeader commonHeader = new CommonHeader();
+ requestContext.setCommonHeader(commonHeader);
+ Flags flags = new Flags();
+ commonHeader.setFlags(flags);
+ ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
+ requestContext.setActionIdentifiers(actionIdentifiers);
+ VNFContext vnfContext = new VNFContext();
+ runtimeContext.setVnfContext(vnfContext);
+ return commandExecutorInput;
+ }
+
+
+
+}
+
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/resources/org/openecomp/appc/default.properties b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/resources/org/openecomp/appc/default.properties
new file mode 100644
index 000000000..74552a9d7
--- /dev/null
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/resources/org/openecomp/appc/default.properties
@@ -0,0 +1,102 @@
+###
+# ============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=========================================================
+###
+
+# Define the name and path of any user-provided configuration (bootstrap) file that can be loaded to supply configuration options
+#org.openecomp.appc.bootstrap.file=executor-test.properties
+org.openecomp.appc.bootstrap.file=appc.properties
+org.openecomp.appc.bootstrap.path=/opt/openecomp/appc/data/properties,${user.home},.
+
+
+#
+# Certificate keystore and truststore
+#
+#org.openecomp.sdnc.sli.aai.ssl.trust=<jks_FILE_HERE>
+#org.openecomp.sdnc.sli.aai.ssl.trust.psswd=adminadmin
+#org.openecomp.sdnc.sli.aai.ssl.key=<p12_FILE_HERE>
+#org.openecomp.sdnc.sli.aai.ssl.key.psswd=adminadmin
+org.openecomp.sdnc.sli.aai.host.certificate.ignore=true
+org.openecomp.sdnc.sli.aai.certificate.trust.all=true
+
+
+#
+# Configuration file for A&AI Adapter
+#
+
+# OPEN SOURCE - EXTERNAL A&AI INSTANCE IN TEST ENVIRONMENT
+org.openecomp.sdnc.sli.aai.uri=https://10.0.1.1:8443
+
+org.openecomp.sdnc.sli.aai.path.query=/aai/v8/search/sdn-zone-query
+
+# service instance
+org.openecomp.sdnc.sli.aai.path.svcinst=/aai/v8/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances
+org.openecomp.sdnc.sli.aai.path.svcinst.query=/aai/v8/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance
+
+# complex
+org.openecomp.sdnc.sli.aai.path.complexes=/aai/v8/cloud-infrastructure/complexes
+org.openecomp.sdnc.sli.aai.path.complex=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}
+
+# vservers
+org.openecomp.sdnc.sli.aai.path.vservers=/aai/v8/cloud-infrastructure/tenants/tenant/{tenant-id}/vservers
+org.openecomp.sdnc.sli.aai.path.vserver =/aai/v8/cloud-infrastructure/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}
+
+# generic-vnf
+org.openecomp.sdnc.sli.aai.path.generic.vnfs=/aai/v8/network/generic-vnfs/generic-vnf/
+org.openecomp.sdnc.sli.aai.path.generic.vnf=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}
+
+#
+# Formatting
+#
+org.openecomp.sdnc.sli.aai.param.format=filter=%s:%s
+org.openecomp.sdnc.sli.aai.param.vnf_type=vnf-type
+org.openecomp.sdnc.sli.aai.param.physical.location.id=physical-location-id
+org.openecomp.sdnc.sli.aai.param.service.type=service-type
+
+org.openecomp.appc.logging.path=${user.home},etc,../etc,.
+org.openecomp.appc.logging.file=logback.xml
+
+org.openecomp.appc.db.url.%s", schema), "");
+org.openecomp.appc.db.user.%s", schema), "");
+org.openecomp.appc.db.pass.%s", schema), "");
+
+
+#Property below provided by appc.properties
+#dmaap.poolMembers=<DMAAP_IP>:3904
+
+dmaap.topic.read=APPC-TEST2
+dmaap.topic.write=APPC-TEST2
+#dmaap.topic.read.filter={"class":"Assigned","field":"request"}
+dmaap.topic.read.filter={"class": "And","filters": [{"class": "Assigned","field": "request"},{"class": "Unassigned","field": "response"}]}
+dmaap.client.name=APPC-TEST-CLIENT-CMD-EXECUTOR-TEST
+dmaap.client.name.id=0
+#dmaap.client.key=random
+#dmaap.client.secret=random
+
+dmaap.threads.queuesize.min=1
+dmaap.threads.queuesize.max=1000
+dmaap.threads.poolsize.min=2
+dmaap.threads.poolsize.max=2
+
+
+#
+# This needs to be changed so that the action can be appended to the end of the URL path
+#
+#provider.urls.topology=https://admin:password@<IP_ADDRESS>:8443/restconf/operations/appc-provider:topology-service
+#provider.urls.topology=https://admin:password@<IP_ADDRESS>:8443/restconf/operations/appc-provider: