I have the exact same problem too. Importing the text file with multiple computer names (one per line) produces the same result, a single computer-generated named com within the group indicated.
Instead, if explicitly names on the command line (mc.system.importSystem ('test1, test2, test3', '15 '), it is operating correctly.
Strangely, trough the API Explorer Web tools ePO, import command works correctly and pass the file name.
I think McAfee needs to fix something.
This is a bit confusing. By default, it's expecting this parameter to be the list of file names. To get the desired behavior, we have to do this instead:
>>> mc.system.importSystem(uploadFile="file:///d:\tools\tree.txt", branchNodeID=2);
The "flattenTreeStructure" parameter is either "true" or "false" and is analogous to the radio button you see when you are in the ePO console and you go to System Tree > New Systems and select "Import systems from a text file". Here you will see an option to import either "Systems and System Tree structure" (the default) or "Systems only (as a flat list)". Setting "flattenTreeStructure" to "true" is equivalent to choosing this second option: it will not build a tree structure even if one is indicated in your text file.
Very well, a warm thanks for the help!
In fact I made several tests, including using the parameter UploadFile, but I was not able to peck the correct syntax.
In fact, using the python remote client the correct syntax is:
>>> mc.system.importSystem (UploadFile = "file: / / / d: \ tools \ tree.txt" branchNodeID = '2');
Where the entire branchNodeID it should be placed in quotation marks.
Fully confirm the proper execution of the command to the remote client python.
this is working like a charm now !
Barena, thanks too but there are 2 errors : UploadFile should be uploadFile (lowercase u) and you missed the comma after the first argument
>>> mc.system.importSystem(uploadFile="file:///d:\Tools\Andre\TreeStructure.txt",branchNodeID = '2');
python seems very sensitive to the case of the letters....
I have been playing with Python a bit more, I am now doing the following call :
python.exe import.py username password d:\Tools\Andre\TreeStructure.txt 2
and import.py contains:
mc = mcafee.client('localhost','38443',usrname,pwd)
and this worked like a charm now
I am running most of my script in powershell, but I did not manage yet to run this import in powershell, so now I can just call this routine out of powershell and pass on the variables out of powershell to the python script this way.