use of com.emc.storageos.cinder.model.CinderQosListRestResp in project coprhd-controller by CoprHD.
the class QosService method getQosList.
/**
* Get the summary list of all Qos for the given tenant
*
* @prereq none
*
* @param openstackTenantId the URN of the tenant
*
* @brief List Qos
* @return Qos list
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })
public CinderQosListRestResp getQosList(@PathParam("tenant_id") String openstackTenantId) {
CinderQosListRestResp qosListResp = new CinderQosListRestResp();
_log.debug("START get QoS list");
List<URI> qosSpecsURI = _dbClient.queryByType(QosSpecification.class, true);
Iterator<QosSpecification> qosIter = _dbClient.queryIterativeObjects(QosSpecification.class, qosSpecsURI);
while (qosIter.hasNext()) {
QosSpecification activeQos = qosIter.next();
if (activeQos != null && hasTenantUsageAclOnQos(activeQos)) {
_log.debug("Qos Specification found, id: {}", activeQos.getId());
qosListResp.getQos_specs().add(getDataFromQosSpecification(activeQos));
}
}
_log.debug("END get QoS list");
return qosListResp;
}
Aggregations