diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2019-03-19 16:08:58 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2019-03-20 09:42:11 -0400 |
commit | 6e55b1d7c3e53fb49c5e94406ff5db4cb9990c87 (patch) | |
tree | 6f88e9e6e15b1a695426ec07b0d3dbb0a4cf0ce2 /main | |
parent | 041240baab6082916e5da69ed190051b7aa60f12 (diff) |
Use Policy Translator abstract class
Instead of applications implementing the converter, use a
protected abstract class that implements common code.
Newer applications could re-use existing application, and
shared code can be put into the base translator class.
Fixed sonar issue and changed guard xml.
Removed Converter and made translator into an implementation
class that is an object in the Application Provider.
Issue-ID: POLICY-1273
Change-Id: I9b48cbcdaf80d6d2ef19ef53e4b7cd4830e7e7b2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'main')
4 files changed, 34 insertions, 0 deletions
diff --git a/main/src/test/resources/decisions/decision.guard.shoulddeny.input.json b/main/src/test/resources/decisions/decision.guard.shoulddeny.input.json new file mode 100644 index 00000000..ba9b5543 --- /dev/null +++ b/main/src/test/resources/decisions/decision.guard.shoulddeny.input.json @@ -0,0 +1,14 @@ +{ + "ONAPName": "Policy", + "ONAPComponent": "DCAE", + "ONAPInstance": "optional-tbd", + "action": "guard", + "resource": { + "guard": { + "actor": "SO", + "recipe": "scaleOut", + "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "vfcount" : "5" + } + } +}
\ No newline at end of file diff --git a/main/src/test/resources/decisions/decision.guard.shoulddeny.output.json b/main/src/test/resources/decisions/decision.guard.shoulddeny.output.json new file mode 100644 index 00000000..3752fe47 --- /dev/null +++ b/main/src/test/resources/decisions/decision.guard.shoulddeny.output.json @@ -0,0 +1,3 @@ +{ + "status": "deny" +}
\ No newline at end of file diff --git a/main/src/test/resources/decisions/decision.guard.shouldpermit.input.json b/main/src/test/resources/decisions/decision.guard.shouldpermit.input.json new file mode 100644 index 00000000..324d495a --- /dev/null +++ b/main/src/test/resources/decisions/decision.guard.shouldpermit.input.json @@ -0,0 +1,14 @@ +{ + "ONAPName": "Policy", + "ONAPComponent": "DCAE", + "ONAPInstance": "optional-tbd", + "action": "guard", + "resource": { + "guard": { + "actor": "SO", + "recipe": "scaleOut", + "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "vfcount" : "1" + } + } +}
\ No newline at end of file diff --git a/main/src/test/resources/decisions/decision.guard.shouldpermit.output.json b/main/src/test/resources/decisions/decision.guard.shouldpermit.output.json new file mode 100644 index 00000000..a1939262 --- /dev/null +++ b/main/src/test/resources/decisions/decision.guard.shouldpermit.output.json @@ -0,0 +1,3 @@ +{ + "status": "permit" +}
\ No newline at end of file |