support the old inventory format with ',' delimited string of list
capture error during file copying
UT:
[root@c910f03c01p13 test_myimage]# xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage
loading inventory date in "/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json"
start to import "osimage" type objects
preprocessing "osimage" type objects
writting "osimage" type objects
Inventory import successfully!
Warning: the / already exists, will be overwritten
Error encountered while copying "/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/" to "/":
[Errno 21] Is a directory: '/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/'
[root@c910f03c01p13 test_myimage]# xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage
loading inventory date in "/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json"
start to import "osimage" type objects
preprocessing "osimage" type objects
writting "osimage" type objects
Inventory import successfully!
Warning: the file "/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/aa" of osimage "test_myimage" does not exist!
Warning: the /tmp/test_myimage/exlist already exists, will be overwritten
Warning: the /tmp/test_myimage/synclists already exists, will be overwritten
Warning: the /tmp/test_myimage/postinstall already exists, will be overwritten
Warning: the /tmp/test_myimage/otherpkglist already exists, will be overwritten
Warning: the /tmp/test_myimage/partitionfile already exists, will be overwritten
The object test_myimage has been imported
[root@c910f03c01p13 test_myimage]#
fix issue https://github.com/xcat2/xcat-inventory/issues/153:
[root@c910f03c01p13 test_myimage]# xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage loading inventory date in "/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json" start to import "osimage" type objects preprocessing "osimage" type objects writting "osimage" type objects Inventory import successfully! Warning: the file "/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/aa" of osimage "test_myimage" does not exist! Warning: the /tmp/test_myimage/exlist already exists, will be overwritten Warning: the /tmp/test_myimage/synclists already exists, will be overwritten Warning: the /tmp/test_myimage/postinstall already exists, will be overwritten Warning: the /tmp/test_myimage/otherpkglist already exists, will be overwritten Warning: the /tmp/test_myimage/partitionfile already exists, will be overwritten The object test_myimage has been imported [root@c910f03c01p13 test_myimage]#