in postgresql case sensitive comparison =(

To get murano-engine to pass domain_name instead of domain_id I did not
succeed. devstack all in the works, as a comparison
query.filter_by(name=project_name) in mysql are case insensitive

workaround:

--- /usr/lib/python2.7/dist-packages/keystone/resource/backends/sql.py.old      
2016-05-17 01:46:39.653472179 +0300
+++ /usr/lib/python2.7/dist-packages/keystone/resource/backends/sql.py  
2016-05-17 01:36:22.186652560 +0300
@@ -18,6 +18,7 @@
 from keystone import exception
 from keystone.i18n import _LE, _LW
 from keystone import resource as keystone_resource
+from sqlalchemy import func

 LOG = log.getLogger(__name__)

@@ -51,7 +52,7 @@
     def get_project_by_name(self, project_name, domain_id):
         with sql.session_for_read() as session:
             query = session.query(Project)
-            query = query.filter_by(name=project_name)
+            query = 
query.filter(func.lower(Project.name)==func.lower(project_name))
             if domain_id is None:
                 query = query.filter_by(
                     domain_id=keystone_resource.NULL_DOMAIN_ID)


** Package changed: murano (Ubuntu) => murano

** Project changed: murano => keystone

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1580611

Title:
  murano-engine cannot authenticate to keystone

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to