diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-12-16 20:07:50 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-12-17 11:11:32 +0200 |
commit | 8f0f72817fa60e62091590081e1662ec88c45ba9 (patch) | |
tree | 82c88a9747087b4295181e3f72426616ad558fb6 /vid-app-common/src/main/java | |
parent | 5f8ce4adff724009dad903887cd320a0095c1437 (diff) |
Templates: show correct values of sdnc-preload, volume-group name
Rename fields in VfModule:
- volumeGroupName instead of volumeGroupInstanceName
- sdncPreLoad instead of usePreload
Also allow "set" on pupups by providing an empty "existingNames"
Issue-ID: VID-724
Change-Id: I18ea0c3fdb4fe716c01902effbb577844000f958
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/java')
2 files changed, 11 insertions, 4 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java index 17ce1bcc3..4872ce2c8 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java @@ -20,6 +20,8 @@ package org.onap.vid.model.serviceInstantiation; +import static java.util.Collections.emptyMap; + import java.util.Map; import java.util.Objects; import org.onap.vid.model.aaiTree.ExistingElementsCounterMaps; @@ -30,6 +32,7 @@ public class ServiceInstantiationTemplate extends ServiceInstantiation implement private final Map<String, Long> existingNetworksCounterMap; private final Map<String, Long> existingVnfGroupCounterMap; private final Map<String, Long> existingVRFCounterMap; + private final Map<String, String> existingNames = emptyMap(); public ServiceInstantiationTemplate( ServiceInstantiation baseService, @@ -78,4 +81,7 @@ public class ServiceInstantiationTemplate extends ServiceInstantiation implement return existingVRFCounterMap; } + public Map<String, String> getExistingNames() { + return existingNames; + } } diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java index ad5b39e28..89e25e662 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java @@ -22,6 +22,7 @@ package org.onap.vid.model.serviceInstantiation; import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; +import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Collection; @@ -39,8 +40,8 @@ import org.onap.vid.mso.model.ModelInfo; @JsonInclude(NON_NULL) public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest { - @JsonInclude(NON_NULL) private final String volumeGroupInstanceName; - @JsonInclude(NON_NULL) private Boolean usePreload; + @JsonInclude(NON_NULL) @JsonProperty("volumeGroupName") private final String volumeGroupInstanceName; + @JsonInclude(NON_NULL) @JsonProperty("sdncPreLoad") private Boolean usePreload; private Map<String, String> supplementaryParams; @JsonInclude(NON_NULL) @@ -51,7 +52,7 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest public VfModule(@JsonProperty("modelInfo") ModelInfo modelInfo, @JsonProperty("instanceName") String instanceName, - @JsonProperty("volumeGroupName") String volumeGroupInstanceName, + @JsonProperty("volumeGroupName") @JsonAlias("volumeGroupInstanceName") String volumeGroupInstanceName, @JsonProperty("action") String action, @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId, @JsonProperty("legacyRegion") String legacyRegion, @@ -59,7 +60,7 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest @JsonProperty("instanceParams") List<Map<String, String>> instanceParams, @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams, @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure, - @JsonProperty("sdncPreLoad") Boolean usePreload, + @JsonProperty("sdncPreLoad") @JsonAlias("usePreload") Boolean usePreload, @JsonProperty("instanceId") String instanceId, @JsonProperty("trackById") String trackById, @JsonProperty("isFailed") Boolean isFailed, |