Fix bugs for Policy Executor requests:
- applied naming convention, main ones:
requestParameters.fdn() For fdn from URI and or extendedFdn in case of patch -operation
(extended)path for anything that might have attributes
only use terms "resourceIdentifier" and "targetIdentifier" JUST before calling Policy Execution method
- Ensure path for each patch operation is appended to target FDN
- DeleteOperationDetails is not needed, using blank default instead
- So only one type of OperationDetails required, so removed interface and renamed the only impl.
- Refactored code to correctly handle possible child paths in patchItems
- hardcoded attribute conversion to object for standard /attributes without #
- objectName in body for patch is optional, should be same as in URI, id should be same too. So we CAN ignore (no validation!)
- added convenience method for getting parent or targetFdn (when /attributes is used)
- added convenience method for removing trailing # (when #/attributes is used)
- renamed ParameterMapper to Helper as it is more generic now. Also made is static for easier access
TODO
- Check URL send to DMI (test!) when using (#)/attributes
Decisions Csaba K (to record in Wiki)
- (#)/attributes is NOT allowed in get or create or delete
- (#)/attributes is NOT compulsory for Patch.replace and Patch.uppate
- (#)/attributes should NOT be in URI to PolicyExecutor (targetIdentifier)
Issue-ID: CPS-2826
Change-Id: Icd1dbcd6033b79019d35d6cb68c1d6caee64fb01
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
18 files changed: