diff options
author | 2017-09-11 14:42:59 -0500 | |
---|---|---|
committer | 2017-09-11 15:50:32 -0500 | |
commit | e126a975d8c6f3970dbf87ead79fa69afe510301 (patch) | |
tree | 037f6d44e55dd908021e72d5232a11ce41d46944 /controlloop/common/eventmanager/src/main/java/org | |
parent | 8d338012d725cb16ebdbff0eb3ff7f47ad08f6d1 (diff) |
Add Support for Locking VNF Target Types
Fixed the target lock to support vnf target_types.
Generic-vnf.vnf-id and generic-vnf.vnf-name are also
supported when retrieving the target instance from the onset.
These changes are relfected in the vFW and vCPE junits as
they now work with VNF target types.
Issue-ID: POLICY-222
Change-Id: I92abeb02c769d35f3a9912cce6eaaec4c9cc8efb
Signed-off-by: Daniel Cruz <dc443y@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java/org')
-rw-r--r-- | controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index b61eabc4b..0fe97bca9 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -531,6 +531,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { if (! event.target.equalsIgnoreCase("VM_NAME") && ! event.target.equalsIgnoreCase("VNF_NAME") && ! event.target.equalsIgnoreCase("vserver.vserver-name") && + ! event.target.equalsIgnoreCase("generic-vnf.vnf-id") && ! event.target.equalsIgnoreCase("generic-vnf.vnf-name") ) { throw new ControlLoopException("target field invalid - expecting VM_NAME or VNF_NAME"); } @@ -556,9 +557,16 @@ public class ControlLoopEventManager implements LockCallback, Serializable { case PNF: break; case VM: + case VNF: if (this.onset.target.equalsIgnoreCase("vserver.vserver-name")) { return this.onset.AAI.get("vserver.vserver-name"); } + else if (this.onset.target.equalsIgnoreCase("generic-vnf.vnf-id")) { + return this.onset.AAI.get("generic-vnf.vnf-id"); + } + else if (this.onset.target.equalsIgnoreCase("generic-vnf.vnf-name")) { + return this.onset.AAI.get("generic-vnf.vnf-name"); + } break; default: break; |