Commit Graph

3 Commits

Author SHA1 Message Date
Alex Szarka e7bdd19f0e Transform instance.exists notification
This patch contains the instance.exists related notification
transformation. The functional test for instance_usage_audit
periodic task case is added in a subsequent patch.

Change-Id: I1a0afa0e8740c229db77c18b932e316196880de5
Implements: bp versioned-notification-transformation-rocky
2018-06-05 12:51:30 +00:00
Balazs Gibizer 579ae3880c Nits from Ic3ab7d60e4ac12b767fe70bef97b327545a86e74
A missing test case and a missing space in an error message are adde
as a follow up of Ic3ab7d60e4ac12b767fe70bef97b327545a86e74

Change-Id: I9d348dc5ce74590a4bed7b7e746333e3df3848c7
2017-11-28 15:55:45 +01:00
Balazs Gibizer 5a5155ea4e Factor out duplicated notification sample data
Versioned notifications are functionally tested against stored sample
data. Also most of the instance notitication shares payload structure.
Today we store a separate sample for every instance notification.
These samples store similar, mostly redundant data. When a new field
is added to the InstancePayload then every instance notification
related sample file needs to be modified. This leads to big and
redundant changes like I18af99479562e2fe5e74e6e1252b804b074fee58.

To remove the redundancy this patch proposes to use json references
in the sample files instead of copy pasting the same notification
sample fragment to every sample.

As a first step this patch introduces a small json ref resolver.
Then subsequent patches will replace the duplicated sample data
with references to common sample fragments.

This proposed resolver supports resolving the refs recursively so
a referenced json fragment can reference further fragments. However
the current implementation does not handle reference loops.
The resolver also supports overriding parts of the referenced
json fragment to support content customization needed in the next
patch.

Change-Id: Ic3ab7d60e4ac12b767fe70bef97b327545a86e74
2017-11-03 11:36:57 +01:00