Browse Source

Merge "Deprecate ceilometerclient"

tags/2.9.0^0
Jenkins 3 years ago
committed by Gerrit Code Review
parent
commit
3b4e35abad
3 changed files with 11 additions and 4 deletions
  1. +5
    -0
      ceilometerclient/shell.py
  2. +0
    -4
      ceilometerclient/tests/functional/test_readonly_ceilometer.py
  3. +6
    -0
      releasenotes/notes/deprecation-44ae455f4ef3a81e.yaml

+ 5
- 0
ceilometerclient/shell.py View File

@@ -19,6 +19,7 @@ from __future__ import print_function
import argparse
import logging
import sys
import warnings

from oslo_utils import encodeutils
from oslo_utils import importutils
@@ -172,6 +173,10 @@ class CeilometerShell(object):
return api_version, subcommand_parser.parse_args(argv)

def main(self, argv):
warnings.warn(
"ceilometerclient is now deprecated as the Ceilometer API has "
"been deprecated. Please use either aodhclient, pankoclient or "
"gnocchiclient.")
parsed = self.parse_args(argv)
if parsed == 0:
return 0


+ 0
- 4
ceilometerclient/tests/functional/test_readonly_ceilometer.py View File

@@ -63,9 +63,5 @@ class SimpleReadOnlyCeilometerClientTest(base.ClientTestBase):

# Optional arguments

def test_ceilometer_version(self):
version = self.ceilometer('', flags='--version', merge_stderr=True)
self.assertTrue(re.search('^[0-9.]+', version))

def test_ceilometer_debug_list(self):
self.ceilometer('meter-list', flags='--debug')

+ 6
- 0
releasenotes/notes/deprecation-44ae455f4ef3a81e.yaml View File

@@ -0,0 +1,6 @@
---
deprecations:
- |
As the Ceilometer API has been deprecated, this client is also now marked
as deprecated and will print a warning when used as a command-line
interface tool.

Loading…
Cancel
Save