aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authorJulienBe <julien.bertozzi@intl.att.com>2020-09-09 12:46:42 +0200
committerJulien Bertozzi <julien.bertozzi@intl.att.com>2020-09-09 08:57:08 +0000
commit5ed3d4d047f8e455d6a80cc8b9b3f91a5f2459cd (patch)
tree975182862938e9ed566a8f445c0ea922ff86fdcc /openecomp-be
parent30670accb070b20c1c770d1ebbd6d72e24fee2db (diff)
Create / Update Entitlement Pool - Support Type Field
Setting Universal as the default EntitlementPoolType if none is provided to the api Issue-ID: SDC-2820 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com> Change-Id: I64f90e37f8969488f7453aa53543b566281f2a37
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java7
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolType.java8
2 files changed, 4 insertions, 11 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java
index 6b30b74bf8..2b16ffcb65 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java
@@ -60,11 +60,8 @@ public interface EntitlementPools {
@Path("/")
@Operation(description = "Create vendor entitlement pool")
Response createEntitlementPool(@Valid EntitlementPoolRequestDto request,
- @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
- String vlmId,
- @Parameter(description = "Vendor license model version Id") @PathParam
- ("versionId")
- String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam ("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolType.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolType.java
index 3b66fab110..1a851a54ac 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolType.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolType.java
@@ -26,10 +26,6 @@ public enum EntitlementPoolType {
One_Time;
public static EntitlementPoolType permissiveValueOf(String name) {
- if (name == null){
- return null;
- } else {
- return EntitlementPoolType.valueOf(name);
- }
+ return name == null ? Universal : EntitlementPoolType.valueOf(name);
}
-}
+} \ No newline at end of file