1
2ethxmlgenerate(8)            EFSFFCLIRG (Man Page)           ethxmlgenerate(8)
3
4
5

NAME

7       ethxmlgenerate
8
9
10
11       Takes  comma-separated-values  (CSV)  data  as  input and generates se‐
12       quences of XML containing user-specified element names and element val‐
13       ues within start and end tag specifications. Use this tool to create an
14       XML representation of fabric data from its CSV form.
15

Syntax

17       ethxmlgenerate [-v] [-d  delimiter] [-i  number] [-g  element]
18
19       [-h  element] [-e  element] [-X  input_file] [-P  param_file]
20

Options

22       --help
23
24                 Produces full help text.
25
26
27       -g/--generate element
28
29                 Generates value for element using value in  next  field  from
30                 the  input  file.  Can  be used multiple times on the command
31                 line. Values are assigned to elements in order.
32
33
34       -h/--header element
35
36                 Name of the XML element that is the  enclosing  header  start
37                 tag.
38
39
40       -e/--end element
41
42                 Name of the XML element that is the enclosing header end tag.
43
44
45       -d/--delimit delimiter
46
47                 Specifies  the  delimiter  character that separates values in
48                 the input file. Default is semicolon.
49
50
51       -i/--indent number
52
53                 Number of spaces to indent each level of XML output.  Default
54                 is 0.
55
56
57       -X/--infile input_file
58
59                 Generates  XML  from  CSV  in input_file. One record per line
60                 with fields in each record separated by the specified  delim‐
61                 iter.
62
63
64       -P/--pfile param_file
65
66                 Uses input command line options (parameters) from param_file.
67
68
69       -v/--verbose
70
71                 Produces  verbose  output.  Includes  output progress reports
72                 during extraction.
73
74
75

Details

77       ethxmlgenerate takes the CSV data from  an  input  file.  It  generates
78       fragments of XML, and in combination with a script, can be used to gen‐
79       erate complete XML sequences. ethxmlgenerate does not use nor require a
80       connection to an Intel(R) Ethernet Fabric.
81
82       ethxmlgenerate reads CSV element values and applies element (tag) names
83       to those values. The element names are supplied as command line options
84       to the tool and constitute a template that is applied to the input.
85
86       Element names on the command line are of three (3) types, distinguished
87       by their command line option - Generate, Header,  and  Header_End.  The
88       Header  and  Header_End  types  together  constitute  enclosing element
89       types. Enclosing elements do not contain a value, but serve to separate
90       and organize Generate elements.
91
92       Generate  elements,  along  with a value from the CSV input file, cause
93       XML in the form of <element_name> value</element_name> to be generated.
94       Generate  elements  are  normally  the majority of the XML output since
95       they specify elements containing  the  input  values.  Header  elements
96       cause  an XML header start tag of the form: <element_name> to be gener‐
97       ated. Header_End elements cause an XML header end tag of the form </el‐
98       ement_name> to be generated. Output of enclosing elements is controlled
99       entirely by the placement of those element types on the  command  line.
100       ethxmlgenerate does not check for matching start and end tags or proper
101       nesting of tags.
102
103       Options (parameters) to ethxmlgenerate can be specified on the  command
104       line,  with  a  parameter  file, or both. A parameter file is specified
105       with -P param_file. When a parameter file specification is  encountered
106       on  the  command  line,  option  processing on the command line is sus‐
107       pended, the parameter file is read and  processed  entirely,  and  then
108       command  line  processing  is resumed. Option syntax within a parameter
109       file is the same as on the command line. Multiple parameter file speci‐
110       fications  can  be  made, on the command line or within other parameter
111       files. At each point that a parameter file is specified, current option
112       processing is suspended while the parameter file is processed, then re‐
113       sumed. Options are processed in the order they are encountered  on  the
114       command  line or in parameter files. A parameter file can be up to 8192
115       bytes in size and may contain up to 512 parameters.
116
117

Using ethxmlgenerate to Create Topology Input Files

119       ethxmlgenerate can be used to create scripts to  translate  from  user-
120       specific  format into the ethreport topology_input file format. ethxml‐
121       generate itself works against a  CSV  style  file  with  one  line  per
122       record. Given such a file it can produce hierarchical XML output of ar‐
123       bitrary complexity and depth.
124
125       The typical flow for a script which  translates  from  a  user-specific
126       format into ethreport topology_input would be:
127
128       •      As  needed,  reorganize  the  data  into  link and node data CSV
129              files, in a sequencing similar to that used by ethreport  topol‐
130              ogy_input.  One  link  record per line in one temporary file and
131              one node record per line in another temporary file.
132
133       •      The script must directly output the boilerplate for XML version,
134              etc.
135
136       •      ethxmlgenerate  can  be  used  to output the Link section of the
137              topology_input, using the link record temporary file.
138
139       •      ethxmlgenerate can be used to output the Node  sections  of  the
140              topology_input using the node record temporary file. If desired,
141              there could be separate node record temporary files  for  NIC  s
142              and Switches.
143
144       •      The script must directly output the closing XML tags to complete
145              the topology_input file.
146
147
148
149Copyright(C) 2020-2022         Intel Corporation             ethxmlgenerate(8)
Impressum