Previous Topic: addItem—Add Jobs to Unsealed Local Software PolicyNext Topic: removeItem—Remove Jobs from Unsealed Local Software Policy


create—Create a Local Software Policy

This command creates a local software policy based on the specified options. You can optionally link the software policy to a local or a global computer group and populate it with jobs during the creation phase. If you are able to link and populate the policy successfully, you can also seal it.

This command has the following format:

swPolicy action=create
name=software_policy_name
[target=computer_group_name 
[groupScope={local|global}]] 
[seal[={y|n}]]
[{group=name_of_a_software_or_procedure_group|
procedures=job_file}]
[jcPriority=1…10]
[{transaction|synchronized|nolinkage}]
[rollback[={y|n}]]
[cascade[={y|n}]]
[{setup_jobs|setup&activate_jobs}]
[regenerate[={y|n}]]
[evaluateGroup[={y|n}]]
[evaluationStart=YYYY-MM-DD hh:mm]
[globalTime[={y|n}]]
[evaluationPeriod=hours]
[calendarname=calendar_name]
[{adhoc_only|adhoc_always}]
[comment=comment_on_software_policy]
[userMessage]
name

The name of the software policy created is specified with this option. This name has to be unique.

target

The name specified with this option is the name of a computer group the software policy will be linked to. The computer group must already exist. It can either be a global group at the enterprise manager or a local or global group at the domain manager.

If this option is not coded then the software policy to be created is not linked to any computer group.

groupScope

Determines the type of computer group being linked to the software policy:

«not set»

If there is a local computer group of the specified name then this one is taken, otherwise it is looked for a global one.

local

The computer group has to be a local group.

global

The computer group has to be a global group.

seal

If “seal” or “seal=y” is coded then the created policy is sealed otherwise it remains unsealed for further modifications.

The seal option is only allowed when the policy is linked and populated with the creation and it is only processed if the link and population has been successful.

group

This option specifies the name of a software or procedure group. The members of the group are used to populate the software policy during the creation process with jobs.

If this option is not coded no groups are evaluated for populating the created software policy.

The group option should not be coded with the procedures option.

procedures

This option specifies the name of a file that contains the information for generating the jobs for the software policy. For each job to be generated and assigned to the policy an entry of the following syntax has to be created in the file:

item=item_name version=item_version
procedure=procedure_name
task={activate | configure | install | uninstall}
[installedWith=install_procedure_name]
[after={exacttime | boottime}]
[reinstall={y|n}]
[preaction={none | reboot | logoff}]
[postaction={none | reboot | logoff | rebootAtEnd | logoffAtEnd | shutdownAtEnd}]
[promptUser={y|n}]
[allowCancel={y|n}]
[execTimedOut={y|n}]
[offline={y|n}]
[runAtShutdown={y|n}]
[preventLogon={y|n}]
[triggeredByScalSrv={y|n}]
[globaltime={y|n}]
[calendarname=delivery_calendar_name]
[noCalendar={y|n}]
[resolveQuery={y|n}]
[stagingServer={y|n}]
[parameters=user_parameters]
[prompt=d.h]
[jobTimeout=d.h]
[repeat={y|n}]

There should be only one entry per line and an entry should not span over more than one line. The entry has to begin with the parameters “item”, “version”, “procedure” and “task” and they have to appear in this sequence. The order of the remaining parameters is arbitrary. Parameter values containing blanks should be enclosed in quotes (“). If a parameter value contains a quote it should be duplicated.

For the meaning of the parameters please have a look at “cadsmcmd swPolicy action=addItem”.

The procedures option should not be coded with the group option.

jcPriority

This option specifies the job container priority used by the policy to create a job container for launching its SD orders. A valid priority is one of the values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. 10 is the lowest priority and 1 is the highest. If the option is not coded the priority 5 is set.

{transaction|synchronized|nolinkage}

This option specifies the job linkage within the job container created by the policy for launching the SD orders.

«not coded»

No linkage between orders.

transaction

Batch job execution without transaction.

synchronized

Synchronized job execution.

nolinkage

No linkage between the orders.

rollback

If the option “rollback” or “rollback=y” is coded then the job linkage is set to "Enable Transaction". If the option is coded as “rollback=n” then “Enable Transaction” is not set.

Default is “rollback=n”.

The parameter should only be coded if parameter "transaction" is coded with this command.

cascade

If the option “cascade” or “cascade=y” is coded then the SD will resolve the dependencies of cascaded installation request and add the missing installation orders automatically. If the option is coded as “cascade=n” then the dependency is not resolved.

Default is “cascade”.

{setup_jobs|setup&activate_jobs}

This option drives the results of the policy’s evaluation:

«not coded»

The SD checks only for conformity while evaluating the policy and reports the non conform targets but no jobs are generated for transferring the non conformant targets into conformant.

setup_jobs

As a result of the evaluation the SD generates jobs for transferring all non conformant targets into conformant ones but these jobs are not launched for execution. The latter is left to the user.

setup&activate_jobs

As a result of the evaluation the SD generates jobs for transferring all non conformant targets into conformant ones and launches them for execution.

regenerate

If the option “regenerate” or “regenerate=y” is coded then all jobs that failed earlier and have not been completed successfully yet are rescheduled for execution for achieving conformity. If the option “regenerate=n” is coded then this rescheduling is skipped.

Default is “regenerate”.

evaluateGroup

If the option “evaluateGroup” or “evaluateGroup=y” is coded then in case of a query group associated with the policy this group will be re-evaluated during the policy’s evaluation too. If “evaluationGroup=n” is coded then this re-evaluation of the group will not happen.

Default is “evaluateGroup=n”.

evaluationStart

This option specifies the earliest point in time when the evaluation of the policy will start. The value is specified in ISO format “YYYY-MM-DD hh:mm” where YYYY specifies the year, MM the month, DD the current day of month, hh the hour and mm the minute. If this option is not coded the current time is taken.

globalTime

This option specifies whether the time specifications with the policy are based on enterprise time or domain time. If this option is coded then the time is enterprise base otherwise it is domain time.

evaluationPeriod

This option specifies the period the evaluations of the policy takes place. The value is specified in hours. If 0 is specified then the evaluation happens only once.

calendarname

This option specifies the name of the calendar used by the SD for scheduling the time driven actions of the policy.

{adhoc_only|adhoc_always}

This option specifies whether SD evaluates this policy when a target reports its inventory or not and it specifies the mode of processing:

«not coded»

The policy evaluation is not initiated by any target inventory reports.

adhoc_only

The evaluation is started by inventory reports of new or re-installed targets.

ad_hoc_always

The evaluation is started by any inventory reports from targets.

comment

The option specifies a comment that is stored with the policy.

userMessage

Specifies the custom administrator message for a software policy.

Note: You should be aware of the following: