normalize names

This commit is contained in:
Brian Coca 2017-12-04 10:46:46 -05:00 committed by Brian Coca
parent a57d6a4206
commit 0d35a69f0e
5 changed files with 2 additions and 4 deletions

View file

@ -141,6 +141,8 @@ class BaseMeta(type):
class Base(with_metaclass(BaseMeta, object)):
_name = FieldAttribute(isa='string', default='', always_post_validate=True, inherit=False)
# connection/transport
_connection = FieldAttribute(isa='string')
_port = FieldAttribute(isa='int')

View file

@ -39,7 +39,6 @@ class Block(Base, Become, Conditional, Taggable):
# other fields
_delegate_to = FieldAttribute(isa='string')
_delegate_facts = FieldAttribute(isa='bool', default=False)
_name = FieldAttribute(isa='string', default='')
# for future consideration? this would be functionally
# similar to the 'else' clause for exceptions

View file

@ -54,7 +54,6 @@ class Play(Base, Taggable, Become):
"""
# =================================================================================
_name = FieldAttribute(isa='string', default='', always_post_validate=True)
_hosts = FieldAttribute(isa='list', required=True, listof=string_types, always_post_validate=True)
# Facts

View file

@ -34,7 +34,6 @@ from ansible.template import Templar
class PlaybookInclude(Base, Conditional, Taggable):
_name = FieldAttribute(isa='string')
_import_playbook = FieldAttribute(isa='string')
_vars = FieldAttribute(isa='dict', default=dict())

View file

@ -77,7 +77,6 @@ class Task(Base, Conditional, Taggable, Become):
_failed_when = FieldAttribute(isa='list', default=[])
_loop = FieldAttribute()
_loop_control = FieldAttribute(isa='class', class_type=LoopControl, inherit=False)
_name = FieldAttribute(isa='string', default='')
_notify = FieldAttribute(isa='list')
_poll = FieldAttribute(isa='int', default=10)
_register = FieldAttribute(isa='string')