Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-26 Thread Ricardo Carrillo Cruz
Oops, sorry, I assumed a create_server instance as that is where I usually
encountered that message.
( I never needed myself creating duplicate images, tho it is possible as
mgagne pointed out)

El 25 nov. 2016 21:17, "George Shuklin"  escribió:

> Em... Sorry, I'm trying to create_image. And it traces on duplicate images
> during creation process, not while passing image name to some 'create
> instance' or 'delete image' functions.\
>
> Or you want to say I need to pass uuid for new image in image_create()
> function? Never hear about such thing.
> On 11/25/2016 12:48 PM, Ricardo Carrillo Cruz wrote:
>
> That is expected.
>
> The shade calls accept name_or_id param for a lot of methods for
> convenience.
> In your case, as there are multiple images with the same name you should
> pass the ID of the image you want to use, otherwise
> shade cannot guess it.
>
> 2016-11-25 11:42 GMT+01:00 George Shuklin :
>
>> shade fails if see too duplicate images in account.
>>
>> o = shade.OpenStackCloud(**creds)
>> o.create_image(name=’killme’, filename=’/tmp/random_junk’, 
>> disk_format=’qcow2', container_format=’bare’, wait=True)
>>
>> Traceback (most recent call last):
>>  ...
>>   File "/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line 
>> 2269, in create_image
>> current_image = self.get_image(name)
>>   File "/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line 
>> 1703, in get_image
>> return _utils._get_entity(self.search_images, name_or_id, filters)
>>   File "/usr/lib/python2.7/dist-packages/shade/_utils.py", line 143, in 
>> _get_entity
>> "Multiple matches found for %s" % name_or_id)
>> shade.exc.OpenStackCloudException: Multiple matches found for killme
>>
>> On 11/18/2016 12:20 AM, Clint Byrum wrote:
>>
>> You may find the 'shade' library a straight forward choice:
>> http://docs.openstack.org/infra/shade/
>>
>> Excerpts from George Shuklin's message of 2016-11-17 20:17:08 +0200:
>>
>> Hello.
>>
>> I can't find proper documentation about how to use openstack clients
>> from inside python application. All I can find is just examples and
>> rather abstract (autogenerated) reference. Is there any normal
>> documentation about proper way to use openstack clients from python
>> applications?
>>
>>
>> Thanks.
>>
>>
>> ___
>> OpenStack-operators mailing 
>> listOpenStack-operators@lists.openstack.orghttp://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>>
>> ___ OpenStack-operators
>> mailing list OpenStack-operators@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
> ___
> OpenStack-operators mailing list
> OpenStack-operators@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-25 Thread Mathieu Gagné
This change allows you to upload duplicate images:
https://review.openstack.org/#/c/349710/

Use the allow_duplicates=True argument to bypass the name duplication check.
--
Mathieu


On Fri, Nov 25, 2016 at 3:15 PM, George Shuklin
 wrote:
> Em... Sorry, I'm trying to create_image. And it traces on duplicate images
> during creation process, not while passing image name to some 'create
> instance' or 'delete image' functions.\
>
> Or you want to say I need to pass uuid for new image in image_create()
> function? Never hear about such thing.
>
> On 11/25/2016 12:48 PM, Ricardo Carrillo Cruz wrote:
>
> That is expected.
>
> The shade calls accept name_or_id param for a lot of methods for
> convenience.
> In your case, as there are multiple images with the same name you should
> pass the ID of the image you want to use, otherwise
> shade cannot guess it.
>
> 2016-11-25 11:42 GMT+01:00 George Shuklin :
>>
>> shade fails if see too duplicate images in account.
>>
>> o = shade.OpenStackCloud(**creds)
>> o.create_image(name=’killme’, filename=’/tmp/random_junk’,
>> disk_format=’qcow2', container_format=’bare’, wait=True)
>>
>> Traceback (most recent call last):
>>  ...
>>   File "/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line
>> 2269, in create_image
>> current_image = self.get_image(name)
>>   File "/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line
>> 1703, in get_image
>> return _utils._get_entity(self.search_images, name_or_id, filters)
>>   File "/usr/lib/python2.7/dist-packages/shade/_utils.py", line 143, in
>> _get_entity
>> "Multiple matches found for %s" % name_or_id)
>> shade.exc.OpenStackCloudException: Multiple matches found for killme
>>
>> On 11/18/2016 12:20 AM, Clint Byrum wrote:
>>
>> You may find the 'shade' library a straight forward choice:
>>
>> http://docs.openstack.org/infra/shade/
>>
>> Excerpts from George Shuklin's message of 2016-11-17 20:17:08 +0200:
>>
>> Hello.
>>
>> I can't find proper documentation about how to use openstack clients
>> from inside python application. All I can find is just examples and
>> rather abstract (autogenerated) reference. Is there any normal
>> documentation about proper way to use openstack clients from python
>> applications?
>>
>>
>> Thanks.
>>
>> ___
>> OpenStack-operators mailing list
>> OpenStack-operators@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>>
>> ___ OpenStack-operators
>> mailing list OpenStack-operators@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
> ___
> OpenStack-operators mailing list
> OpenStack-operators@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>

