How to import multiple objects into R80.x Management database using .csv file and then add them to a group:
.csv files needs to be where you will be running the commands from:
Create the .csv file:
Note: using underscore character in .csv file (for example, “network1_1”) can cause errors. Use the hyphen instead.
Run the API command:
#mgmt_cli add network –batch networks.csv
Then to add the objects to the right group use:
mgmt_cli set group –batch group-members_full_csv.csv
The CSV should have the following header row:
The name field is for the group and the members.add field will be the host object to add to the group.
The rest of the body of the CSV would then be filled in as you wish: