mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
metadata 1.1
* Add network value to support_by field. * New support_by value, certified * Deprecate curated in favor of certified * Add conversion from 1.0 to 1.1 to metadata-tool * Add supported by Red Hat field to ansible-doc output
This commit is contained in:
parent
d50d65d448
commit
af2073d057
19 changed files with 175 additions and 71 deletions
|
@ -104,7 +104,7 @@ def doc_schema(module_name):
|
|||
)
|
||||
|
||||
|
||||
def metadata_schema(deprecated):
|
||||
def metadata_1_0_schema(deprecated):
|
||||
valid_status = Any('stableinterface', 'preview', 'deprecated', 'removed')
|
||||
if deprecated:
|
||||
valid_status = Any('deprecated')
|
||||
|
@ -118,6 +118,20 @@ def metadata_schema(deprecated):
|
|||
)
|
||||
|
||||
|
||||
def metadata_1_1_schema(deprecated):
|
||||
valid_status = Any('stableinterface', 'preview', 'deprecated', 'removed')
|
||||
if deprecated:
|
||||
valid_status = Any('deprecated')
|
||||
|
||||
return Schema(
|
||||
{
|
||||
Required('status'): [valid_status],
|
||||
Required('metadata_version'): '1.1',
|
||||
Required('supported_by'): Any('core', 'community', 'certified', 'network')
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
# Things to add soon
|
||||
####################
|
||||
# 1) Recursively validate `type: complex` fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue