opagentopology (8) - Linux Manuals
NAME
opagentopology
Generates sample topology verification XML. Provides an example of using opaxmlgenerate and is a prototype for customization.
Uses CSV input files opatopology_links.txt, opatopology_FIs.txt, and opatopology_SWs.txt to generate LinkSummary, Node FIs, and Node SWs information respectively. These files are samples of what might be produced as part of translating a user custom file format into temporary intermediate CSV files.
LinkSummary information includes Link, Cable, and Port information. Note that opagentopology (not opaxmlgenerate) generates the XML version string as well as the #8217lt;Topology> and <LinkSummary> lines. Also note that the indent level is at the default value of zero (0). The portions of the script that call opaxmlgenerate follow:
opaxmlgenerate -X /usr/lib/opa-ff/samples/opatopology_1.txt -d ; -h Link -g Rate -g
Rate_Int -g MTU -g LinkDetails -h Cable -g CableLength -g CableLabel -g
CableDetails -e Cable -h Port -g NodeGUID -g PortNum -g NodeDesc -g PortGUID -g
NodeType -g NodeType_Int -g PortDetails -e Port -h Port -g NodeGUID -g PortNum -g
NodeDesc -g PortGUID -g NodeType -g NodeType_Int -g PortDetails -e Port -e Link
opaxmlgenerate -X /usr/lib/opa-ff/samples/opatopology_2.txt -d ; -h Node -g NodeGUID -g
NodeDesc -g NodeDetails -g HostName -g NodeType -g NodeType_Int -g NumPorts -e Node
opatopology_links.txt
This file can be found in /usr/lib/opa-ff/samples/ . For brevity, this sample shows only two links. The second link shows an example of omitting some information. In the second line, the MTU, LinkDetails, and other fields are not present, which is indicated by an empty value for the field (no entry between the semicolon delimiters).
NOTE: The following example exceeds the available width of the page. For readability, a blank line is shown between lines to make it clear where the line ends. In an actual link file, no blank lines are used.
25g;2048;0;IO Server Link;11m;S4567;cable model 456;0x0002c9020020e004;1;bender HFI-1;0x0002c9020020e004;FI;Some info about port;0x0011750007000df6;7;Switch 1234 Leaf 4;;SW;
25g;;0;;;;;0x0002c9020025a678;1;mindy2 HFI-1;;FI;;0x0011750007000e6d;4;Switch 2345 Leaf 5;;SW;
opatopology_FIs.txt
This file can be found in /usr/lib/opa-ff/samples/ . For brevity, this sample shows only two nodes.
0x0002c9020020e004;bender HFI-1;More details about node
0x0002c9020025a678;mindy2 HFI-1;Node details
opatopology_SWs.txt
This file can be found in /usr/lib/opa-ff/samples/ . For brevity, this sample shows only two nodes.
0x0011750007000df6;Switch 1234 Leaf 4; 0x0011750007000e6d;Switch 2345 Leaf 5;
opatopology_SMs.txt
This file can be found in /usr/lib/opa-ff/samples/ . For brevity, this sample shows only one node.
0x0002c9020025a678;1;mindy2 HFI-1;0x0011750007000e6d;FI;details about SM
Example
When run against the supplied topology input files, opagentopology produces:
#8217lt;?xml version="1.0" encoding="utf-8" ?>
#8217lt;Topology>
#8217lt;LinkSummary>
#8217lt;Link>
#8217lt;Rate>25g</Rate>
#8217lt;MTU>2048</MTU>
#8217lt;Internal>0</Internal>
#8217lt;LinkDetails>IO Server Link</LinkDetails>
#8217lt;Cable>
#8217lt;CableLength>11m</CableLength>
#8217lt;CableLabel>S4567</CableLabel>
#8217lt;CableDetails>cable model 456</CableDetails>
#8217lt;/Cable>
#8217lt;Port>
#8217lt;NodeGUID>0x0002c9020020e004</NodeGUID>
#8217lt;PortNum>1</PortNum>
#8217lt;NodeDesc>bender HFI-1</NodeDesc>
#8217lt;PortGUID>0x0002c9020020e004</PortGUID>
#8217lt;NodeType>FI</NodeType>
#8217lt;PortDetails>Some info about port</PortDetails>
#8217lt;/Port>
#8217lt;Port>
#8217lt;NodeGUID>0x0011750007000df6</NodeGUID>
#8217lt;PortNum>7</PortNum>
#8217lt;NodeDesc>Switch 1234 Leaf 4</NodeDesc>
#8217lt;NodeType>SW</NodeType>
#8217lt;/Port>
#8217lt;/Link>
#8217lt;Link>
#8217lt;Rate>25g</Rate>
#8217lt;Internal>0</Internal>
#8217lt;Cable>
#8217lt;/Cable>
#8217lt;Port>
#8217lt;NodeGUID>0x0002c9020025a678</NodeGUID>
#8217lt;PortNum>1</PortNum>
#8217lt;NodeDesc>mindy2 HFI-1</NodeDesc>
#8217lt;NodeType>FI</NodeType>
#8217lt;/Port>
#8217lt;Port>
#8217lt;NodeGUID>0x0011750007000e6d</NodeGUID>
#8217lt;PortNum>4</PortNum>
#8217lt;NodeDesc>Switch 2345 Leaf 5</NodeDesc>
#8217lt;NodeType>SW</NodeType>
#8217lt;/Port>
#8217lt;/Link>
#8217lt;/LinkSummary>
#8217lt;Nodes>
#8217lt;FIs>
#8217lt;Node>
#8217lt;NodeGUID>0x0002c9020020e004</NodeGUID>
#8217lt;NodeDesc>bender HFI-1</NodeDesc>
#8217lt;NodeDetails>More details about node</NodeDetails>
#8217lt;/Node>
#8217lt;Node>
#8217lt;NodeGUID>0x0002c9020025a678</NodeGUID>
#8217lt;NodeDesc>mindy2 HFI-1</NodeDesc>
#8217lt;NodeDetails>Node details</NodeDetails>
#8217lt;/Node>
#8217lt;/FIs>
#8217lt;Switches>
#8217lt;Node>
#8217lt;NodeGUID>0x0011750007000df6</NodeGUID>
#8217lt;NodeDesc>Switch 1234 Leaf 4</NodeDesc>
#8217lt;/Node>
#8217lt;Node>
#8217lt;NodeGUID>0x0011750007000e6d</NodeGUID>
#8217lt;NodeDesc>Switch 2345 Leaf 5</NodeDesc>
#8217lt;/Node>
#8217lt;/Switches>
#8217lt;SMs>
#8217lt;SM>
#8217lt;NodeGUID>0x0002c9020025a678</NodeGUID>
#8217lt;PortNum>1</PortNum>
#8217lt;NodeDesc>mindy2 HFI-1</NodeDesc>
#8217lt;PortGUID>0x0011750007000e6d</PortGUID>
#8217lt;NodeType>FI</NodeType>
#8217lt;SMDetails>details about SM</SMDetails>
#8217lt;/SM>
#8217lt;/SMs>
#8217lt;/Nodes>
#8217lt;/Topology>