summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/targeting')
-rw-r--r--src/include/usr/targeting/common/target.H5
-rw-r--r--src/include/usr/targeting/common/targetservice.H2
-rw-r--r--src/include/usr/targeting/common/utilFilter.H42
3 files changed, 47 insertions, 2 deletions
diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H
index f462581de..16622adf9 100644
--- a/src/include/usr/targeting/common/target.H
+++ b/src/include/usr/targeting/common/target.H
@@ -770,14 +770,15 @@ class Target
// Array of pointers to target handles. Currently there is one pointer
// for each supported association type. The currently supported
// association types are PARENT, CHILD, PARENT_BY_AFFINITY,
- // CHILD_BY_AFFINTY, PERVASIVE_CHILD, and PARENT_PERVASIVE.
+ // CHILD_BY_AFFINTY, PERVASIVE_CHILD, PARENT_PERVASIVE,
+ // OMI_CHILD, and OMIC_PARENT.
// The number of pointers should exactly equal value
// of TargetService::MAX_ASSOCIATION_TYPES defined in
// targeting/common/targetservice.H. Due to the huge code changes
// necessary to directly use that enum value, a compile time assert in
// targeting/common/targetservice.C enforces that restriction.
TARGETING::AbstractPointer< AbstractPointer<Target> >
- iv_ppAssociations[6];
+ iv_ppAssociations[8];
private: // Private CTORs/DTORs/Operators
diff --git a/src/include/usr/targeting/common/targetservice.H b/src/include/usr/targeting/common/targetservice.H
index 4c6f78996..157372126 100644
--- a/src/include/usr/targeting/common/targetservice.H
+++ b/src/include/usr/targeting/common/targetservice.H
@@ -210,6 +210,8 @@ class TargetService
///< associated with a pervasive target
PARENT_PERVASIVE, ///< The result target should be a pervasive
///< target
+ OMI_CHILD, ///< The result target(s) should be an OMI target
+ OMIC_PARENT, ///< The result target should be an OMIC target
MAX_ASSOCIATION_TYPES, ///< Number of types, must always be last
};
diff --git a/src/include/usr/targeting/common/utilFilter.H b/src/include/usr/targeting/common/utilFilter.H
index 9d840a450..b54c5f8ac 100644
--- a/src/include/usr/targeting/common/utilFilter.H
+++ b/src/include/usr/targeting/common/utilFilter.H
@@ -262,6 +262,48 @@ void getParentPervasiveTargetsByState (
ResourceState i_state);
/**
+ * @brief Given an input target, finds all the targets linked to it via a
+ * OMIC_PARENT relationship and writes them to the output vector.
+ * The class, type, and resource state further filter the set of results.
+ * Note: It is expected that only 1 target will be added to the output
+ * vector for getParentOmicTargetsByState calls.
+ *
+ * @parm[out] o_vector, reference to vector of target pointers
+ * @parm[in] i_target, source target to search from
+ * @parm[in] i_class, class of the targets to be obtained
+ * @parm[in] i_type, type of the targets to be obtained
+ * @parm[in] i_state, specifies state the target should be in
+ *
+ * @return N/A
+ */
+void getParentOmicTargetsByState (
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state);
+
+/**
+ * @brief Given an input target, finds all the targets linked to it via a
+ * OMI_CHILD relationship and writes them to the output vector.
+ * The class, type, and resource state further filter the set of results.
+ *
+ * @parm[out] o_vector, reference to vector of target pointers
+ * @parm[in] i_target, source target to search from
+ * @parm[in] i_class, class of the targets to be obtained
+ * @parm[in] i_type, type of the targets to be obtained
+ * @parm[in] i_state, specifies state the target should be in
+ *
+ * @return N/A
+ */
+void getChildOmiTargetsByState (
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state);
+
+/**
* @brief Populate the o_vector with target object pointers which are
* affinity parents of the input target
*
OpenPOWER on IntegriCloud