]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Support 'alive' filter for get_agents() in agents_db
authorNuman Siddique <numan.siddique@enovance.com>
Wed, 10 Dec 2014 20:37:24 +0000 (02:07 +0530)
committerNuman Siddique <numan.siddique@enovance.com>
Wed, 17 Dec 2014 04:05:01 +0000 (09:35 +0530)
commitb08fe1b9dc4b7247c5ed8c4f2e1c8e07ba56a739
treeafcd6350ffc0f526aad072fbc10bed512aa488ec
parent6054d5d01ed6b30f71ddb85e7e0c6f63c6d2031c
Support 'alive' filter for get_agents() in agents_db

Presently 'alive' filter is not supported when the
neutron cli calls 'neutron agent_list --alive False'.

This patch fixes the issue by pruning the agent list
according to the 'alive' filter. If the client passes
invalid value to the alive filter, then InvalidInput
exception is raised.

DocImpact
APIImpact

Change-Id: I8935c09d82f6e88252560a5232adf22002cbae08
Closes-bug: #1398398
neutron/db/agents_db.py
neutron/tests/unit/db/test_agent_db.py