[Openstack] The project of an image or images have a project

Carlos Miguel Hernández Romero miguel2hermanas at gmail.com
Wed Apr 16 01:35:51 UTC 2014


I forgot to say that the project is indicated in:
| Owner | 0351a1f666684f0fbd29548fb6f73eed |


2014-04-16 3:33 GMT+02:00 Carlos Miguel Hernández Romero <
miguel2hermanas at gmail.com>:

> Thanks for answer.
> My problem is I want to know the Python API which is the OpenStack project
> an image.
> I get everything but that project belongs:
>
> url = '/v2/images/0d7c09eb-d100-4a13-84e7-fdda2f50bfd3'
> print glance.images.http_client.json_request('GET', url)
>
> (<httplib.HTTPResponse instance at 0x37a8e60>, {u'status': u'active',
> u'name': u'imagen_prueba2', u'tags': [], u'container_format': u'bare',
> u'created_at': u'2014-04-15T16:31:16Z', u'disk_format': u'qcow2',
> u'updated_at': u'2014-04-15T16:31:18Z', u'visibility': u'private', u'id':
> u'0d7c09eb-d100-4a13-84e7-fdda2f50bfd3', u'protected': False, u'min_ram':
> 0, u'file': u'/v2/images/0d7c09eb-d100-4a13-84e7-fdda2f50bfd3/file',
> u'checksum': u'd972013792949d0d3ba628fbe8685bce', u'min_disk': 0,
> u'schema': u'/v2/schemas/image', u'self':
> u'/v2/images/0d7c09eb-d100-4a13-84e7-fdda2f50bfd3', u'size': 13147648})
>
> from the command if I have the project:
> vagrant at precise64:~/devstack$ glance image-show
> 'a8ddca2e-f004-4329-a9d6-83fd8d0589de'
> +-----------------------+--------------------------------------+
> | Property              | Value                                |
> +-----------------------+--------------------------------------+
> | Property 'kernel_id'  | ab2c6e53-34f3-4a2a-829c-4b69a40e1f0b |
> | Property 'ramdisk_id' | 64148dd3-0d94-4331-80c3-17e3be60ecab |
> | checksum              | f8a2eeee2dc65b3d9b6e63678955bd83     |
> | container_format      | ami                                  |
> | created_at            | 2014-04-15T12:37:40                  |
> | deleted               | False                                |
> | disk_format           | ami                                  |
> | id                    | a8ddca2e-f004-4329-a9d6-83fd8d0589de |
> | is_public             | True                                 |
> | min_disk              | 0                                    |
> | min_ram               | 0                                    |
> | name                  | cirros-0.3.1-x86_64-uec              |
> | owner                 | 0351a1f666684f0fbd29548fb6f73eed     |
> | protected             | False                                |
> | size                  | 25165824                             |
> | status                | active                               |
> | updated_at            | 2014-04-15T12:37:41                  |
> +-----------------------+--------------------------------------+
>
> How do I get to know which project belongs from OpenStack API Python?
> Best Regards!
>
>
> 2014-04-16 2:45 GMT+02:00 严超 <yanchao727 at gmail.com>:
>
> I dont get it. What's your issue?
>>
>> #glance image-list
>> Can list all the images in one project.
>>
>>
>> *Best Regards!*
>>
>> *Chao Yan*
>>
>>
>>
>> *--------------My twitter:Andy Yan @yanchao727--------------*
>>
>>
>> 2014-04-16 1:18 GMT+08:00 Carlos Miguel Hernández Romero <
>> miguel2hermanas at gmail.com>:
>>
>>>  I want to know using the Python API OpenStack project that has images
>>> or vice versa , that project has an image .
>>> From the command line gives you the information :
>>> vagrant at precise64:~/devstack$ glance image-show
>>> 'a8ddca2e-f004-4329-a9d6-83fd8d0589de'
>>> +-----------------------+--------------------------------------+
>>> | Property              | Value                                |
>>> +-----------------------+--------------------------------------+
>>>  | Property 'kernel_id'  | ab2c6e53-34f3-4a2a-829c-4b69a40e1f0b |
>>> | Property 'ramdisk_id' | 64148dd3-0d94-4331-80c3-17e3be60ecab |
>>> | checksum              | f8a2eeee2dc65b3d9b6e63678955bd83     |
>>> | container_format      | ami                                  |
>>> | created_at            | 2014-04-15T12:37:40                  |
>>> | deleted               | False                                |
>>> | disk_format           | ami                                  |
>>> | id                    | a8ddca2e-f004-4329-a9d6-83fd8d0589de |
>>> | is_public             | True                                 |
>>> | min_disk              | 0                                    |
>>> | min_ram               | 0                                    |
>>> | name                  | cirros-0.3.1-x86_64-uec              |
>>> | owner                 | 0351a1f666684f0fbd29548fb6f73eed     |
>>> | protected             | False                                |
>>> | size                  | 25165824                             |
>>> | status                | active                               |
>>> | updated_at            | 2014-04-15T12:37:41                  |
>>> +-----------------------+--------------------------------------+
>>>
>>> But since the API can not I get python or with nova nor glance . I get
>>> all the data unless it is associated project .
>>> Can anyone help me out ?
>>>
>>> Greetings and thanks
>>>
>>> _______________________________________________
>>> 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/20140416/e5c0e43b/attachment.html>


More information about the Openstack mailing list