From 8f7ff999beb26171c51a1de92947aed46fb5a50e Mon Sep 17 00:00:00 2001 From: Boden R Date: Thu, 1 Mar 2018 09:20:22 -0700 Subject: [PATCH] use revision if match api def from neutron-lib The revision if match extension's API definition was rehomed into neutron-lib with I46e30079bc0708b7f55d404c262226cf986e5b66 This patch consumes it by using the APIExtensionDescriptor parent class along with the API definition. NeutronLibImpact Change-Id: I9044dd1f70ee2f342f872acca58baf74b233f1c1 --- neutron/extensions/revisionifmatch.py | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/neutron/extensions/revisionifmatch.py b/neutron/extensions/revisionifmatch.py index 610d30e3265..9263a014343 100644 --- a/neutron/extensions/revisionifmatch.py +++ b/neutron/extensions/revisionifmatch.py @@ -11,32 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +from neutron_lib.api.definitions import revisionifmatch as apidef from neutron_lib.api import extensions as api_extensions -class Revisionifmatch(api_extensions.ExtensionDescriptor): +class Revisionifmatch(api_extensions.APIExtensionDescriptor): """Indicate that If-Match constraints on revision_number are supported.""" - @classmethod - def get_name(cls): - return "If-Match constraints based on revision_number" - - @classmethod - def get_alias(cls): - return 'revision-if-match' - - @classmethod - def get_description(cls): - return ("Extension indicating that If-Match based on revision_number " - "is supported.") - - @classmethod - def get_updated(cls): - return "2016-12-11T00:00:00-00:00" - - @classmethod - def get_resources(cls): - return [] - - def get_extended_resources(self, version): - return {} + api_definition = apidef