diff options
Diffstat (limited to 'artifactbroker/model')
-rw-r--r-- | artifactbroker/model/pom.xml | 13 | ||||
-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 |
3 files changed, 31 insertions, 10 deletions
diff --git a/artifactbroker/model/pom.xml b/artifactbroker/model/pom.xml index 21f0ba4..f2c2850 100644 --- a/artifactbroker/model/pom.xml +++ b/artifactbroker/model/pom.xml @@ -29,4 +29,17 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] module provides the model for policy distribution</description> + <dependencies> + <dependency> + <groupId>org.onap.sdc.sdc-distribution-client</groupId> + <artifactId>sdc-distribution-client</artifactId> + <version>1.3.0</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> </project> 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; } |