Make type and type_version mandatory on policies 50/107250/1
authorliamfallon <liam.fallon@est.tech>
Wed, 6 May 2020 15:19:38 +0000 (16:19 +0100)
committerliamfallon <liam.fallon@est.tech>
Wed, 6 May 2020 15:27:30 +0000 (16:27 +0100)
commit3adbaa909ad1af4f80f7347cdfbce8bcab892db0
tree9ae867bf0ed606ab0cb791eb266be5fa120856d4
parent0813923baa10ddd08e8cb3eccff8ac224f2b8aa4
Make type and type_version mandatory on policies

Up until now, the "type" and "type_version" fields defaulted to "NULL"
and "0.0.0" respectively when they were not specified because the
"type_version" field was not always specified on policies in previous
releases. In cases where the "type_version" field was not specified, it
was assumend that a "0.0.0" version of the policy type existed. In
parallel, if the version field was not specified on the policy type, the
version was stored as 0.0.0.

This behaviour is now changed and the "type" and "type_version" fields
are now always mandatory.

Issue-ID: POLICY-2538
Change-Id: I4279adfa86f531205879dbb87986453604624032
Signed-off-by: liamfallon <liam.fallon@est.tech>
models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java
models-tosca/src/test/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTest.java
models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java