diff options
author | liamfallon <liam.fallon@est.tech> | 2020-12-17 12:10:21 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2020-12-23 11:11:05 +0000 |
commit | b87e0242ce1a957740ee988bec3b82e3628adbed (patch) | |
tree | 0d75dce2189f7daf719293620a01af7afc83bc15 /models-provider/src/test/java | |
parent | 12fce55a66848bcc7f71430324b3a9051b8ce0d4 (diff) |
Add Service Template TOSCA handling
Today we can only handle a single service template in the database. We
should be able to handle multiple service templates and assign arbitrary
policy types and policies to maned and versioned service templates.
This review brings in the Java API in models provider for handling
service templates in this way and uses a simplistic single-teplate
implementation in models-tosca, that will work but still only handles a
single service template under the hood.
Issue-ID: POLICY-2900
Change-Id: Ia02dea8abe44b7f407e685090a4b8e0360889653
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-provider/src/test/java')
-rw-r--r-- | models-provider/src/test/java/org/onap/policy/models/provider/impl/DummyBadProviderImpl.java | 31 |
1 files changed, 31 insertions, 0 deletions
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 453f86633..1158307b4 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 @@ -41,6 +41,7 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyFilter; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeFilter; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; +import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplateFilter; /** * Dummy implementation of {@link PolicyModelsProvider} with bad constructor. @@ -63,6 +64,30 @@ public class DummyBadProviderImpl implements PolicyModelsProvider { } @Override + public List<ToscaServiceTemplate> getFilteredServiceTemplateList(@NonNull ToscaServiceTemplateFilter filter) + throws PfModelException { + return null; + } + + @Override + public ToscaServiceTemplate createServiceTemplate(@NonNull ToscaServiceTemplate serviceTemplate) + throws PfModelException { + return null; + } + + @Override + public ToscaServiceTemplate updateServiceTemplate(@NonNull ToscaServiceTemplate serviceTemplate) + throws PfModelException { + return null; + } + + @Override + public ToscaServiceTemplate deleteServiceTemplate(@NonNull String name, @NonNull String version) + throws PfModelException { + return null; + } + + @Override public ToscaServiceTemplate getPolicyTypes(final String name, final String version) throws PfModelException { return null; } @@ -203,4 +228,10 @@ public class DummyBadProviderImpl implements PolicyModelsProvider { // Not implemented return null; } + + @Override + public List<ToscaServiceTemplate> getServiceTemplateList(String name, String version) throws PfModelException { + // TODO Auto-generated method stub + return null; + } } |