Search in sources :

Example 1 with HostAggregates

use of com.woorea.openstack.nova.model.HostAggregates in project so by onap.

the class NovaClientImpl method queryHostAggregates.

/**
 * Query Host Aggregates
 *
 * @param cloudSiteId the cloud site id
 * @param tenantId the tenant id
 * @param limit limits the number of records returned
 * @param marker the last viewed record
 * @return the list of host aggregates found in openstack
 * @throws MsoCloudSiteNotFound the mso cloud site not found
 * @throws NeutronClientException if the client cannot be built this is thrown
 */
public HostAggregates queryHostAggregates(String cloudSiteId, String tenantId, int limit, String marker) throws MsoCloudSiteNotFound, NovaClientException {
    try {
        Nova novaClient = client.getNovaClient(cloudSiteId, tenantId);
        OpenStackRequest<HostAggregates> request = novaClient.aggregates().list().queryParam("limit", limit).queryParam("marker", marker);
        return executeAndRecordOpenstackRequest(request, false);
    } catch (MsoException e) {
        logger.error("Error building Nova Client", e);
        throw new NovaClientException("Error building Nova Client", e);
    }
}
Also used : HostAggregates(com.woorea.openstack.nova.model.HostAggregates) MsoException(org.onap.so.openstack.exceptions.MsoException) Nova(com.woorea.openstack.nova.Nova)

Aggregations

Nova (com.woorea.openstack.nova.Nova)1 HostAggregates (com.woorea.openstack.nova.model.HostAggregates)1 MsoException (org.onap.so.openstack.exceptions.MsoException)1