summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/aai
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-impl/aai')
-rw-r--r--models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
index 1b18e439c..2648959bb 100644
--- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
@@ -383,6 +383,24 @@ public class AaiCqResponse implements Serializable {
}
/**
+ * Returns the VNF given the vnf-id.
+ *
+ * @param vnfId The vnf-id
+ * @return generic Vnf
+ */
+ public GenericVnf getGenericVnfByVnfId(String vnfId) {
+ List<GenericVnf> genericVnfList = this.getGenericVnfs();
+
+ for (GenericVnf genVnf : genericVnfList) {
+ if (vnfId.equals(genVnf.getVnfId())) {
+ return genVnf;
+ }
+ }
+
+ return null;
+ }
+
+ /**
* Get the generic vnf associated with the vserver in the custom query.
*
* @return Generic VNF