UI requirements to complete support for template compliance check (BZ #1156006)
1. Add new category: Control/Explore/Policies/Compliance Policies/Template Compliance Policies
Everything should work the same as Vm Compliance Policy. Such a policy can have scope, conditions, and actions.
When a condition is saved, the resulting should have Condition.towhat = MiqTemplate.
The resulting MiqPolicy should have towhat = MiqTemplate.
2. Allow to schedule a compliance check task under Configure/Configuration/Schedules
When adding a new Schedule, Action dropbox should have a new entry called Template Compliance Check.
When Template Compliance Check is selected, the Filter dropbox should have Template related selections, same as when Template Analysis is selected for Action.
When such a schedule is saved, MiqSchedule should have the following attributes
description => "compliance check"
sched_action => "---\n:method: check_compliance"
filter => --- !ruby/object:MiqExpression
value: GM Empty Template I
towhat => MiqTemplate
Note when a saved schedule is loaded for edit and saved again, make sure the Schedule record is still valid, without changing of case or adding underscores.