mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update base.py
updated with some notes
This commit is contained in:
parent
94db7365b9
commit
8cecb0690f
1 changed files with 13 additions and 0 deletions
|
@ -19,6 +19,19 @@
|
||||||
#from playbook.tag import Tag
|
#from playbook.tag import Tag
|
||||||
from ansible.playbook.attribute import Attribute, FieldAttribute
|
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):
|
class Base(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in a new issue