Bug 802516 - Add more time-related syntactic sugar to wallaby inventory constraints
Summary: Add more time-related syntactic sugar to wallaby inventory constraints
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: wallaby-utils
Version: 2.1
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: 2.3
: ---
Assignee: Will Benton
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks: 805349
TreeView+ depends on / blocked
 
Reported: 2012-03-12 17:40 UTC by Will Benton
Modified: 2013-01-04 15:37 UTC (History)
5 users (show)

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.
Clone Of:
: 805349 (view as bug list)
Environment:
Last Closed: 2012-10-03 19:29:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Will Benton 2012-03-12 17:40:22 UTC
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 17:46:02 UTC
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 17:46:02 UTC
    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.