Bug 845297

Summary: Missing search queries for Quota usability
Product: Red Hat Enterprise Virtualization Manager Reporter: Doron Fediuck <dfediuck>
Component: ovirt-engineAssignee: Laszlo Hornyak <lhornyak>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: high    
Version: 3.1.0CC: dfediuck, dyasny, gchaplik, iheim, lpeer, lsvaty, mkenneth, Rhev-m-bugs, sgordon, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: FutureFeature, TechPreview
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: si14 Doc Type: Technology Preview
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Doron Fediuck 2012-08-02 15:08:45 UTC
Description of problem:

For quota porposes, the user should be able to look for
VMs, templates and disks which have no quota assignment.

Additional info:

When a user moves from permissive to enforcing, he
should be able to go to the VM (templates/disks) tab and
use a query such as:
VMs: quota == unassigned

or 

VMs: quota == 'quota18'

Comment 1 Laszlo Hornyak 2012-08-03 14:52:25 UTC
It is possible to solve, but the search syntax may be misleading for the users for two reasons:
 - the == operator is not used in search
 - the quotes are not used for strings

What about an sql-like "is null" syntax?

e.g.

 - VM : quota is null
 - VM : quota is not null
 - VM : quota = foo
 - VM : quota != bar

Comment 2 Doron Fediuck 2012-08-04 09:07:51 UTC
(In reply to comment #1)
> It is possible to solve, but the search syntax may be misleading for the
> users for two reasons:
>  - the == operator is not used in search
>  - the quotes are not used for strings
> 
> What about an sql-like "is null" syntax?
> 
> e.g.
> 
>  - VM : quota is null
>  - VM : quota is not null
>  - VM : quota = foo
>  - VM : quota != bar

Very well. Can we use undefined instead of null?

Comment 3 Laszlo Hornyak 2012-08-06 05:20:53 UTC
Ok, the undefined sounds better for me, null is very technical.

So the search queries would be
  - VM : quota is undefined
  - VM : quota is not undefined

Comment 4 Laszlo Hornyak 2012-08-06 08:51:57 UTC
We agreed in the following with Doron:

- the 'is null' syntax will not be supported
- the 'undefined' and 'null' strings will be handled as an exception by the search query backend, it will be translated into  'is null'/'is not null'

so the search syntax can be like this:
- 'VM : quota = undefined' or alternatively 'VM : quota = null'
- 'VM : quota != undefined' or 'VM : quota != null'
- 'VM : quota != myquota' to search for non-null values the good old way

Comment 5 Laszlo Hornyak 2012-08-06 09:29:04 UTC
update for the above:

- 'undefined' will not be supported, only 'null' is

Comment 10 Yaniv Kaul 2012-08-08 15:57:16 UTC
Reminder to QE: this is TechPreview.

Comment 12 Laszlo Hornyak 2012-08-09 07:40:11 UTC
Another pile of patches, some replacing one from the previous, some just splitting the patches into two. Basically the whole thing does the same.

remote:   http://gerrit.ovirt.org/7035
remote:   http://gerrit.ovirt.org/7036
remote:   http://gerrit.ovirt.org/7037
remote:   http://gerrit.ovirt.org/7038
remote:   http://gerrit.ovirt.org/7039
remote:   http://gerrit.ovirt.org/7040
remote:   http://gerrit.ovirt.org/7041
remote:   http://gerrit.ovirt.org/7042
remote:   http://gerrit.ovirt.org/7043
remote:   http://gerrit.ovirt.org/7044

Comment 13 Laszlo Hornyak 2012-08-10 13:26:11 UTC
merged upstream

Comment 17 Gilad Chaplik 2012-08-13 09:33:06 UTC
merged upstream (9e486c23dcb27b1329b77e0b69f533a15e81b029..380fe0992629bd13e4eb6fa770f2be8f994eccf8)