def list_aggregates(self, resource_provider_uuid): """List resource provider aggregates. :param resource_provider_uuid: UUID of the resource provider. :raises PlacementAggregateNotFound: For failure to the aggregates of a resource provider. """ url = '/resource_providers/%s/aggregates' % resource_provider_uuid try: return self._get(url).json() except ks_exc.NotFound: raise n_exc.PlacementAggregateNotFound( resource_provider=resource_provider_uuid)
def list_aggregates(self, resource_provider_uuid): """List resource provider aggregates. :param resource_provider_uuid: UUID of the resource provider. :raises PlacementAggregateNotFound: For failure to the aggregates of a resource provider. """ url = '/resource_providers/%s/aggregates' % resource_provider_uuid try: return self._get( url, headers={API_VERSION_REQUEST_HEADER: self._openstack_api_version}).json() except ks_exc.NotFound: raise n_exc.PlacementAggregateNotFound( resource_provider=resource_provider_uuid)
def list_aggregates(self, resource_provider_uuid): """List resource provider aggregates. :param resource_provider_uuid: UUID of the resource provider :type resource_provider_uuid: str """ url = '/resource_providers/%s/aggregates' % resource_provider_uuid try: return self._get(url, headers={ 'openstack-api-version': PLACEMENT_API_WITH_AGGREGATES }).json() except ks_exc.NotFound: raise placement_exc.PlacementAggregateNotFound( resource_provider=resource_provider_uuid)
def list_aggregates(self, resource_provider_uuid): """List resource provider aggregates. :param resource_provider_uuid: UUID of the resource provider. :raises PlacementAggregateNotFound: For failure to the aggregates of a resource provider. :returns: The list of aggregates together with the resource provider generation. """ # pylint: disable=raise-missing-from url = '/resource_providers/%s/aggregates' % resource_provider_uuid try: return self._get(url).json() except ks_exc.NotFound: raise n_exc.PlacementAggregateNotFound( resource_provider=resource_provider_uuid)