Replace abc.abstractproperty with property and abc.abstractmethod
Replace abc.abstractproperty with property and abc.abstractmethod, as abc.abstractproperty has been deprecated since python3.3[1] [1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc Change-Id: Id7b94d3f3c852ba85255ca0b08d2dfc275006bab
This commit is contained in:
parent
0d0dc5b8da
commit
1e571d311d
|
@ -34,7 +34,8 @@ class MonitorBase(object, metaclass=abc.ABCMeta):
|
||||||
self.context = context
|
self.context = context
|
||||||
self.cluster = cluster
|
self.cluster = cluster
|
||||||
|
|
||||||
@abc.abstractproperty
|
@property
|
||||||
|
@abc.abstractmethod
|
||||||
def metrics_spec(self):
|
def metrics_spec(self):
|
||||||
"""Metric specification."""
|
"""Metric specification."""
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,8 @@ class Driver(object, metaclass=abc.ABCMeta):
|
||||||
"""
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
@abc.abstractproperty
|
@property
|
||||||
|
@abc.abstractmethod
|
||||||
def provides(self):
|
def provides(self):
|
||||||
"""return a list of (server_type, os, coe) tuples
|
"""return a list of (server_type, os, coe) tuples
|
||||||
|
|
||||||
|
|
|
@ -320,11 +320,13 @@ class TemplateDefinition(object, metaclass=abc.ABCMeta):
|
||||||
for output in self.nodegroup_output_mappings:
|
for output in self.nodegroup_output_mappings:
|
||||||
output.set_output(stack, cluster_template, cluster)
|
output.set_output(stack, cluster_template, cluster)
|
||||||
|
|
||||||
@abc.abstractproperty
|
@property
|
||||||
|
@abc.abstractmethod
|
||||||
def driver_module_path(self):
|
def driver_module_path(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@property
|
||||||
|
@abc.abstractmethod
|
||||||
def template_path(self):
|
def template_path(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -357,7 +359,8 @@ class BaseTemplateDefinition(TemplateDefinition):
|
||||||
def driver_module_path(self):
|
def driver_module_path(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@property
|
||||||
|
@abc.abstractmethod
|
||||||
def template_path(self):
|
def template_path(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue