Bug 802516 - Add more time-related syntactic sugar to wallaby inventory constraints
Add more time-related syntactic sugar to wallaby inventory constraints
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: wallaby-utils (Show other bugs)
2.1
Unspecified Unspecified
low Severity unspecified
: 2.3
: ---
Assigned To: Will Benton
MRG Quality Engineering
: FutureFeature
Depends On:
Blocks: 805349
  Show dependency treegraph
 
Reported: 2012-03-12 13:40 EDT by Will Benton
Modified: 2013-01-04 10:37 EST (History)
5 users (show)

See Also:
Fixed In Version: wallaby-0.12.5-2
Doc Type: Enhancement
Doc Text:
C: The expression language supported by the "wallaby inventory -c" command was unnecessarily limited. C: Some constraint expressions, e.g., those dealing with times most appropriately expressed in units other than hours or those dealing with time comparisons, may have been cumbersome or confusing. F: The constraint language supported by the "wallaby inventory" command has been extended. R: It is thus now possible to specify constraints like "last.checkin.was_more_than 2.weeks ago" to find all nodes that have not checked in for the last two weeks.
Story Points: ---
Clone Of:
: 805349 (view as bug list)
Environment:
Last Closed: 2012-10-03 15:29:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Will Benton 2012-03-12 13:40:22 EDT
Description of problem:

"wallaby inventory -c" supports some syntactic sugar to make it easier to write constraints that deal with timestamps.  However, some confusing points remain:

1.  Users may specify, e.g., "1.hour_ago" or "4.hours_ago" to get a timestamp that corresponds to the specified time.  Being able to use other units (weeks, days, etc.) would be useful.
2.  Because of the nature of timestamp-related constraints, the expressions may appear counterintuitive; "last_checkin > 2.hours_ago" would return all nodes who have checked in more recently than two hours ago (since the timestamp of their last checkin was greater than the timestamp corresponding to two hours ago).  We'd read this constraint in colloquial English as "my last checkin was more than two hours ago," which is the opposite of what it means.

Version-Release number of selected component (if applicable):

wallaby-0.12.0-1
Comment 1 Will Benton 2012-03-12 13:46:02 EDT
You may now specify times by using years_ago, minutes_ago, weeks_ago, and days_ago in addition to hours_ago.

Furthermore, the confusing expression in #2 can now be written as "last_checkin.was_less_than 2.hours_ago"
Comment 2 Will Benton 2012-03-12 13:46:02 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C:  The expression language supported by the "wallaby inventory -c" command was unnecessarily limited.
C:  Some constraint expressions, e.g., those dealing with times most appropriately expressed in units other than hours or those dealing with time comparisons, may have been cumbersome or confusing.
F:  The constraint language supported by the "wallaby inventory" command has been extended.
R:  It is thus now possible to specify constraints like "last.checkin.was_more_than 2.weeks ago" to find all nodes that have not checked in for the last two weeks.

Note You need to log in before you can comment on or make changes to this bug.