Age | Commit message (Collapse) | Author | Files | Lines |
|
Swagger sitll uses jackson, thus it is including
ToscaPolicyIdentifierOptVersion.isNullVersion() in the API that it
generates. Added @JsonIgnore annotation to prevent it from being
included. Similar issue with get/setVersion() in PdpGroup.
Created POLICY-1653 to remove the isNullVersion() method altogether in
El Alto.
Change-Id: I6cb7b7d1d75258eeb9d6f9b6c7a48eeb32174307
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Add serialied name and swagger ui rendering name for
attribute typeVersion in ToscaPolicy.
Issue-ID: POLICY-1515
Change-Id: I42e85117c5f47901bf8c16d3cc6f162a8b6db5e1
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
|
|
When a filter specifies a name (and possibly version), those can
be used to speed DB searches. Modified the code to use the keys
rather than always retrieving every record before applying the
filter.
Change-Id: I6b48d9e6880ab7e8132d5d8f770394720031b9b5
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added a "copy constructor" that copies an Ident to an Ident
with an optional version. The reverse does not make sense,
so did not add that (e.g., version may be null or may just
be a prefix, while the version in Ident is major.minor.patch).
Change-Id: Ifd3935a998cd4c1cb5113a59c5f36a7d9baf79ff
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Re-introduced regular expressions to match policy version
so that the policy version found in the metadata, which is just
the major number, can be matched with a policy's version, which
is of the form, major.minor.patch.
Simplified equals() test, as we already know "text!=null".
Added filterPrefixPred() and modified policy filter to use it when
matching versions, as it is simpler to use when matching a version
prefix.
Also added tests to PfObjectFilterTest to test each of the XxxPred()
methods.
Change-Id: I0734873f701a539e883fe25b8eecfdde60cc8b6d
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Also made the identifier classes comparable.
Stupid tabs.
Change-Id: I54c0595c6a2c61a1b72b58fe1d667657f9d5d71e
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Add unit test for the new database provider driver parameter.
Address the comments raised in the last review.
Issue-ID: POLICY-1095
Change-Id: I9f629d9f4446d12bfb492e00e49e07b97ef5a490
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
Issue-ID: POLICY-1095
Change-Id: I3edd70898836d3bd978643857d1ba29599b1cf6c
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
When CLAMP deploys a policy to the PDPs, it uses field names
found in the meta-data, which are "policy-id" and "policy-version".
Modified the class used by that particular to use those field names
when encoded/decoded via gson.
Change-Id: Ib67bd2cd05a906cc809dc6078efdabbd7aa1fa37
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Adds the policy-id and policy-version of the policy
to the policy metadata, duplicating the policy key in therre.
Issue-ID: POLICY-1095
Change-Id: I49603766141f5dee47573edc9f05d2ee2cf9da52
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Unit test coverage well over 90% in
policy-models-base
policy-models-dao
policy-models-pdp
policy-models-tosca
policy-models-provider
Issue-ID: POLICY-1095
Change-Id: I7703e2ae8a93575ca478c3d809ff8c1fb9f0f334
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
THis review adds unit tests for the authorative concepts in the
models-tosc module and adds unit tests for the authorative and
and database providers.
Issue-ID: POLICY-1095
Change-Id: If98deea99658056030dd47725b0c0a4266d84106
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
This review completes the unit test for the models-pdp module, for persistence
of PDP groups and for PDP group filtering.
Added unit test of filters for TOSCA policy types and policies.
Added fix to allow filters to pass when the value being
checked is null.
Issue-ID: POLICY-1095
Change-Id: I982400ef39f0282d813d49e484a58207e03b8a63
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
The policy type and policy filters for PDP groups are added
in this review.
Also filter tests for PDP group filter is completed.
Issue-ID: POLICY-1095
Change-Id: Ia28776c809f2ab879af4007b3480621637a83f69
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Fixed bugs on filtering where lack of null checks was blocking
all results.
Added unit test for PDP related JPA objects.
Fixed cascading and orphan control on JPA objects.
Added partial testing of PdpProvider.
Added partial testing of filters.
Changed tag for content of operational policies from "Content" to "content".
Issue-ID: POLICY-1095
Change-Id: Ieb22e06955a8434b490bae7d0f6b77d4479515e8
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Filters were not being invoked from providers.
Filter for getting latest version was filtering out everything
Filter on PDP state was not implemented.
Issue-ID: POLICY-1095
Change-Id: If43ce48a57b010e05f75db8cfa80e63f2719ace1
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
This review completes the implementaiton of the filters
for fetching policy types, policies, and PDP groups
from the database.
It also fixes bugs in Policy type creation.
Yaml in some of the policy type examples modified so that it is syntatically
correct.
Proeprties now stored as a blob in DB as they can be big.
Issue-ID: POLICY-1095
Change-Id: I6aef88ee2905afa58d778d82832f2b55d794fe9c
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Moved ToscaPolicyIdentXxx classes from models-pdp to models-tosca,
and added methods to retrieve them from a ToscaPolicy.
Removed version and instance fields from PdpStatus.
Chose to leave "description" field in the PAP/PDP messages. The
PDPs can ignore them or leave them null. In a PdpUpdate message,
the description will be the description associated with the PdpGroup.
In a PdpStatus message, the PDP could choose to provide a description
of the PDP, itself (or the type of PDP).
Added comments to that effect.
Moved name, group, and subgroup fields into PdpMessage.
Fixed typos in comments.
Updated licenses.
Change "long" to "Long" in PdpUpdate.
Use lombok @ToString instead of override.
Fixed merge conflict.
Change-Id: Icd928f9a7630b838ad4b0b5556e899dc21b7872b
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
I just raised this review to shwo where I'm going with the
filters. They are not complete yet.
Issue-ID: POLICY-1095
Change-Id: I7b602a32bb67159b893f3b3cefea5d88038c4e5f
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
This review:
- Fixes the bug in getting policies where the key fields were null
- Removes complex version checks from DAO interface
- Simplifies provider API by introducing filter objects for searches
Issue-ID: POLICY-1095
Change-Id: I5ab7471c03e8b61849e7882ed18541acd627dc39
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Add @ApiModelProperty to authorative models for the fields
that have different serialized names from their property names.
Issue-ID: POLICY-1515
Change-Id: Id6509afe5cc741a6253fc0d1f98ae6b22d31f0d9
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
Add the implementation of more metods in the PDP provider.
Issue-ID: POLICY-1095
Change-Id: Ie02189cad7a262a453e1f731190525f838648401
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
This review adds the JPA annotations to PDP group/subgroup and PDP for
persisting to the database.
It also updates the Provider API as requested by other team members.
Issue-ID: POLICY-1095
Change-Id: I8188afb763849ede9680f3751b464d9d76c27196
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
This review provides the full specification of the Provider
interfce and stups the new implemented methods into the relevant
delegated providers.
Issue-ID: POLICY-1095
Change-Id: I5f297f8dbbe4131ce910fce95459425ac8b7c3f9
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
A few tests in models-pdp broken when ToscaPolicy was moved
and refactored.
Change-Id: If8e17a140ebc4f8f83b1f5c7cb32a542dd6e5390
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This review refactors the TOSCA support to use authorative
serialization and mapping.
It removes the JPA entities from the Proider interface
It brings the mapping support from and to authorative concepts out of
the JSON serialization classes directly into the JPA classes
It adapts the unit tests to work with the refactored structure.
Apologies for the review size but it all had to be done in a single block
of work.
Issue-ID: POLICY-1095
Change-Id: I4827d1dc67ef7aac98cba230ffcd79c6de71e805
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Use authorative models instead of the JPA stored models
as the venacular models in the Policy Framework.
The next step is to pass the authorative objects over the
provider interface rather than the JPA obejcts. This change will
be made in the next review.
Minor changes to pdp objects to remove JPA things from them. These
object will be the authorative in-memory obejcts on the PDP side and
new JPA entity object will be introduced in a future review to persist
them.
Issue-ID: POLICY-1095
Change-Id: I40e7b713903980cb41bb315417111b67a9b17307
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Support for legacy guard policies added.
Support for translation of all legacy policies to
TOSCA format now complete.
Fix merge problems with dummy provider implementation.
Issue-ID: POLICY-1095
Change-Id: I3dd1775b78d39078a884e1834502b832ff40be18
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
|
|
Legacy operational policies now fully supported for
serialization and persistence from provider through to
database and back. Unit test coverage completed
also
Issue-ID: POLICY-1095
Change-Id: I65755859c94b50edee537d2685f51a7838c6541f
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Changed to use ResourceUtils.getResourceAsString in policy/common project
to access dummy files.
Issue-ID: POLICY-1441
Change-Id: I42d7cb809a0eeedfc2a8a6b82edfe38ad7138548
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
The test checks the TOSCA policy examples and ensures they can be
persisted and read back from persistence.
Test against the expected outcome will be added in later reviews.
Tests for legacy and PDP-A policies willbe added in later reviews.
Issue-ID: POLICY-1095
Change-Id: Ie06bbd477ff63618f126b01c9ab49bfc45b19ae9
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Includes:
a) Build serialization for tosca policy
b) Build serialization for tosca policy type
c) Build serialization for tosca data type
d) Build deserialization for tosca policy
e) Build deserialization for tosca policy type
f) Build deserialization for tosca data type
g) Build plain tosca pojos for API endpoints
h) Build plain tosca pojo mapper to map from/to internal tosca representation
i) Add relevant junit tests
Issue-ID: POLICY-1441
Change-Id: I30a4a1337c756f675fc7a5521e5f9e1a5e3eb97a
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
Provider working from JAVA API call through to database and
back for TOSCA policies with full unit test.
Issue-ID: POLICY-1195
Change-Id: I82cf3b513b4921dcb2e6726856aa4fbeb7d0d816
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
This review brings in the structure of the database provider
with complete unit test coverage. The provider delegates
the details of each database interactino to the appropriate
package in the model.
Resolved merge conflict.
Issue-ID: POLICY-1195
Change-Id: I9d01146415531d18bc9648dcf232b425bc09578d
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
The unit test MonitoringPolicySerializationTest tests
persistence for policies and shows how persistence works.
Issue-ID: POLICY-1195
Change-Id: I933eb538238f9ccd41ce69614e0c9afcac869c29
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Issue-ID: POLICY-1195
Change-Id: Id2dc5b5b490134648ca267e27b795f3f4c03bc7b
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Includes:
a) Added serialization/deserialization for tosca policy
b) Added serialization/deserialization for tosca topology template
c) Added serialization/deserialization for tosca service template
More junit tests for serialization/deserialization are being added,
using the example input/output.
Issue-ID: POLICY-1441
Change-Id: I5ef6b5ede35cfb1e88619e92535393cf8056987b
Signed-off-by: Chenfei Gao <cgao@research.att.com>
|
|
This first patch set is a rough first draft of how
translation will work.
Issue-ID: POLICY-1195
Change-Id: I4a57b049f5756dc6d1e2f4d458d9dd770f928eb2
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
To match the model.
Issue-ID: POLICY-1195
Change-Id: I939d5080b31cf63cdf51602a9b7bdfa5ece716eb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Fill in the bodies of the guard and operational
JSON models.
Issue-ID: POLICY-1195
Change-Id: If15dd8fa89e7a2b9d823eab51ac0b0f8819dd9d4
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added tests for Yaml policy monitoring
Added provider interface calls in provider and structure for handling legacy APIs.
Issue-ID: POLICY-1195
Change-Id: I4825272e0713b9e6a4b89753828de8905bcffbd1
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Add DAO annotations to TOSCA model
Add keying between concepts and define
foreign keys in objects for translation to DB schema
Added provider interface, factory, and stubbed implementation.
Completed unit test for models-base
Completed unit test for models-dao
Completed unit test for models-tosca
Issue-ID: POLICY-1195
Change-Id: I53a0ba8b7a679b6887b38bdab184b60315e0cf5b
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
This patch set fixes some typos and license headers.
Issue-ID: POLICY-1195
Change-Id: I2d15b00fcb50ea92746ab7c5a87b57efa07196fe
Signed-off-by: liamfallon <liam.fallon@est.tech>
|