-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support rinv command for Intelligent PDU #4581
Conversation
|
@@ -913,7 +913,7 @@ sub showMFR { | |||
|
|||
foreach my $pdu (@$noderange) { | |||
unless ($pduhash->{$pdu}->[0]->{pdutype} eq "crpdu") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we change to something like:
if (pdutype eq 'irpdu') {
do 1;
} elsif (pdutype ne 'crpud') {
do 2;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't want to create another sub function :), I can make changes if this is not acceptable, but I think it's clear for now.
xCAT-server/lib/xcat/plugins/pdu.pm
Outdated
next; | ||
} | ||
my $line = "**********************************************************"; | ||
xCAT::SvrUtils::sendmsg("$line", $callback,$pdu); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we don't need to output "$line, (MFR Info List), $line" for every node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the current output for multiple nodes
# rinv f6pdu15,f6pdu16
f6pdu15: **********************************************************
f6pdu15: MFR Info List
f6pdu15: **********************************************************
f6pdu15: PDU Software Version: "OPDP_sIBM_v01.3_2"
f6pdu15: PDU Machine Type: "1U"
f6pdu15: PDU Model Number: "dPDU4230"
f6pdu15: PDU Part Number: "46W1608"
f6pdu15: PDU Name: "IBM PDU"
f6pdu15: PDU Serial Number: "4571S5"
f6pdu15: PDU Description: "description"
f6pdu15: **********************************************************
f6pdu16: **********************************************************
f6pdu16: MFR Info List
f6pdu16: **********************************************************
f6pdu16: PDU Software Version: "OPDP_sIBM_v01.3_2"
f6pdu16: PDU Machine Type: "1U"
f6pdu16: PDU Model Number: "dPDU4230"
f6pdu16: PDU Part Number: "46W1608"
f6pdu16: PDU Name: "IBM PDU"
f6pdu16: PDU Serial Number: "4571S9"
f6pdu16: PDU Description: "description"
f6pdu16: **********************************************************
do u think this will be better?
# rinv f6pdu15,f6pdu16
**********************************************************
MFR Info List
**********************************************************
f6pdu15: PDU Software Version: "OPDP_sIBM_v01.3_2"
f6pdu15: PDU Machine Type: "1U"
f6pdu15: PDU Model Number: "dPDU4230"
f6pdu15: PDU Part Number: "46W1608"
f6pdu15: PDU Name: "IBM PDU"
f6pdu15: PDU Serial Number: "4571S5"
f6pdu15: PDU Description: "description"
**********************************************************
f6pdu16: PDU Software Version: "OPDP_sIBM_v01.3_2"
f6pdu16: PDU Machine Type: "1U"
f6pdu16: PDU Model Number: "dPDU4230"
f6pdu16: PDU Part Number: "46W1608"
f6pdu16: PDU Name: "IBM PDU"
f6pdu16: PDU Serial Number: "4571S9"
f6pdu16: PDU Description: "description"
**********************************************************
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to print out "*******"
mid05tor12cn02: BMC Firmware Product: ibm-v2.0-0-r13.3-0-gd624923 (Active)*
mid05tor12cn02: HOST Firmware Product: IBM-witherspoon-ibm-OP9_v1.19_1.90 (Active)*
mid05tor12cn02: HOST Firmware Product: -- additional info: buildroot-2017.08-8-g5e23247
mid05tor12cn02: HOST Firmware Product: -- additional info: capp-ucode-p9-dd2-v2
mid05tor12cn02: HOST Firmware Product: -- additional info: hostboot-binaries-b4606e0
mid05tor12cn02: HOST Firmware Product: -- additional info: hostboot-c646b78
mid05tor12cn02: HOST Firmware Product: -- additional info: linux-4.13.11-openpower1-p5bc6a1c
mid05tor12cn02: HOST Firmware Product: -- additional info: machine-xml-bcd4a40
mid05tor12cn02: HOST Firmware Product: -- additional info: occ-51965bd
mid05tor12cn02: HOST Firmware Product: -- additional info: op-build-v1.19-276-g91e7614
mid05tor12cn02: HOST Firmware Product: -- additional info: petitboot-v1.6.3-pd4b114c
mid05tor12cn02: HOST Firmware Product: -- additional info: sbe-6d7627a
mid05tor12cn02: HOST Firmware Product: -- additional info: skiboot-v5.9.4
mid05tor12cn05: BMC Firmware Product: ibm-v2.0-0-r21-0-ge3cbb5a (Active)*
mid05tor12cn05: HOST Firmware Product: IBM-witherspoon-ibm-OP9_v1.19_1.98 (Active)*
mid05tor12cn05: HOST Firmware Product: -- additional info: buildroot-2017.08-8-g5e23247
mid05tor12cn05: HOST Firmware Product: -- additional info: capp-ucode-p9-dd2-v2
mid05tor12cn05: HOST Firmware Product: -- additional info: hostboot-53bcdc2
mid05tor12cn05: HOST Firmware Product: -- additional info: hostboot-binaries-c5203ed
mid05tor12cn05: HOST Firmware Product: -- additional info: linux-4.13.16-openpower1-p6099adf
mid05tor12cn05: HOST Firmware Product: -- additional info: machine-xml-592a6dd
mid05tor12cn05: HOST Firmware Product: -- additional info: occ-c62d875
mid05tor12cn05: HOST Firmware Product: -- additional info: op-build-v1.19-292-gc519660
mid05tor12cn05: HOST Firmware Product: -- additional info: petitboot-v1.6.3-pa5812d2
mid05tor12cn05: HOST Firmware Product: -- additional info: sbe-b8e05a5
mid05tor12cn05: HOST Firmware Product: -- additional info: skiboot-v5.9.6
@@ -1151,7 +1152,7 @@ sub get_switchtype { | |||
return $xCAT::data::switchinfo::global_switch_type{$key}; | |||
} else { | |||
if (exists($globalopt{pdu})) { | |||
return "irpdu"; | |||
return "crpdu"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why set default pdu to crpdu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find good match string for Coral PDU but irpdu
always has. that's why default to crpdu
.
Looks good to me, agree to merge, thx @cxhong |
Add code to support pdudiscover and rinv command for Intelligent PDU
Currently, we are support following info for rinv command. we can add more based on users request.