rename gnocchi to aodh
This commit is contained in:
parent
7ab27f15e2
commit
b3c8702b8a
@ -16,4 +16,4 @@ import pbr.version
|
|||||||
|
|
||||||
|
|
||||||
__version__ = pbr.version.VersionInfo(
|
__version__ = pbr.version.VersionInfo(
|
||||||
'gnocchiclient').version_string()
|
'aodhclient').version_string()
|
@ -25,7 +25,7 @@ import futurist
|
|||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
import six.moves
|
import six.moves
|
||||||
|
|
||||||
from gnocchiclient.v1 import metric_cli
|
from aodhclient.v1 import metric_cli
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -13,11 +13,11 @@
|
|||||||
from keystoneauth1 import adapter
|
from keystoneauth1 import adapter
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
from gnocchiclient import exceptions
|
from aodhclient import exceptions
|
||||||
|
|
||||||
|
|
||||||
def Client(version, *args, **kwargs):
|
def Client(version, *args, **kwargs):
|
||||||
module = 'gnocchiclient.v%s.client' % version
|
module = 'aodhclient.v%s.client' % version
|
||||||
module = importutils.import_module(module)
|
module = importutils.import_module(module)
|
||||||
client_class = getattr(module, 'Client')
|
client_class = getattr(module, 'Client')
|
||||||
return client_class(*args, **kwargs)
|
return client_class(*args, **kwargs)
|
||||||
@ -27,7 +27,7 @@ class SessionClient(adapter.Adapter):
|
|||||||
def request(self, url, method, **kwargs):
|
def request(self, url, method, **kwargs):
|
||||||
kwargs.setdefault('headers', kwargs.get('headers', {}))
|
kwargs.setdefault('headers', kwargs.get('headers', {}))
|
||||||
# NOTE(sileht): The standard call raises errors from
|
# 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)
|
raise_exc = kwargs.pop('raise_exc', True)
|
||||||
resp = super(SessionClient, self).request(url,
|
resp = super(SessionClient, self).request(url,
|
||||||
method,
|
method,
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import oslo_i18n as i18n
|
import oslo_i18n as i18n
|
||||||
|
|
||||||
_translators = i18n.TranslatorFactory(domain='gnocchiclient')
|
_translators = i18n.TranslatorFactory(domain='aodhclient')
|
||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
@ -72,7 +72,7 @@ class GnocchiNoAuthLoader(loading.BaseLoader):
|
|||||||
GnocchiOpt('user-id', help='User ID', required=True),
|
GnocchiOpt('user-id', help='User ID', required=True),
|
||||||
GnocchiOpt('project-id', help='Project ID', required=True),
|
GnocchiOpt('project-id', help='Project ID', required=True),
|
||||||
GnocchiOpt('roles', help='Roles', default="admin"),
|
GnocchiOpt('roles', help='Roles', default="admin"),
|
||||||
GnocchiOpt('gnocchi-endpoint', help='Gnocchi endpoint',
|
GnocchiOpt('aodh-endpoint', help='Gnocchi endpoint',
|
||||||
dest="endpoint", required=True),
|
dest="endpoint", required=True),
|
||||||
])
|
])
|
||||||
return options
|
return options
|
@ -23,16 +23,16 @@ from cliff import commandmanager
|
|||||||
from keystoneauth1 import exceptions
|
from keystoneauth1 import exceptions
|
||||||
from keystoneauth1 import loading
|
from keystoneauth1 import loading
|
||||||
|
|
||||||
from gnocchiclient import benchmark
|
from aodhclient import benchmark
|
||||||
from gnocchiclient import client
|
from aodhclient import client
|
||||||
from gnocchiclient import noauth
|
from aodhclient import noauth
|
||||||
from gnocchiclient.v1 import archive_policy_cli
|
from aodhclient.v1 import archive_policy_cli
|
||||||
from gnocchiclient.v1 import archive_policy_rule_cli as ap_rule_cli
|
from aodhclient.v1 import archive_policy_rule_cli as ap_rule_cli
|
||||||
from gnocchiclient.v1 import capabilities_cli
|
from aodhclient.v1 import capabilities_cli
|
||||||
from gnocchiclient.v1 import metric_cli
|
from aodhclient.v1 import metric_cli
|
||||||
from gnocchiclient.v1 import resource_cli
|
from aodhclient.v1 import resource_cli
|
||||||
from gnocchiclient.v1 import status_cli
|
from aodhclient.v1 import status_cli
|
||||||
from gnocchiclient.version import __version__
|
from aodhclient.version import __version__
|
||||||
|
|
||||||
|
|
||||||
class GnocchiCommandManager(commandmanager.CommandManager):
|
class GnocchiCommandManager(commandmanager.CommandManager):
|
||||||
@ -114,7 +114,7 @@ class GnocchiShell(app.App):
|
|||||||
' Valid interface types: [admin, public, internal].'
|
' Valid interface types: [admin, public, internal].'
|
||||||
' (Env: OS_INTERFACE)')
|
' (Env: OS_INTERFACE)')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--gnocchi-api-version',
|
'--aodh-api-version',
|
||||||
default=os.environ.get('GNOCCHI_API_VERSION', '1'),
|
default=os.environ.get('GNOCCHI_API_VERSION', '1'),
|
||||||
help='Defaults to env[GNOCCHI_API_VERSION] or 1.')
|
help='Defaults to env[GNOCCHI_API_VERSION] or 1.')
|
||||||
loading.register_session_argparse_arguments(parser=parser)
|
loading.register_session_argparse_arguments(parser=parser)
|
||||||
@ -123,7 +123,7 @@ class GnocchiShell(app.App):
|
|||||||
|
|
||||||
if not isinstance(plugin, noauth.GnocchiNoAuthLoader):
|
if not isinstance(plugin, noauth.GnocchiNoAuthLoader):
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--gnocchi-endpoint',
|
'--aodh-endpoint',
|
||||||
metavar='<endpoint>',
|
metavar='<endpoint>',
|
||||||
dest='endpoint',
|
dest='endpoint',
|
||||||
default=os.environ.get('GNOCCHI_ENDPOINT'),
|
default=os.environ.get('GNOCCHI_ENDPOINT'),
|
||||||
@ -145,7 +145,7 @@ class GnocchiShell(app.App):
|
|||||||
session = loading.load_session_from_argparse_arguments(
|
session = loading.load_session_from_argparse_arguments(
|
||||||
self.options, auth=auth_plugin)
|
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,
|
session=session,
|
||||||
interface=self.options.interface,
|
interface=self.options.interface,
|
||||||
region_name=self.options.region_name,
|
region_name=self.options.region_name,
|
@ -15,4 +15,4 @@
|
|||||||
import pbr.version
|
import pbr.version
|
||||||
|
|
||||||
|
|
||||||
__version__ = pbr.version.VersionInfo('gnocchiclient').version_string()
|
__version__ = pbr.version.VersionInfo('aodhclient').version_string()
|
Loading…
x
Reference in New Issue
Block a user