Bug 1112646

Summary: [RFE] LVM selection criteria - add support for selection criteria shortcuts
Product: [Fedora] Fedora Reporter: Peter Rajnoha <prajnoha>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: agk, bmarzins, bmr, heinzm, jonathan, lvm-team, msnitzer, prajnoha, zkabelac
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-08-12 10:34:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Rajnoha 2014-06-24 12:00:45 UTC
(from bug #867376 comment #8)

Another extensions may include shortcuts like:

'lvs --select name=[a || b || c]' which would be equal to 'lvs --select name=a || name=b || name=c' (this should be easy to add).

If found usable for some situations, maybe also transitive comparisons could be recognized:

'lvs --select lv_name=vg_name=abc' which would be equal to 'lvs --select lv_name=abc && vg_name=abc'

Explore more shortcuts that can be made to help creating more complex statements with less words (but keep the syntax simple!).

Comment 1 Peter Rajnoha 2014-06-24 12:07:22 UTC
(In reply to Peter Rajnoha from comment #0)
> If found usable for some situations, maybe also transitive comparisons could
> be recognized:
> 
> 'lvs --select lv_name=vg_name=abc' which would be equal to 'lvs --select
> lv_name=abc && vg_name=abc'

...or maybe 'lvs --select [lv_name,vg_name]=[abc...]' (this is probably easier to recognize for the parses because with the lv_name=vg_name=abc we have to take care whether the vg_name is the value to compare with or the field name (though the rule would be simple - count the number of operators chained and the value is typed after the last one). Explore what's better/more efficient and less error prone.

Comment 2 Peter Rajnoha 2024-08-12 10:34:45 UTC
No plan to implement this unless there's a demand from users.