Modifying Zones in Bulk
Modifying Zones Using an XML File
An XML file is created exclusively for modifying multiple Zone specifications. In order to associate the elements in the Zone, entries in this file should be of the following format:
<?xml version="1.0" encoding="UTF-8"?>
<Zone action="modify">
<Element>
<associateelements><comma-separated list of elements></associateelements>
<zonename><Name of the zone></zonename>
</Element>
.
.
.
</Zone>
Note that the elements should be specified in the format:<Component Type>:<component name>:<Port>
For instance:
<?xml version="1.0" encoding="UTF-8" ?>
<Zone action="modify">
<Element>
<associateelements>2x client gateway:client3:80,2x client gateway:client4:80</associateelements>
<zonename>zone1</zonename>
</Element>
<Element>
<associateelements>Segment:segment1</associateelements>
<zonename>zone2</zonename>
</Element>
</Zone>
If you wish to disassociate the elements in the Zone, entries in this file should be of the following format:
<?xml version="1.0" encoding="UTF-8"?>
<Zone action="modify">
<Element>
<disassociateelements><comma-separated list of elements></disassociateelements>
<zonename><Name of the zone></zonename>
</Element>
.
.
.
</Zone>
Note that the elements should be specified in the format:<Component Type>:<component name>:<Port>
For instance:
<?xml version="1.0" encoding="UTF-8" ?>
<Zone action="modify">
<Element>
<disassociateelements>Service:service1</disassociateelements>
<zonename>zone3</zonename>
</Element>
</Zone>
Note that the XML tags are the same as the input parameters of the ‘ModifyZone’ command supported by eG CLI (see Modifying a Zone)
Once the XML file is created on the orchestrator’s host, invoke the following command from the orchestrator to update the eG manager with all the modifications contained in the XML file:
egcli modifyzone -managerid <ManagerID> -file <Fullpath_to_the_XML_file>
For example:
egcli modifyzone -managerid mgr153 -file E:\bulkmodifyZone.xml
Note:
- Every Zone specification should be included within the main <Zone></Zone> block only.
- A single XML file should not contain more than one <Zone></Zone> block.
- An XML file that is created for modifying Zone details should not include sections pertaining to any other operation.
- A single XML file can be used for modifying the details of Zones of different types.
Modifying Zones Using a CSV File
As already mentioned, an exclusive CSV file will have to be created to handle bulk modifications to Zone details.
In order to associate the elements in the Zone, entries in this file should be of the following format:
Element,action
Zone,modify
zonename,associateelements
zonename,“<comma-separated list of elements>”
.
.
.
Note that the elements should be specified in the format:<Component Type>:<component name>:<Port>
For example:
Element,action
Zone,modify
zonename,associateelements
zonedemo,"2x client gateway:client3:80,2x Publishing Agent:agent1:20002,Microsoft Windows:wincli1"
zonedemo1,”Group:group1,Group:group1new"
If you wish to disassociate the elements in the Zone, entries in this file should be of the following format:
Element,action
Zone,modify
zonename,disassociateelements
zonename,“<comma-separated list of elements>”
.
.
.
Note that the elements should be specified in the format:<Component Type>:<component name>:<Port>
For example:
Element,action
Zone,modify
zonename,disassociateelements
zonedemo,"2x client gateway:client3:80,2x Publishing Agent:agent1:20002,Microsoft Windows:wincli1"
zonedemo1,”Group:group1,Group:group1new"
Once the CSV file is created on the orchestrator’s host, invoke the following command from the orchestrator to update the eG manager with all the modifications contained in the CSV file:
egcli modifyzone -managerid <ManagerID> -file <Fullpath_to_the_CSV_file>
For example:
egcli modifyzone -managerid mgr153 -file E:\bulkmodifyzone.csv