diff options
author | 2019-04-03 02:26:05 +0800 | |
---|---|---|
committer | 2019-04-03 02:26:05 +0800 | |
commit | 41373a9619308bdbab6a31c02fe3d54e91ac6ee3 (patch) | |
tree | 4e79dc6d6573e9fab2415294e5e926589b0f9827 /artifactbroker/model/src/main/java | |
parent | b852967aa9ebbf7a37e562e562c21b9df76f04d7 (diff) |
add subplugin field support and new Cloud Artifact class
. add subplugin field to integrate with Distribution framework
. add new Cloud Artifact which is to be used by subplugin like k8s
. update test .json file to include reception and forward fields
. add dummy test class to ensure the flow works as expected
. fix typos
Change-Id: I9d69d88e448a18247e19b3b7a6062b20814b5f8c
Issue-ID: MULTICLOUD-512
Signed-off-by: liboNet <libo.zhu@intel.com>
Diffstat (limited to 'artifactbroker/model/src/main/java')
-rw-r--r-- | artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java | 16 | ||||
-rw-r--r-- | artifactbroker/model/src/main/java/org/onap/policy/distribution/model/VfModuleModel.java (renamed from artifactbroker/model/src/main/java/org/onap/policy/distribution/model/VfModuelModel.java) | 12 |
2 files changed, 18 insertions, 10 deletions
diff --git a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java index 2447c68..834bbcf 100644 --- a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java +++ b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/CloudArtifact.java @@ -23,17 +23,19 @@ package org.onap.policy.distribution.model; import java.util.List; import java.util.Map; +import org.onap.sdc.api.notification.IArtifactInfo; + /** * Represents a CloudArtifact that a {@link Policy} can be decoded from. */ public class CloudArtifact implements PolicyInput { - List<VfModuelModel> vfModulePayload; - Map<String, String> artifactTypeMap; + List<VfModuleModel> vfModulePayload; + Map<String, IArtifactInfo> artifactMap; - public CloudArtifact(List<VfModuelModel> vfModulePayload, Map<String, String> artifactTypeMap) { + public CloudArtifact(List<VfModuleModel> vfModulePayload, Map<String, IArtifactInfo> artifactMap) { this.vfModulePayload = vfModulePayload; - this.artifactTypeMap = artifactTypeMap; + this.artifactMap = artifactMap; } /** @@ -41,7 +43,7 @@ public class CloudArtifact implements PolicyInput { * * @return the path of the TOSCA file */ - List<VfModuelModel> getVfModulePayload() { + public List<VfModuleModel> getVfModulePayload() { return vfModulePayload; } @@ -50,8 +52,8 @@ public class CloudArtifact implements PolicyInput { * * @return the path of the TOSCA file */ - Map<String, String> getArtifactTypeMap() { - return artifactTypeMap; + public Map<String, IArtifactInfo> getArtifactTypeMap() { + return artifactMap; } } diff --git a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/VfModuelModel.java b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/VfModuleModel.java index e774b89..220dc57 100644 --- a/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/VfModuelModel.java +++ b/artifactbroker/model/src/main/java/org/onap/policy/distribution/model/VfModuleModel.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. + * Copyright (C) 2019 Intel. 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. @@ -25,10 +26,11 @@ import java.util.Map; /** - * Represents a VfModuleModel that a {@link VfModuleModel} can be parsed. + * Represents a VfModuleModel that a {@link Policy} can be decoded from. */ -public class VfModuelModel { +@SuppressWarnings("unchecked") +public class VfModuleModel { private String vfModuleModelName; private String vfModuleModelInvariantUUID; @@ -44,6 +46,10 @@ public class VfModuelModel { return vfModuleModelName; } + public String getVfModuleModelVersion() { + return vfModuleModelVersion; + } + public String getVfModuleModelCustomizationUUID() { return vfModuleModelCustomizationUUID; } @@ -55,7 +61,7 @@ public class VfModuelModel { public List<String> getArtifacts() { return artifacts; } - + public Map<String, Object> getProperties() { return properties; } |