Merge "Make instance_get_all_*() funtions support the smart extra.$foo columns"
This commit is contained in:
commit
cf17339af6
@ -1901,6 +1901,9 @@ def instance_get_all_by_filters_sort(context, filters, limit=None, marker=None,
|
||||
|
||||
query_prefix = session.query(models.Instance)
|
||||
for column in columns_to_join_new:
|
||||
if 'extra.' in column:
|
||||
query_prefix = query_prefix.options(undefer(column))
|
||||
else:
|
||||
query_prefix = query_prefix.options(joinedload(column))
|
||||
|
||||
# Note: order_by is done in the sqlalchemy.utils.py paginate_query(),
|
||||
@ -2229,6 +2232,9 @@ def instance_get_active_by_window_joined(context, begin, end=None,
|
||||
_manual_join_columns(columns_to_join))
|
||||
|
||||
for column in columns_to_join_new:
|
||||
if 'extra.' in column:
|
||||
query = query.options(undefer(column))
|
||||
else:
|
||||
query = query.options(joinedload(column))
|
||||
|
||||
query = query.filter(or_(models.Instance.terminated_at == null(),
|
||||
|
Loading…
Reference in New Issue
Block a user