___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-25 Thread George Shuklin
Em... Sorry, I'm trying to create_image. And it traces on duplicate 
images during creation process, not while passing image name to some 
'create instance' or 'delete image' functions.\


Or you want to say I need to pass uuid for new image in image_create() 
function? Never hear about such thing.


On 11/25/2016 12:48 PM, Ricardo Carrillo Cruz wrote:

That is expected.

The shade calls accept name_or_id param for a lot of methods for 
convenience.
In your case, as there are multiple images with the same name you 
should pass the ID of the image you want to use, otherwise

shade cannot guess it.

2016-11-25 11:42 GMT+01:00 George Shuklin >:


shade fails if see too duplicate images in account.

o = shade.OpenStackCloud(**creds)
o.create_image(name=’killme’, filename=’/tmp/random_junk’, 
disk_format=’qcow2', container_format=’bare’, wait=True)

|Traceback (most recent call last): ... File
"/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line
2269, in create_image current_image = self.get_image(name) File
"/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line
1703, in get_image return _utils._get_entity(self.search_images,
name_or_id, filters) File
"/usr/lib/python2.7/dist-packages/shade/_utils.py", line 143, in
_get_entity "Multiple matches found for %s" % name_or_id)
shade.exc.OpenStackCloudException: Multiple matches found for killme|

On 11/18/2016 12:20 AM, Clint Byrum wrote:

You may find the 'shade' library a straight forward choice:

http://docs.openstack.org/infra/shade/


Excerpts from George Shuklin's message of 2016-11-17 20:17:08 +0200:

Hello.

I can't find proper documentation about how to use openstack clients
from inside python application. All I can find is just examples and
rather abstract (autogenerated) reference. Is there any normal
documentation about proper way to use openstack clients from python
applications?


Thanks.


___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators



___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators



___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-25 Thread Ricardo Carrillo Cruz
That is expected.

The shade calls accept name_or_id param for a lot of methods for
convenience.
In your case, as there are multiple images with the same name you should
pass the ID of the image you want to use, otherwise
shade cannot guess it.

2016-11-25 11:42 GMT+01:00 George Shuklin :

> shade fails if see too duplicate images in account.
>
> o = shade.OpenStackCloud(**creds)
> o.create_image(name=’killme’, filename=’/tmp/random_junk’, 
> disk_format=’qcow2', container_format=’bare’, wait=True)
>
> Traceback (most recent call last):
>  ...
>   File "/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line 2269, 
> in create_image
> current_image = self.get_image(name)
>   File "/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line 1703, 
> in get_image
> return _utils._get_entity(self.search_images, name_or_id, filters)
>   File "/usr/lib/python2.7/dist-packages/shade/_utils.py", line 143, in 
> _get_entity
> "Multiple matches found for %s" % name_or_id)
> shade.exc.OpenStackCloudException: Multiple matches found for killme
>
>
>
> On 11/18/2016 12:20 AM, Clint Byrum wrote:
>
> You may find the 'shade' library a straight forward choice:
> http://docs.openstack.org/infra/shade/
>
> Excerpts from George Shuklin's message of 2016-11-17 20:17:08 +0200:
>
> Hello.
>
> I can't find proper documentation about how to use openstack clients
> from inside python application. All I can find is just examples and
> rather abstract (autogenerated) reference. Is there any normal
> documentation about proper way to use openstack clients from python
> applications?
>
>
> Thanks.
>
>
> ___
> OpenStack-operators mailing 
> listOpenStack-operators@lists.openstack.orghttp://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
>
> ___
> OpenStack-operators mailing list
> OpenStack-operators@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-25 Thread George Shuklin

