From a75043813d9e1877651bdacacaf3f21eab15f78a Mon Sep 17 00:00:00 2001 From: "Mauro S. M. Rodrigues" Date: Tue, 4 Sep 2012 17:03:44 -0400 Subject: [PATCH] Get the extension alias to compose the path to save the api samples Use extension alias instead of the whole module path to compose the directory where the api-samples will be saved. Change-Id: I7a1ae1deab4aa67643d960555fe6dbdcbc4e3c45 --- nova/tests/integrated/test_api_samples.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py index 3d703f3f181..c16cdc081bd 100644 --- a/nova/tests/integrated/test_api_samples.py +++ b/nova/tests/integrated/test_api_samples.py @@ -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 @@ -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)