← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1724446] Re: object string field filtering on "LIKE" statement lacks initialization

 

Reviewed:  https://review.openstack.org/512944
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=28e8265651da2aad1d253f3a47c0e71525dd5e1b
Submitter: Zuul
Branch:    master

commit 28e8265651da2aad1d253f3a47c0e71525dd5e1b
Author: Lujin <luo.lujin@xxxxxxxxxxxxxx>
Date:   Wed Oct 18 15:09:37 2017 +0900

    Add initialization in StringMatchingFilterObj class
    
    In order to support LIKE statement filter in OVO objects,
    StringMatchingFilterObj class is introduced. However, this class
    does not provide initial attributes of "starts", "contains" and
    "ends".
    
    In real usage, if these attributes are not initialized, we will
    hit failures in method apply_filters() in db/_model_query.py.
    
    This patch adds the initialization back.
    
    Secondly, a typo of "obj_utils.StringMatchingContains" is revised
    in this patch too.
    
    Change-Id: If828068d8d08ff09dff6c63d53320bc397d32448
    Closes-Bug: #1724446


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1724446

Title:
  object string field filtering on "LIKE" statement lacks initialization

Status in neutron:
  Fix Released

Bug description:
  In [1], we allow get_objects() to filter LIKE statements, i.e. starts,
  contains and ends.

  However, the parent class lacks necessary initialization of these
  three attributes.

  There is also a trivial bug in [2], the usage of LIKE statement should
  be "obj_utils.StringContains()", not
  "obj_utils.StringMatchingContains()".

  [1] https://review.openstack.org/#/c/419152/
  [2] https://github.com/openstack/neutron/blob/master/doc/source/contributor/internals/objects_usage.rst

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1724446/+subscriptions


References