Refactor the get_schema call to make more sense.

This commit is contained in:
Mike Auty
2016-07-29 02:56:20 +01:00
parent 4f17143fd3
commit bb2dd859d5
9 changed files with 13 additions and 13 deletions
@@ -72,7 +72,7 @@ class ConfigurableInterface(validity.ValidityRoutines):
return self._config_path
@classmethod
def get_schema(cls):
def get_requirements(cls):
"""Returns a list of configuration schema nodes for this object"""
return []
+3 -3
View File
@@ -116,8 +116,8 @@ class DataLayerInterface(configuration.ProviderInterface, validity.ValidityRouti
pass
@classmethod
def get_schema(cls):
"""Returns a list of requirements for this type of layer"""
def get_requirements(cls):
"""Returns a list of Requirement objects for this type of layer"""
return []
@classmethod
@@ -132,7 +132,7 @@ class DataLayerInterface(configuration.ProviderInterface, validity.ValidityRouti
# Construct the layer
requirement_dict = {}
for req in cls.get_schema():
for req in cls.get_requirements():
if req.name in node_config.data:
requirement_dict[req.name] = node_config.data[req.name]
# Fulfillment must happen, exceptions happening here mean the requirements aren't correct
+2 -2
View File
@@ -37,8 +37,8 @@ class PluginInterface(configuration_interface.ConfigurableInterface, validity.Va
return self._context
@classmethod
def get_schema(cls):
"""Returns a list of configuration schema items"""
def get_requirements(cls):
"""Returns a list of Requirement objects for this plugin"""
return []
def validate_inputs(self):