diff --git a/gnocchiclient/__init__.py b/aodhclient/__init__.py similarity index 94% rename from gnocchiclient/__init__.py rename to aodhclient/__init__.py index 78e6908..7e17f56 100644 --- a/gnocchiclient/__init__.py +++ b/aodhclient/__init__.py @@ -16,4 +16,4 @@ import pbr.version __version__ = pbr.version.VersionInfo( - 'gnocchiclient').version_string() + 'aodhclient').version_string() diff --git a/gnocchiclient/benchmark.py b/aodhclient/benchmark.py similarity index 99% rename from gnocchiclient/benchmark.py rename to aodhclient/benchmark.py index ea83f2c..dd19fec 100644 --- a/gnocchiclient/benchmark.py +++ b/aodhclient/benchmark.py @@ -25,7 +25,7 @@ import futurist from oslo_utils import timeutils import six.moves -from gnocchiclient.v1 import metric_cli +from aodhclient.v1 import metric_cli LOG = logging.getLogger(__name__) diff --git a/gnocchiclient/client.py b/aodhclient/client.py similarity index 90% rename from gnocchiclient/client.py rename to aodhclient/client.py index bcab9ce..662bde9 100644 --- a/gnocchiclient/client.py +++ b/aodhclient/client.py @@ -13,11 +13,11 @@ from keystoneauth1 import adapter from oslo_utils import importutils -from gnocchiclient import exceptions +from aodhclient import exceptions def Client(version, *args, **kwargs): - module = 'gnocchiclient.v%s.client' % version + module = 'aodhclient.v%s.client' % version module = importutils.import_module(module) client_class = getattr(module, 'Client') return client_class(*args, **kwargs) @@ -27,7 +27,7 @@ class SessionClient(adapter.Adapter): def request(self, url, method, **kwargs): kwargs.setdefault('headers', kwargs.get('headers', {})) # NOTE(sileht): The standard call raises errors from - # keystoneauth, where we need to raise the gnocchiclient errors. + # keystoneauth, where we need to raise the aodhclient errors. raise_exc = kwargs.pop('raise_exc', True) resp = super(SessionClient, self).request(url, method, diff --git a/gnocchiclient/exceptions.py b/aodhclient/exceptions.py similarity index 100% rename from gnocchiclient/exceptions.py rename to aodhclient/exceptions.py diff --git a/gnocchiclient/i18n.py b/aodhclient/i18n.py similarity index 94% rename from gnocchiclient/i18n.py rename to aodhclient/i18n.py index 048e8f4..6893599 100644 --- a/gnocchiclient/i18n.py +++ b/aodhclient/i18n.py @@ -12,7 +12,7 @@ import oslo_i18n as i18n -_translators = i18n.TranslatorFactory(domain='gnocchiclient') +_translators = i18n.TranslatorFactory(domain='aodhclient') # The primary translation function using the well-known name "_" _ = _translators.primary diff --git a/gnocchiclient/noauth.py b/aodhclient/noauth.py similarity index 97% rename from gnocchiclient/noauth.py rename to aodhclient/noauth.py index bbe4174..e132f5b 100644 --- a/gnocchiclient/noauth.py +++ b/aodhclient/noauth.py @@ -72,7 +72,7 @@ class GnocchiNoAuthLoader(loading.BaseLoader): GnocchiOpt('user-id', help='User ID', required=True), GnocchiOpt('project-id', help='Project ID', required=True), GnocchiOpt('roles', help='Roles', default="admin"), - GnocchiOpt('gnocchi-endpoint', help='Gnocchi endpoint', + GnocchiOpt('aodh-endpoint', help='Gnocchi endpoint', dest="endpoint", required=True), ]) return options diff --git a/gnocchiclient/shell.py b/aodhclient/shell.py similarity index 93% rename from gnocchiclient/shell.py rename to aodhclient/shell.py index aa56a76..81a1b4b 100644 --- a/gnocchiclient/shell.py +++ b/aodhclient/shell.py @@ -23,16 +23,16 @@ from cliff import commandmanager from keystoneauth1 import exceptions from keystoneauth1 import loading -from gnocchiclient import benchmark -from gnocchiclient import client -from gnocchiclient import noauth -from gnocchiclient.v1 import archive_policy_cli -from gnocchiclient.v1 import archive_policy_rule_cli as ap_rule_cli -from gnocchiclient.v1 import capabilities_cli -from gnocchiclient.v1 import metric_cli -from gnocchiclient.v1 import resource_cli -from gnocchiclient.v1 import status_cli -from gnocchiclient.version import __version__ +from aodhclient import benchmark +from aodhclient import client +from aodhclient import noauth +from aodhclient.v1 import archive_policy_cli +from aodhclient.v1 import archive_policy_rule_cli as ap_rule_cli +from aodhclient.v1 import capabilities_cli +from aodhclient.v1 import metric_cli +from aodhclient.v1 import resource_cli +from aodhclient.v1 import status_cli +from aodhclient.version import __version__ class GnocchiCommandManager(commandmanager.CommandManager): @@ -114,7 +114,7 @@ class GnocchiShell(app.App): ' Valid interface types: [admin, public, internal].' ' (Env: OS_INTERFACE)') parser.add_argument( - '--gnocchi-api-version', + '--aodh-api-version', default=os.environ.get('GNOCCHI_API_VERSION', '1'), help='Defaults to env[GNOCCHI_API_VERSION] or 1.') loading.register_session_argparse_arguments(parser=parser) @@ -123,7 +123,7 @@ class GnocchiShell(app.App): if not isinstance(plugin, noauth.GnocchiNoAuthLoader): parser.add_argument( - '--gnocchi-endpoint', + '--aodh-endpoint', metavar='', dest='endpoint', default=os.environ.get('GNOCCHI_ENDPOINT'), @@ -145,7 +145,7 @@ class GnocchiShell(app.App): session = loading.load_session_from_argparse_arguments( self.options, auth=auth_plugin) - self._client = client.Client(self.options.gnocchi_api_version, + self._client = client.Client(self.options.aodh_api_version, session=session, interface=self.options.interface, region_name=self.options.region_name, diff --git a/gnocchiclient/tests/__init__.py b/aodhclient/tests/__init__.py similarity index 100% rename from gnocchiclient/tests/__init__.py rename to aodhclient/tests/__init__.py diff --git a/gnocchiclient/tests/functional/__init__.py b/aodhclient/tests/functional/__init__.py similarity index 100% rename from gnocchiclient/tests/functional/__init__.py rename to aodhclient/tests/functional/__init__.py diff --git a/gnocchiclient/tests/functional/base.py b/aodhclient/tests/functional/base.py similarity index 100% rename from gnocchiclient/tests/functional/base.py rename to aodhclient/tests/functional/base.py diff --git a/gnocchiclient/tests/functional/test_archive_policy.py b/aodhclient/tests/functional/test_archive_policy.py similarity index 100% rename from gnocchiclient/tests/functional/test_archive_policy.py rename to aodhclient/tests/functional/test_archive_policy.py diff --git a/gnocchiclient/tests/functional/test_archive_policy_rule.py b/aodhclient/tests/functional/test_archive_policy_rule.py similarity index 100% rename from gnocchiclient/tests/functional/test_archive_policy_rule.py rename to aodhclient/tests/functional/test_archive_policy_rule.py diff --git a/gnocchiclient/tests/functional/test_benchmark.py b/aodhclient/tests/functional/test_benchmark.py similarity index 100% rename from gnocchiclient/tests/functional/test_benchmark.py rename to aodhclient/tests/functional/test_benchmark.py diff --git a/gnocchiclient/tests/functional/test_capabilities.py b/aodhclient/tests/functional/test_capabilities.py similarity index 100% rename from gnocchiclient/tests/functional/test_capabilities.py rename to aodhclient/tests/functional/test_capabilities.py diff --git a/gnocchiclient/tests/functional/test_metric.py b/aodhclient/tests/functional/test_metric.py similarity index 100% rename from gnocchiclient/tests/functional/test_metric.py rename to aodhclient/tests/functional/test_metric.py diff --git a/gnocchiclient/tests/functional/test_resource.py b/aodhclient/tests/functional/test_resource.py similarity index 100% rename from gnocchiclient/tests/functional/test_resource.py rename to aodhclient/tests/functional/test_resource.py diff --git a/gnocchiclient/tests/functional/test_status.py b/aodhclient/tests/functional/test_status.py similarity index 100% rename from gnocchiclient/tests/functional/test_status.py rename to aodhclient/tests/functional/test_status.py diff --git a/gnocchiclient/tests/unit/__init__.py b/aodhclient/tests/unit/__init__.py similarity index 100% rename from gnocchiclient/tests/unit/__init__.py rename to aodhclient/tests/unit/__init__.py diff --git a/gnocchiclient/tests/unit/test_utils.py b/aodhclient/tests/unit/test_utils.py similarity index 100% rename from gnocchiclient/tests/unit/test_utils.py rename to aodhclient/tests/unit/test_utils.py diff --git a/gnocchiclient/utils.py b/aodhclient/utils.py similarity index 100% rename from gnocchiclient/utils.py rename to aodhclient/utils.py diff --git a/gnocchiclient/v1/__init__.py b/aodhclient/v1/__init__.py similarity index 100% rename from gnocchiclient/v1/__init__.py rename to aodhclient/v1/__init__.py diff --git a/gnocchiclient/v1/archive_policy.py b/aodhclient/v1/archive_policy.py similarity index 100% rename from gnocchiclient/v1/archive_policy.py rename to aodhclient/v1/archive_policy.py diff --git a/gnocchiclient/v1/archive_policy_cli.py b/aodhclient/v1/archive_policy_cli.py similarity index 100% rename from gnocchiclient/v1/archive_policy_cli.py rename to aodhclient/v1/archive_policy_cli.py diff --git a/gnocchiclient/v1/archive_policy_rule.py b/aodhclient/v1/archive_policy_rule.py similarity index 100% rename from gnocchiclient/v1/archive_policy_rule.py rename to aodhclient/v1/archive_policy_rule.py diff --git a/gnocchiclient/v1/archive_policy_rule_cli.py b/aodhclient/v1/archive_policy_rule_cli.py similarity index 100% rename from gnocchiclient/v1/archive_policy_rule_cli.py rename to aodhclient/v1/archive_policy_rule_cli.py diff --git a/gnocchiclient/v1/base.py b/aodhclient/v1/base.py similarity index 100% rename from gnocchiclient/v1/base.py rename to aodhclient/v1/base.py diff --git a/gnocchiclient/v1/capabilities.py b/aodhclient/v1/capabilities.py similarity index 100% rename from gnocchiclient/v1/capabilities.py rename to aodhclient/v1/capabilities.py diff --git a/gnocchiclient/v1/capabilities_cli.py b/aodhclient/v1/capabilities_cli.py similarity index 100% rename from gnocchiclient/v1/capabilities_cli.py rename to aodhclient/v1/capabilities_cli.py diff --git a/gnocchiclient/v1/client.py b/aodhclient/v1/client.py similarity index 100% rename from gnocchiclient/v1/client.py rename to aodhclient/v1/client.py diff --git a/gnocchiclient/v1/metric.py b/aodhclient/v1/metric.py similarity index 100% rename from gnocchiclient/v1/metric.py rename to aodhclient/v1/metric.py diff --git a/gnocchiclient/v1/metric_cli.py b/aodhclient/v1/metric_cli.py similarity index 100% rename from gnocchiclient/v1/metric_cli.py rename to aodhclient/v1/metric_cli.py diff --git a/gnocchiclient/v1/resource.py b/aodhclient/v1/resource.py similarity index 100% rename from gnocchiclient/v1/resource.py rename to aodhclient/v1/resource.py diff --git a/gnocchiclient/v1/resource_cli.py b/aodhclient/v1/resource_cli.py similarity index 100% rename from gnocchiclient/v1/resource_cli.py rename to aodhclient/v1/resource_cli.py diff --git a/gnocchiclient/v1/status.py b/aodhclient/v1/status.py similarity index 100% rename from gnocchiclient/v1/status.py rename to aodhclient/v1/status.py diff --git a/gnocchiclient/v1/status_cli.py b/aodhclient/v1/status_cli.py similarity index 100% rename from gnocchiclient/v1/status_cli.py rename to aodhclient/v1/status_cli.py diff --git a/gnocchiclient/version.py b/aodhclient/version.py similarity index 89% rename from gnocchiclient/version.py rename to aodhclient/version.py index 683c55e..cbe1709 100644 --- a/gnocchiclient/version.py +++ b/aodhclient/version.py @@ -15,4 +15,4 @@ import pbr.version -__version__ = pbr.version.VersionInfo('gnocchiclient').version_string() +__version__ = pbr.version.VersionInfo('aodhclient').version_string()