use of com.emc.storageos.cinder.model.CinderQosDetail in project coprhd-controller by CoprHD.
the class QosService method getQosDetails.
/**
* Get the details of given Qos for the given tenant
*
* @prereq none
*
* @param openstackTenantId the URN of the tenant
* @param qosId the URN of the QoS
*
* @brief List Qos in detail
* @return Qos detailed list
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{qos_id}")
@CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })
public CinderQosDetail getQosDetails(@PathParam("tenant_id") String openstackTenantId, @PathParam("qos_id") String qosId) {
CinderQosDetail qosDetailed = new CinderQosDetail();
_log.debug("START get QoS specs detailed");
URI qosURI = URIUtil.createId(QosSpecification.class, qosId);
QosSpecification qosSpecification = _dbClient.queryObject(QosSpecification.class, qosURI);
if (qosSpecification != null && hasTenantUsageAclOnQos(qosSpecification)) {
_log.debug("Fetched Qos Specification, id: {}", qosSpecification.getId());
qosDetailed.qos_spec = getDataFromQosSpecification(qosSpecification);
// Self link points on a Virtual Pool assigned to Qos
VirtualPool virtualPool = _dbClient.queryObject(VirtualPool.class, qosSpecification.getVirtualPoolId());
if (virtualPool != null) {
qosDetailed.setLink(DbObjectMapper.toLink(virtualPool));
}
}
_log.debug("END get QoS specs detailed");
return qosDetailed;
}
Aggregations