From 6b405cd8bfab89ccc6d93eaa0e2a13cda9ecc9a3 Mon Sep 17 00:00:00 2001
From: "Benjamin, Max (mb388a)" <mb388a@us.att.com>
Date: Sat, 10 Nov 2018 12:43:10 -0500
Subject: accept a la carte create instance group request

Updated postBPELRequest to accept RequestClientParameter
Switched to using .toString rather than .name for enum
Added source to fix failing test
Added action to fix failing apih tests
Removed unused headers from test
Removed unused import from RequestClientParameter
Updated to use instanceGroupId constant
Removed defaulting source in requestInfo
Added validation for mandatory headers
Added test case for modelVersionId in service related instance
Added relatedInstance validation for create instanceGroup
Added unit test cases for MembersValidation
Added test cases for relatedInstances validation
Added tests for add/remove member validation
Added updates for deleteInstanceGroups
Removed serviceProxy from test resource file
Removed ServiceProxy as it is no longer needed
Changed action to be removeMembers in endpoint
Added removeMembers endpoint and validation
Updated validation for create instanceGroups
...

Change-Id: I12b14d6d81dd0690eea33dfcbf1be17c509f9832
Issue-ID: SO-1207
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
---
 common/src/main/java/org/onap/so/logger/MsoLogger.java         |  1 +
 .../main/java/org/onap/so/serviceinstancebeans/ModelType.java  |  3 ++-
 .../java/org/onap/so/serviceinstancebeans/RequestInfo.java     |  3 ---
 .../onap/so/serviceinstancebeans/ServiceInstancesRequest.java  | 10 ++++++++++
 4 files changed, 13 insertions(+), 4 deletions(-)

(limited to 'common/src')

diff --git a/common/src/main/java/org/onap/so/logger/MsoLogger.java b/common/src/main/java/org/onap/so/logger/MsoLogger.java
index c4fba671bb..39a23b5c3e 100644
--- a/common/src/main/java/org/onap/so/logger/MsoLogger.java
+++ b/common/src/main/java/org/onap/so/logger/MsoLogger.java
@@ -74,6 +74,7 @@ public class MsoLogger {
     public static final String ONAP_REQUEST_ID            = "X-ONAP-RequestID";
     public static final String CLIENT_ID                   = "X-ClientID";
     public static final String INVOCATION_ID_HEADER        = "X-InvocationID";
+    public static final String REQUESTOR_ID                = "X-RequestorID";
     
     //Default values for not found
     public static final String UNKNOWN_PARTNER                 = "UnknownPartner";
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/ModelType.java b/common/src/main/java/org/onap/so/serviceinstancebeans/ModelType.java
index 1e5124bf1f..754a70ee94 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/ModelType.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/ModelType.java
@@ -32,5 +32,6 @@ public enum ModelType {
 	configuration,
 	connectionPoint,
 	pnf,
-	networkInstanceGroup
+	networkInstanceGroup,
+	instanceGroup
 }
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java
index 158ca7a819..fd7877822b 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java
@@ -162,9 +162,6 @@ public class RequestInfo implements Serializable {
      *
      */
     public String getSource() {
-    	if(null == source || source.isEmpty()){
-    		source = "VID";
-    	}
         return source;
     }
 
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceInstancesRequest.java b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceInstancesRequest.java
index 3ccf29127f..b6bfda159d 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceInstancesRequest.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceInstancesRequest.java
@@ -43,6 +43,8 @@ public class ServiceInstancesRequest implements Serializable {
 	private String configurationId;
 	@JsonProperty("correlationId")
 	private String correlationId;
+	@JsonProperty("instanceGroupId")
+	private String instanceGroupId;
 
 	public RequestDetails getRequestDetails() {
 		return requestDetails;
@@ -107,6 +109,14 @@ public class ServiceInstancesRequest implements Serializable {
 	public void setCorrelationId(String correlationId) {
 		this.correlationId = correlationId;
 	}
+	
+	public String getInstanceGroupId() {
+		return instanceGroupId;
+	}
+	
+	public void setInstanceGroupId(String instanceGroupId) {
+		this.instanceGroupId = instanceGroupId;
+	}
 
 	@Override
 	public String toString() {
-- 
cgit 1.2.3-korg