If you have an extension like 'myextension.py' in the v1_1/contrib directory, you'll
end up with a very sensible attribute on the resulting novaclient object, i.e.
novaclient.myextension
If you have a package distributed in the package myextension_python_novaclient_ext,
then it'll automatically be picked up as an extension (awesome!) but the name is not
as intuitive.
novaclient.myextension_python_novaclient_ext
This patch simply changes this to allow the Extension to provide a name for itself.
The possibility of collisions exists, but is not really any more significant than
before (where you might have different versions of the same package installed in the
system or heck, even a bizarrely named 'myextension_python_novaclient_ext.py' in the
contrib/ directory).
Reviewed: https:/ /review. openstack. org/21901 github. com/openstack/ python- novaclient/ commit/ c0e85a84b0ef600 47f9435ef5035d0 f65e446847
Committed: http://
Submitter: Jenkins
Branch: master
commit c0e85a84b0ef600 47f9435ef5035d0 f65e446847
Author: David Scannell <email address hidden>
Date: Wed Feb 13 13:47:45 2013 -0500
Allow extensions to provide a name when discovered on the python path.
Using novaclient with some extensions via python code, you might have an
invocation like this:
extensions = shell.OpenStack ComputeShell( )._discover_ extensions( "1.1") extensions,
endpoint_ type=shell. DEFAULT_ NOVA_ENDPOINT_ TYPE,
service_ type=shell. DEFAULT_ NOVA_SERVICE_ TYPE)
novaclient = Client("1.1", user, apikey, project, authurl, extensions=
If you have an extension like 'myextension.py' in the v1_1/contrib directory, you'll
end up with a very sensible attribute on the resulting novaclient object, i.e.
If you have a package distributed in the package myextension_ python_ novaclient_ ext,
then it'll automatically be picked up as an extension (awesome!) but the name is not
as intuitive.
This patch simply changes this to allow the Extension to provide a name for itself. python_ novaclient_ ext.py' in the
The possibility of collisions exists, but is not really any more significant than
before (where you might have different versions of the same package installed in the
system or heck, even a bizarrely named 'myextension_
contrib/ directory).
Fixes bug 1058366
Change-Id: Ie68463ffd7a939 744e035b20fd50a 7dc8da605de