Adding External Agents in Bulk

External Agent Addition Using an XML File

The XML file created for the sole purpose of adding multiple external agents to the eG Enterprise system at one go, should contain entries of the following format:

<?xml version="1.0" encoding="UTF-8"?>

    <ExternalAgent action="add">

        <Agent>

        <Details of External Agent1>

        </Agent>

        <Agent>

        <Details of External Agent2>

        </Agent>

            .

            .

    </ExternalAgent>

For instance:

<?xml version="1.0" encoding="UTF-8"?>

    <ExternalAgent action="add">

        <Agent>

        <hostip>192.168.10.8</hostip>

        <agentname>ext8</agentname>

        </Agent>

        <Agent>

        <hostip>192.168.10.9</hostip>

        <agentname>ext9</agentname>

        </Agent>

    </ExternalAgent>

In the above example, the external agents are added using the IP address of the host. If you wish to use the host name instead of the hostip parameter, then your specification should be:

<?xml version="1.0" encoding="UTF-8"?>

    <ExternalAgent action="add">

        <Agent>

        <hostame>egurkha25</hostname>

        <agentname>ext8</agentname>

        </Agent>

        <Agent>

        <hostname>egurkha26</hostname>

        <agentname>ext9</agentname>

        </Agent>

    </ExternalAgent>

Note that the XML tags are the same as the input parameters of the ‘AddExtenalAgent’ command supported by eG CLI (see Displaying Components)

If the eG license enables the client emulation capability, the external agent specifications will include an additional <clientemulation> tag, as shown below:

<?xml version="1.0" encoding="UTF-8"?>

    <ExternalAgent action="add">

        <Agent>

        <hostip>192.168.10.8</hostip>

        <agentname>ext8</agentname>

<clientemulation>yes</clientemulation>

        </Agent>

        <Agent>

        <hostip>192.168.10.9</hostip>

        <agentname>ext9</agentname>

        </Agent>

    </ExternalAgent>

Once the XML file is created on the orchestrator’s host, invoke the following command from the orchestrator to add multiple external agents to the eG Enterprise system:

eGCLI AddExternalAgent -managerid <ManagerID> -file <Fullpath_to_the_XML_file>

For example:

eGCLI AddExternalAgent -managerID mgr153 -file c:\addextagent.xml

Note:

  • Every external agent specification should be included within the main <ExternalAgent></ExternalAgent> block only.
  • A single XML file should not contain more than one <ExternalAgent></ExternalAgent> block.
  • An XML file that is created for adding external agents should not include sections pertaining to any other operation.

External Agent Addition Using a CSV File

The CSV file created specifically for adding multiple external agents to the eG Enterprise system, should contain the following entries:

Element,action

ExternalAgent,add

Hostip/hostname,agentname

<Details of extenalagent1>

<Details of extenalagent2>

<Details of extenalagent3>

.

.

.

.

For instance:

Element,action

ExternalAgent,add

hostip,agentname

192.168.10.8,ext8

192.168.10.10,ext10

192.168.10.12,lin12

If you use the host name instead of hostip, then your specification should be:

Element,action

ExternalAgent,add

hostname,agentname

egurkha25,ext8

egurkha26,ext10

egurkha27,lin12

Note that the column names (hostip,hostname,etc.) used here are the same as the input parameters of the ‘AddExternalAgent’ command supported by eG CLI (see Displaying Components).

If the eG license enables the client emulation capability, then the CSV file should include an additional clientemulation column. Therefore, if you want to add two external agents - one to be used for client emulation and another that is not used for client emulation - then, your CSV specification should be as follows:

Element,action

ExternalAgent,add

hostip,agentname,clientemulation

192.168.10.8,ext8,yes

192.168.10.10,ext10,no

Once the CSV file is created on the orchestrator’s host, invoke the following command from the orchestrator to add multiple external agents to the eG Enterprise system:

eGCLI AddExternalAgent -managerid <ManagerID> -file <Fullpath_to_the_CSV_file>

For example:

eGCLI AddExternalAgent -managerID mgr153 -file c:\addextagent.csv