Ask Your Question

get_members with filter not returning any values

asked 2013-12-03 13:57:55 -0600

bbb gravatar image

updated 2014-01-22 15:12:25 -0600

Evgeny gravatar image

Hey, I was trying to get the members belonging to particular pool in loadpalancer_db by calling this,


and was expecting all the members belonging to that pool. but its not returning anything. Am I missing anything and if I dont specify any filter I receive all the data. I even tried giving some false id and at that time also it did not return anything.

edit retag flag offensive close merge delete


Please recheck the filter key you are specifying is 'pool_id' and not 'pool_d'. AFAIU, if the filter key you specify is a field/column of the model, filter should work well.

unmesh-gurjar gravatar imageunmesh-gurjar ( 2013-12-04 00:31:41 -0600 )edit

this is the data i get with out any filter { *** 050496-7ea1-4cd9-87c1-644bc3ca7069', 'pool_id': u'c6cc8cea-eefc-4067-8a04-fee89a1e1014' ****} but if have any filter like get_members(context,{'pool_id':u'c6cc8cea-eefc-4067-8a04-fee89a1e1014'} its returns []. Is there any thing i am missing ?

bbb gravatar imagebbb ( 2013-12-04 01:16:00 -0600 )edit

Which version/release of Neutron are you using?

unmesh-gurjar gravatar imageunmesh-gurjar ( 2013-12-04 02:50:19 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-04 03:43:13 -0600

unmesh-gurjar gravatar image

Can you try querying as follows: get_members(context,{'pool_id':[u'c6cc8cea-eefc-4067-8a04-fee89a1e1014',]}

edit flag offensive delete link more


Thanks a lot unmesh ! it worked. Can you please tell me what's the difference? if you dont mind. Or can you guide to the source where I can read on it, as I am quite new to these.

bbb gravatar imagebbb ( 2013-12-04 13:39:38 -0600 )edit

The filters provided are applied from (using 'in_'). Which as per SQLAlchemy docs, expects a list of values.

unmesh-gurjar gravatar imageunmesh-gurjar ( 2013-12-05 02:32:02 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-12-03 13:57:55 -0600

Seen: 41 times

Last updated: Dec 03 '13