Open whowutwut opened 5 years ago
hi @whowutwut , the object name will be displayed if the verbose option -v
is specified:
xcat-inventory import -f /tmp/osimage -v
[root@c910f03c05k21 2.0]# xcat-inventory import -f /tmp/osimage -v
loading inventory date in "/tmp/osimage"
start to import "osimage" type objects
preprocessing "osimage" type objects
converting object "lsf" to table entries
converting object "compute" to table entries
converting object "service" to table entries
converting object "bigdata" to table entries
converting object "inf" to table entries
converting object "gateway" to table entries
converting object "time" to table entries
converting object "login" to table entries
writting "osimage" type objects
writting object: lsf
writting object: compute
writting object: service
writting object: bigdata
writting object: inf
writting object: gateway
writting object: time
writting object: login
Inventory import successfully!
[root@c910f03c05k21 2.0]#
the original consideration here is to avoid screen scroll if there are too many objects
the message converting object ...
and writting object:
are not for debug, someone complains that are long time blank on screen while importing a file with many objects, user might think the command is hang and wonder whether to click CTL+C
so we add these verbose messages in each long time step
@immarvin ... I see your point.
I am more looking at how someone would import osimage and deploy ... so while you do have a point about another use case, if we were deploying an osimage from a yaml file...
Importing the following osimage: ./osimage/rhels/xcat/xcat.redhat.full.netboot.osimage.yaml
Importing image: xcat.redhat.full.netboot
Inventory import successfully!
Running xcat-inventory import -f ./somefile.yaml
would then have no way to tell us the xCAT object name that was imported from the file, where we could then directly do ....
rinstall <noderange> osimage=<??>
So when the object name is removed, it makes it harder... So we don't need to simplify the output but could we bring the object name back into the stdout, without -V option?
hi @whowutwut , get your point
is it ok to refine the output like this:
[root@c910f03c05k21 python]# xcat-inventory import -f /tmp/osimage
loading inventory date in "/tmp/osimage"
start to import "osimage" type objects
preprocessing "osimage" type objects
writting "osimage" type objects
importing object: lsf
importing object: xcat.redhat.full.netboot
importing object: compute
importing object: service
importing object: bigdata
importing object: inf
importing object: gateway
importing object: time
importing object: login
importing object: bigdata_aa_muzyncj_definitions
Inventory import successfully!
hi @whowutwut , the PR is https://github.com/xcat2/xcat-inventory/pull/163, if you are ok with the change, please feel free to merge the PR
Request a change in the externals,
Running:
I see the following output....
I'd rather this show something like this:
The other stuff is debug information and somewhere along the commits, we lost the name of the osimage that is being updated. This is useful when we want to directly run
genimage
from this without listing outlsdef -t osimage
...