diff --git a/volatility/framework/configuration.py b/volatility/framework/configuration.py index f65001c2c..717ee499a 100644 --- a/volatility/framework/configuration.py +++ b/volatility/framework/configuration.py @@ -69,3 +69,18 @@ class ListRequirement(ConfigurationSchemaNode): if not (self.min_elements <= len(value) <= self.max_elements): raise TypeError("List option provided more or less elements than allowed.") [self.element_type.validate(element, context) for element in value] + +# class DisjunctionRequirement(ConfigurationSchemaNode): +# """Class allow any of multiple requirements""" +# +# def __init__(self, requirements, *args, **kwargs): +# +# +# # TODO: Type check requirements to ensure it's a dictionary of requirements +# +# +# class ConjunctionRequierment(ConfigurationSchemaNode): +# """Class require all of multiple requirements""" +# +# def __init__(self, requirements, *args, **kwargs): +# # TODO: Type check requirements to ensure it's a dictionary of requirements diff --git a/volatility/framework/interfaces/configuration.py b/volatility/framework/interfaces/configuration.py index a7b59bf55..65f49867c 100644 --- a/volatility/framework/interfaces/configuration.py +++ b/volatility/framework/interfaces/configuration.py @@ -7,6 +7,22 @@ __author__ = 'mike' SCHEMA_NAME_DIVIDER = "." +# Design requirements: +# Plugins can be queried for their requirements without instantiating them +# The context can record validated data +# Configurables can have multiple identical (but differently named) requirement trees (based off the same schema) +# Instantiated plugins can pre-populate the context with (validated) da (in order to force layer names) +# Translation layer requirements can specify a layer name (or generate one if not specified) +# Still not decided whether the layer holds the name chosen (and this can be pre-populated) or if it's specified +# as part of the requirement, which then returns true/false if it could be fulfilled + +# Non-instantiated plugin +# -> Requirement schema nodes (instantiated) +# (Translation layers contain all information required) +# Instantiate plugin +# -> Requirement schema nodes (instantiated) wrapped in value reader/writer/valdiator + + def schema_name_join(pathlist): return SCHEMA_NAME_DIVIDER.join(pathlist)