[Openstack] Getting size of volume_type using API

John Griffith john.griffith at solidfire.com
Wed Aug 6 21:04:08 UTC 2014


On Wed, Aug 6, 2014 at 1:27 PM, Sekhar Vajjhala <sekharv01 at gmail.com> wrote:

> Thanks.
>
> So seems like there is no way for me to the following : Allocate a volume
> of a given size from a volume_type using an API but only if volume_type has
> sufficient space. I can create a volume of a given size from a volume_type
> using API, and if there is insufficient space, then the API call will fail
> .
>
​Not sure I follow you're relationship of "size" and "volume-type" here.
 What you describe here is exactly how it works; user requests a volume of
type 'foo' and size 100Gig... the scheduler then checks for a host that can
in fact provide a volume of type 'foo', it also checks to see if said
backend has enough free-space.  If it does... great, if it does not, the
create will fail.

Not that this model works for a number of things that we call
specifications, that can be embedded in the volume-type.

Hope that helps, if I missed the point of your question please do let me
know.

Thanks,
John​

>
> Any other suggestions ?
>
> Thanks,
> Sekhar Vajjhala
>
>
>
> On Wed, Aug 6, 2014 at 11:43 AM, Jyoti Ranjan <jranjan at gmail.com> wrote:
>
>> No, there is no way at this point of time. Also, it is little bit
>> difficult expectation because we may attach more than one physical devices
>> (say HP 3PAR CPG) to same volume type.
>>
>>
>> On Wed, Aug 6, 2014 at 1:31 AM, Sekhar Vajjhala <sekharv01 at gmail.com>
>> wrote:
>>
>>> Is there a way to get the size of a volume_type using an API.
>>> According to the docs
>>> http://developer.openstack.org/api-ref-compute-v2-ext.html ,
>>> GET /v1.1/{tenant_id}/os-volume-types/{volume_type_id}
>>> returns the following ( but not the size ).
>>>
>>>
>>> {
>>>     "volume_type": {
>>>         "id": "289da7f8-6440-407c-9fb4-7db01ec49164",
>>>         "name": "vol-type-001",
>>>         "extra_specs": {
>>>             "capabilities": "gpu"
>>>         }
>>>     }
>>> }
>>>
>>>
>>> Sekhar Vajjhala
>>>
>>> _______________________________________________
>>> Mailing list:
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>> Post to     : openstack at lists.openstack.org
>>> Unsubscribe :
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>
>>>
>>
>
>
> --
> Sekhar Vajjhala | m : 603-785-8993
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140806/614ed77c/attachment.html>


More information about the Openstack mailing list