aboutsummaryrefslogtreecommitdiffstats
path: root/models-provider
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2022-02-16 23:07:34 +0000
committerRamesh Murugan Iyer <ramesh.murugan.iyer@est.tech>2022-02-16 23:18:42 +0000
commitc89f17af3cccff82d3f251e7fe73910ea8e26dbf (patch)
tree9c4e1045dfad5c93f30bd8258529f76e71b30c5f /models-provider
parent676194789a8b880e2416f9d3bf2484a9fc6be1bc (diff)
Fix return type of get node templates provider
The return type for fetching node templates can be just a List of ToscaNodetemplates. Removing the map with node template keys as it provides redundant keys in the output. Issue-ID: POLICY-3832 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I43d357fc24af9fd4d127cce139b6d21c53cc98d1
Diffstat (limited to 'models-provider')
-rw-r--r--models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java3
-rw-r--r--models-provider/src/main/java/org/onap/policy/models/provider/impl/AbstractPolicyModelsProvider.java3
-rw-r--r--models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyBadProviderImpl.java3
-rw-r--r--models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java3
4 files changed, 4 insertions, 8 deletions
diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java
index f0a5382de..e2aa81ff9 100644
--- a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java
+++ b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java
@@ -303,8 +303,7 @@ public interface PolicyModelsProvider extends AutoCloseable {
* @return the list of nodeTemplates found
* @throws PfModelException on errors getting node template
*/
- public List<Map<PfConceptKey, ToscaNodeTemplate>> getToscaNodeTemplate(final String name,
- final String version)
+ public List<ToscaNodeTemplate> getToscaNodeTemplate(final String name, final String version)
throws PfModelException;
/**
diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/impl/AbstractPolicyModelsProvider.java b/models-provider/src/main/java/org/onap/policy/models/provider/impl/AbstractPolicyModelsProvider.java
index 6747d9c49..ebd9dc472 100644
--- a/models-provider/src/main/java/org/onap/policy/models/provider/impl/AbstractPolicyModelsProvider.java
+++ b/models-provider/src/main/java/org/onap/policy/models/provider/impl/AbstractPolicyModelsProvider.java
@@ -221,8 +221,7 @@ public abstract class AbstractPolicyModelsProvider implements PolicyModelsProvid
}
@Override
- public List<Map<PfConceptKey, ToscaNodeTemplate>> getToscaNodeTemplate(final String name,
- final String version)
+ public List<ToscaNodeTemplate> getToscaNodeTemplate(final String name, final String version)
throws PfModelException {
assertInitialized();
return new AuthorativeToscaProvider().getToscaNodeTemplate(getPfDao(), name, version);
diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyBadProviderImpl.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyBadProviderImpl.java
index 84331e905..0d7f7f0fd 100644
--- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyBadProviderImpl.java
+++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyBadProviderImpl.java
@@ -158,8 +158,7 @@ public class DummyBadProviderImpl implements PolicyModelsProvider {
}
@Override
- public List<Map<PfConceptKey, ToscaNodeTemplate>> getToscaNodeTemplate(final String name,
- final String version)
+ public List<ToscaNodeTemplate> getToscaNodeTemplate(final String name, final String version)
throws PfModelException {
return null;
}
diff --git a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java
index 4b8f1b866..5634b0ff1 100644
--- a/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java
+++ b/models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java
@@ -203,8 +203,7 @@ public class DummyPolicyModelsProviderImpl implements PolicyModelsProvider {
}
@Override
- public List<Map<PfConceptKey, ToscaNodeTemplate>> getToscaNodeTemplate(final String name,
- final String version)
+ public List<ToscaNodeTemplate> getToscaNodeTemplate(final String name, final String version)
throws PfModelException {
return new ArrayList<>();
}