Merge "Support to list software configs"
This commit is contained in:
@@ -306,6 +306,14 @@ def software_config_get(context, config_id):
|
||||
return IMPL.software_config_get(context, config_id)
|
||||
|
||||
|
||||
def software_config_get_all(context, limit=None, marker=None,
|
||||
tenant_safe=True):
|
||||
return IMPL.software_config_get_all(context,
|
||||
limit=limit,
|
||||
marker=marker,
|
||||
tenant_safe=tenant_safe)
|
||||
|
||||
|
||||
def software_config_delete(context, config_id):
|
||||
return IMPL.software_config_delete(context, config_id)
|
||||
|
||||
|
||||
@@ -873,6 +873,15 @@ def software_config_get(context, config_id):
|
||||
return result
|
||||
|
||||
|
||||
def software_config_get_all(context, limit=None, marker=None,
|
||||
tenant_safe=True):
|
||||
query = model_query(context, models.SoftwareConfig)
|
||||
if tenant_safe:
|
||||
query = query.filter_by(tenant=context.tenant_id)
|
||||
return _paginate_query(context, query, models.SoftwareConfig,
|
||||
limit=limit, marker=marker).all()
|
||||
|
||||
|
||||
def software_config_delete(context, config_id):
|
||||
config = software_config_get(context, config_id)
|
||||
session = orm_session.Session.object_session(config)
|
||||
|
||||
Reference in New Issue
Block a user