Skip to content

Commit

Permalink
Get the extension alias to compose the path to save the api samples
Browse files Browse the repository at this point in the history
Use extension alias instead of the whole module path to compose the directory
where the api-samples will be saved.

Change-Id: I7a1ae1deab4aa67643d960555fe6dbdcbc4e3c45
  • Loading branch information
maurorodrigues committed Sep 5, 2012
1 parent 5c348b1 commit a750438
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nova/tests/integrated/test_api_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from lxml import etree

from nova import flags
from nova.openstack.common import importutils
from nova.openstack.common import jsonutils
from nova.openstack.common.log import logging
from nova import test
Expand Down Expand Up @@ -90,7 +91,8 @@ def _get_sample(cls, name, suffix=''):
if cls.all_extensions:
parts.append('all_extensions')
if cls.extension_name:
parts.append(cls.extension_name)
alias = importutils.import_class(cls.extension_name).alias
parts.append(alias)
parts.append(name + "." + cls.ctype + suffix)
return os.path.join(*parts)

Expand Down

0 comments on commit a750438

Please sign in to comment.