shade fails if see too duplicate images in account.

o = shade.OpenStackCloud(**creds)
o.create_image(name=’killme’, filename=’/tmp/random_junk’, disk_format=’qcow2', 
container_format=’bare’, wait=True)

|Traceback (most recent call last): ... File 
"/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line 2269, 
in create_image current_image = self.get_image(name) File 
"/usr/lib/python2.7/dist-packages/shade/openstackcloud.py", line 1703, 
in get_image return _utils._get_entity(self.search_images, name_or_id, 
filters) File "/usr/lib/python2.7/dist-packages/shade/_utils.py", line 
143, in _get_entity "Multiple matches found for %s" % name_or_id) 
shade.exc.OpenStackCloudException: Multiple matches found for killme|




On 11/18/2016 12:20 AM, Clint Byrum wrote:

You may find the 'shade' library a straight forward choice:

http://docs.openstack.org/infra/shade/

Excerpts from George Shuklin's message of 2016-11-17 20:17:08 +0200:

Hello.

I can't find proper documentation about how to use openstack clients
from inside python application. All I can find is just examples and
rather abstract (autogenerated) reference. Is there any normal
documentation about proper way to use openstack clients from python
applications?


Thanks.


___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators



___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-25 Thread George Shuklin

No.

I've tried to use openstacksdk to set up properties for image and there 
has been a zero information how to do this, and manual attempt to 
discover 'how to', I found it is broken. Bugreport is already 7 month 
old and there is no motion at all.


python-openstacksdk is broken and unusable.

https://medium.com/@george.shuklin/openstacksdk-unable-to-update-image-properties-191bffb670f2#.wa23wa7nm
Bug: https://bugs.launchpad.net/python-openstacksdk/+bug/1455620

On 11/17/2016 11:27 PM, Kostyantyn Volenbovskyi wrote:

Hi,

do you mean that information in [1] is not adequate to your needs?

BR,
Konstantin
[1] http://docs.openstack.org/user-guide/sdk.html


On Nov 17, 2016, at 7:17 PM, George Shuklin  wrote:

Hello.

I can't find proper documentation about how to use openstack clients from 
inside python application. All I can find is just examples and rather abstract 
(autogenerated) reference. Is there any normal documentation about proper way 
to use openstack clients from python applications?


Thanks.


___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators




___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-17 Thread Marcus Furlong
API documentation is available here:

http://developer.openstack.org/api-guide/quick-start/

Cheers,
Marcus.

On 18 Nov 2016 05:21, "George Shuklin"  wrote:

> Hello.
>
> I can't find proper documentation about how to use openstack clients from
> inside python application. All I can find is just examples and rather
> abstract (autogenerated) reference. Is there any normal documentation about
> proper way to use openstack clients from python applications?
>
>
> Thanks.
>
>
> ___
> OpenStack-operators mailing list
> OpenStack-operators@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-17 Thread Clint Byrum
You may find the 'shade' library a straight forward choice:

http://docs.openstack.org/infra/shade/

Excerpts from George Shuklin's message of 2016-11-17 20:17:08 +0200:
> Hello.
> 
> I can't find proper documentation about how to use openstack clients 
> from inside python application. All I can find is just examples and 
> rather abstract (autogenerated) reference. Is there any normal 
> documentation about proper way to use openstack clients from python 
> applications?
> 
> 
> Thanks.
> 

___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-17 Thread Kostyantyn Volenbovskyi
Hi, 

do you mean that information in [1] is not adequate to your needs?

BR, 
Konstantin
[1] http://docs.openstack.org/user-guide/sdk.html

> On Nov 17, 2016, at 7:17 PM, George Shuklin  wrote:
> 
> Hello.
> 
> I can't find proper documentation about how to use openstack clients from 
> inside python application. All I can find is just examples and rather 
> abstract (autogenerated) reference. Is there any normal documentation about 
> proper way to use openstack clients from python applications?
> 
> 
> Thanks.
> 
> 
> ___
> OpenStack-operators mailing list
> OpenStack-operators@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


[Openstack-operators] Using novaclient, glanceclient, etc, from python

2016-11-17 Thread George Shuklin

Hello.

I can't find proper documentation about how to use openstack clients 
from inside python application. All I can find is just examples and 
rather abstract (autogenerated) reference. Is there any normal 
documentation about proper way to use openstack clients from python 
applications?



Thanks.


___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators