From 74746b3407684df6a6e687ce502ffdc7c57f44ab Mon Sep 17 00:00:00 2001 From: j-griffith Date: Wed, 7 Feb 2018 09:38:22 -0700 Subject: [PATCH] Deprecate Cinder Hosts API/Extension This was added a long long long long time ago, but it was never fully implemented and is not used anywhere. It might be worth resurrecting and having, but it should probably be a first class API rather than an extension, and if nothing else it would be good if we want this to create a spec and have a real plan on it's implementation and usage. Bottom line, it's not used anywhere and the implementation is not complete. We could probably remove it safely, but let's deprecate it and fast track removal and possible replacement next cycle. Change-Id: I1a1920d141c8c32a8fb30bc6f73e955a1a1c5150 --- cinder/api/contrib/hosts.py | 5 +++++ .../deprecate_hosts_api_extension-fe0c042af10a20db.yaml | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/deprecate_hosts_api_extension-fe0c042af10a20db.yaml diff --git a/cinder/api/contrib/hosts.py b/cinder/api/contrib/hosts.py index dc1f93e75ba..ac8ba1c9aa8 100644 --- a/cinder/api/contrib/hosts.py +++ b/cinder/api/contrib/hosts.py @@ -17,6 +17,7 @@ from oslo_config import cfg from oslo_log import log as logging +from oslo_log import versionutils from oslo_utils import timeutils import webob.exc @@ -89,6 +90,10 @@ class HostController(wsgi.Controller): def __init__(self): self.api = volume_api.HostAPI() super(HostController, self).__init__() + versionutils.report_deprecated_feature( + LOG, + "The Host API is deprecated and will be " + "be removed in a future version.") def index(self, req): context = req.environ['cinder.context'] diff --git a/releasenotes/notes/deprecate_hosts_api_extension-fe0c042af10a20db.yaml b/releasenotes/notes/deprecate_hosts_api_extension-fe0c042af10a20db.yaml new file mode 100644 index 00000000000..76e75f8c52d --- /dev/null +++ b/releasenotes/notes/deprecate_hosts_api_extension-fe0c042af10a20db.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The hosts api extension is now deprecated and will be removed in a + future version. +deprecations: + - | + The hosts api extension is now deprecated and will be removed in a + future version.