HomeClusterLabs Projects

Fix: libpe_status: Rework pe_cron_range_satisfied.

Description

Fix: libpe_status: Rework pe_cron_range_satisfied.

Instead of simply returning a boolean for whether a date falls within a
given range or not, this function now returns one of the
pe_eval_date_result_t values, allowing for more detailed checking.

First, this function attempts to check from broadest to narrowest now -
it starts with years and works its way down to seconds. It then works
on the week/day based ranges and finally checks phase of the moon.
Any field not present is still ignored.

Then, I've gotten rid of the cron_check macro and reimplemented that as
a couple different functions just to make it all less weird.

Details

Provenance
clumensAuthored on Feb 25 2020, 8:31 AM
Parents
rPc66a2b6115b2: Feature: tools: Allow crm_rule to check some date_specs.
Branches
Unknown
Tags
Unknown

Event Timeline