Skip to content

Instantly share code, notes, and snippets.

@manjeetbhati
Created October 6, 2016 20:50
Show Gist options
  • Save manjeetbhati/72b2424639f4da5ace17c409e83a61a6 to your computer and use it in GitHub Desktop.
Save manjeetbhati/72b2424639f4da5ace17c409e83a61a6 to your computer and use it in GitHub Desktop.
query = self._get_collection_query(context, agent_model.Agent,
filters=filters)
columns = (agent_obj.Agent.admin_state_up,
agent_obj.Agent.availability_zone,
agent_obj.Agent.agent_type)
for agent in query.with_entities(*columns).group_by(*columns):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment