Create Location Awareness configuration policy in command line
search cancel

Create Location Awareness configuration policy in command line

book

Article ID: 420167

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation

Issue/Introduction

How to create a configuration policy for Location Awareness rules in command line ?

Environment

Client Automation - All Versions

Resolution

  1. Create a xml file (loc.xml) containing the Location awareness rules like this :

    Example for 3 rules :

    <configuration>
      <allusers>
        <paramsection name="itrm">
          <paramsection name="agent">
            <paramsection name="solutions">
              <paramsection name="generic">
                <paramsection name="LocationAware" orgname="LocationAware">
                  <paramsection name="Locations" orgname="Locations">
                      <attribute name="type">table</attribute>
                      <attribute name="table">yes</attribute>

                      <paramsection name="Loc1" orgname="Loc1">
                        <parameter orgname="Location Name" name="Location Name" entity="Manager" value="PARIS"/>
                        <parameter orgname="Priority" name="Priority" entity="Manager" value="10"/>
                      <parameter orgname="Address Range" name="Address Range" entity="Manager" value="192.0.2.1-192.0.2.20"/>
                        <parameter orgname="Scalability Server" name="Scalability Server" entity="Manager" value=""/>
                        <parameter orgname="Subnet Scan" name="Subnet Scan" entity="Manager" value=""/>
                        <parameter orgname="Script" name="Script" entity="Manager" value=""/>
                        <parameter orgname="Alternate Scalability Server" name="Alternate Scalability Server" entity="Manager" value=""/>
                        <parameter orgname="Maximum Package Size" name="Maximum Package Size" entity="Manager" value="0"/>
                        <parameter orgname="Throttle factor" name="Throttle factor" entity="Manager" value="0"/>
                      </paramsection>

                      <paramsection name="Loc2" orgname="Loc2">
                        <parameter orgname="Location Name" name="Location Name" entity="Manager" value="BERLIN"/>
                        <parameter orgname="Priority" name="Priority" entity="Manager" value="10"/>
                      <parameter orgname="Address Range" name="Address Range" entity="Manager" value="192.0.2.21-192.0.2.50"/>
                        <parameter orgname="Scalability Server" name="Scalability Server" entity="Manager" value=""/>
                        <parameter orgname="Subnet Scan" name="Subnet Scan" entity="Manager" value=""/>
                        <parameter orgname="Script" name="Script" entity="Manager" value=""/>
                        <parameter orgname="Alternate Scalability Server" name="Alternate Scalability Server" entity="Manager" value=""/>
                        <parameter orgname="Maximum Package Size" name="Maximum Package Size" entity="Manager" value="0"/>
                        <parameter orgname="Throttle factor" name="Throttle factor" entity="Manager" value="0"/>
                      </paramsection>

                      <paramsection name="Loc3" orgname="Loc3">
                        <parameter orgname="Location Name" name="Location Name" entity="Manager" value="MADRID"/>
                        <parameter orgname="Priority" name="Priority" entity="Manager" value="10"/>
                      <parameter orgname="Address Range" name="Address Range" entity="Manager" value="192.18.0.*"/>
                        <parameter orgname="Scalability Server" name="Scalability Server" entity="Manager" value=""/>
                        <parameter orgname="Subnet Scan" name="Subnet Scan" entity="Manager" value=""/>
                        <parameter orgname="Script" name="Script" entity="Manager" value=""/>
                        <parameter orgname="Alternate Scalability Server" name="Alternate Scalability Server" entity="Manager" value=""/>
                        <parameter orgname="Maximum Package Size" name="Maximum Package Size" entity="Manager" value="0"/>
                        <parameter orgname="Throttle factor" name="Throttle factor" entity="Manager" value="0"/>
                      </paramsection>

                  </paramsection>
                </paramsection>
              </paramsection>
            </paramsection>
          </paramsection>
        </paramsection>
      </allusers>
    </configuration>

     

  2. Execute following command

    ccnfregdb -f loc.xml -name polname -o



    Replace polname by the name of the configuration policy

    Remarks :
    - If the configuration policy does not exist, it will be created
    - If the configuration policy already exists and contains others settings, Location Awareness is added and others settings are kept
    - If the configuration policy already exists and contains already a location Awareness table, this table is overwritten by the table from the xml file.