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:
Toshio Kuratomi
2017-08-05 11:28:21 -07:00
parent d50d65d448
commit af2073d057
19 changed files with 175 additions and 71 deletions

View File

@@ -31,7 +31,7 @@ The following checklist items are important guidelines for people who want to c
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'metadata_version': '1.0'}
'metadata_version': '1.1'}
The complete module metadata specification is here: `Ansible metadata block <https://docs.ansible.com/ansible/dev_guide/developing_modules_documenting.html#ansible-metadata-block>`_

View File

@@ -75,7 +75,7 @@ For new modules, the following block can be simply added into your module
.. code-block:: python
ANSIBLE_METADATA = {'metadata_version': '1.0',
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
@@ -92,7 +92,7 @@ For new modules, the following block can be simply added into your module
ANSIBLE_METADATA doesn't look quite right because of this. Module
metadata should be fixed before checking it into the repository.
Version 1.0 of the metadata
Version 1.1 of the metadata
+++++++++++++++++++++++++++
Structure
@@ -101,7 +101,7 @@ Structure
.. code-block:: python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'supported_by': 'community',
'status': ['preview', 'deprecated']
}
@@ -115,13 +115,17 @@ Fields
of the metadata. Well increment Y if we add fields or legal values
to an existing field. Well increment X if we remove fields or values
or change the type or meaning of a field.
Current metadata_version is "1.1"
:supported_by: This field records who supports the module.
Default value is ``community``. Values are:
:core:
:curated:
:community:
* core
* network
* certfied
* community
* curated (Deprecated. Modules in this category should probably be core or
certified instead)
For information on what the support level values entail, please see
`Modules Support <http://docs.ansible.com/ansible/modules_support.html>`_.
@@ -142,6 +146,18 @@ Fields
kept so that documentation can be built. The documentation helps
users port from the removed module to new modules.
Changes from Version 1.0
++++++++++++++++++++++++
:metadata_version: Version updated from 1.0 to 1.1
:supported_by: All substantive changes were to potential values of the supported_by field
* Added the certified value
* Deprecated the curated value, modules shipped with Ansible will use
certified instead. Third party modules are encouraged not to use this as
it is meaningless within Ansible proper.
* Added the network value
DOCUMENTATION Block
-------------------

View File

@@ -56,9 +56,9 @@ working on a whole new file. Here is an example:
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'curated'
'supported_by': 'community'
}
DOCUMENTATION = '''

View File

@@ -88,9 +88,9 @@ working on a whole new file. Here is an example:
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'curated'
'supported_by': 'community'
}
DOCUMENTATION = '''
@@ -401,9 +401,9 @@ working on a whole new file. Here is an example:
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'curated'
'supported_by': 'community'
}
DOCUMENTATION = '''
@@ -714,9 +714,9 @@ working on a whole new file. Here is an example:
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'curated'
'supported_by': 'community'
}
DOCUMENTATION = '''
@@ -1027,9 +1027,9 @@ working on a whole new file. Here is an example:
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'curated'
'supported_by': 'community'
}
DOCUMENTATION = '''
@@ -1340,9 +1340,9 @@ working on a whole new file. Here is an example:
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.0',
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'curated'
'supported_by': 'community'
}
DOCUMENTATION = '''
@@ -1569,4 +1569,4 @@ Credit
======
A *huge* thank you to the Ansible team at Red Hat for providing not only
a great product but also the willingness to help out contributors!
a great product but also the willingness to help out contributors!