From 8cecb0690f1cbfcf1a0151eb4de03debcc8a7514 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 4 Oct 2014 09:48:25 -0400 Subject: [PATCH] Update base.py updated with some notes --- v2/ansible/playbook/base.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/v2/ansible/playbook/base.py b/v2/ansible/playbook/base.py index 522d3ac4ef7..1223eafefe6 100644 --- a/v2/ansible/playbook/base.py +++ b/v2/ansible/playbook/base.py @@ -19,6 +19,19 @@ #from playbook.tag import Tag from ansible.playbook.attribute import Attribute, FieldAttribute + +# general concept +# FooObject.load(datastructure) -> Foo +# FooObject._load_field # optional +# FooObject._validate_field # optional +# FooObject._post_validate_field # optional +# FooObject.evaluate(host_context) -> FooObject ? (calls post_validators, templates all members) +# question - are there some things that need to be evaluated *before* host context, i.e. globally? +# most things should be templated but want to provide as much early checking as possible +# TODO: also check for fields in datastructure that are not valid +# TODO: PluginAttribute(type) allows all the valid plugins as valid types of names +# lookupPlugins start with "with_", ModulePluginAttribute allows any key + class Base(object): def __init__(self):