Server - bulkAddServers
This command adds a list of servers whose names are contained in a text file.
As input, the command requires the name of a local file. The file should be in CSV format with the following rules:
- The first row in the file is treated as the header row.
- The first column in the header row must be 'Name'. All other columns are treated as property names.
- The data in the first column can be server names or IP addresses.
Use the charset argument to specify the encoding used in the CSV file. You can set charset to any of the following encodings. In the list below, the charset value is the value within parentheses. For example, some valid charset values are US-ASCII and UTF-8.
- English (US-ASCII)
- Arabic (ISO-8859-6)
- Arabic (windows-1256)
- Baltic (ISO-8859-13)
- Baltic (ISO-8859-4)
- Baltic (windows-1257)
- Central European (ISO-8859-2)
- Chinese Simplified (x-EUC-CN)
- Chinese Simplified (GB18030)
- Chinese Simplified (GBK)
- Chinese Simplified (x-mswin-936)
- Chinese Traditional (Big5)
- Chinese Traditional (Big5-HKSCS)
- Chinese Traditional (x-EUC-TW)
- Chinese Traditional (MS950-HKSCS)
- Chinese Traditional (x-windows-950)
- Cyrillic (ISO-8859-5)
- Cyrillic (windows-1251)
- Eastern European (windows-1250)
- Greek (ISO-8859-7)
- Greek (windows-1253)
- Hebrew (ISO-8859-8)
- Hebrew (windows-1255)
- Japanese (EUC-JP)
- Japanese (ISO-2022-JP)
- Japanese (Shift_JIS)
- Japanese (windows-31j)
- Korean (EUC-KR)
- Korean (ISO-2022-KR)
- Korean (x-windows-949)
- Russian (KOI8-R)
- South European (ISO-8859-3)
- Thai (TIS-620)
- Turkish (ISO-8859-9)
- Turkish (windows-1254)
- Vietnamese (windows-1258)
- Western (windows-1252)
- Western (ISO-8859-1)
- Western (ISO-8859-15)
- Unicode (UTF-8)
- Unicode (UTF-16)
- Unicode (UTF-16BE)
- Unicode (UTF-16LE)
Returns a list of Strings containing names of the servers that were added.
Return type : java.util.List
Command Input :
Directory containing the CSV file.
Local file in CSV format containing the servers to add. See above for a more complete description.
The character set used in the CSV file. Can be UTF-8 or another supported character set. For a full list of available character sets, see the list above.
Indicates whether or not you want the add process to contact the agent on each server and attempt to retrieve each server's intrinsic properties (true/false).
A csv file (servers.csv) is present in tmp directory that contains the list of servers to be added. You can use the following sample code:
blcli Server bulkAddServers /tmp servers.csv UTF-8 false
Name,CUSTOMER,ENVIRONMENT server1,Acme,Test server2,Widgets,Dev