summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2016-11-17 14:39:58 -0600
committerMatt Spinler <spinler@us.ibm.com>2016-12-21 09:56:04 -0600
commit0087f2be94c3e3ae2836567e6bef231031f356b9 (patch)
treead337f0ef7e437bec56d54e5e836079c6b10f750 /scripts
parentf98655bb1ad441d1a0036d2208ca5b6fda989a66 (diff)
downloadserverwiz-0087f2be94c3e3ae2836567e6bef231031f356b9.tar.gz
serverwiz-0087f2be94c3e3ae2836567e6bef231031f356b9.zip
Allow findConnections end_type to be on any dest parent
Allow the end_type argument of findConnections to match on the type of any parent ancestor of the dest unit to allow for units that are buried in a deeper hierarchy than just unit->chip (such as unit->unit->unit->chip). Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Targets.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/Targets.pm b/scripts/Targets.pm
index 4f460a2..db18f0d 100644
--- a/scripts/Targets.pm
+++ b/scripts/Targets.pm
@@ -955,6 +955,29 @@ sub findConnections
if ($type eq "NA") {
$type = $dest_class;
}
+
+ if ($end_type ne "") {
+ #Look for an end_type match on any ancestor, as
+ #connections may have a destination unit with a hierarchy
+ #like unit->pingroup->muxgroup->chip where the chip has
+ #the interesting type.
+ while ($type ne $end_type) {
+
+ $dest_parent = $self->getTargetParent($dest_parent);
+ if ($dest_parent eq "") {
+ last;
+ }
+
+ $type = $self->getMrwType($dest_parent);
+ if ($type eq "NA") {
+ $type = $self->getType($dest_parent);
+ }
+ if ($type eq "NA") {
+ $type = $self->getAttribute($dest_parent, "CLASS");
+ }
+ }
+ }
+
if ($type eq $end_type || $end_type eq "")
{
$connections{CONN}[$num]{SOURCE}=$child;
OpenPOWER on IntegriCloud