remove the new_in_<version> in API doc gen

see: https://github.com/ansible/awx/issues/73
This commit is contained in:
Ryan Petrello
2018-02-08 11:12:38 -05:00
parent 8475bdfdc4
commit 7472026cca
30 changed files with 0 additions and 298 deletions

View File

@@ -197,20 +197,6 @@ class APIView(views.APIView):
return { return {
'view': self, 'view': self,
'docstring': type(self).__doc__ or '', 'docstring': type(self).__doc__ or '',
'new_in_13': getattr(self, 'new_in_13', False),
'new_in_14': getattr(self, 'new_in_14', False),
'new_in_145': getattr(self, 'new_in_145', False),
'new_in_148': getattr(self, 'new_in_148', False),
'new_in_200': getattr(self, 'new_in_200', False),
'new_in_210': getattr(self, 'new_in_210', False),
'new_in_220': getattr(self, 'new_in_220', False),
'new_in_230': getattr(self, 'new_in_230', False),
'new_in_240': getattr(self, 'new_in_240', False),
'new_in_300': getattr(self, 'new_in_300', False),
'new_in_310': getattr(self, 'new_in_310', False),
'new_in_320': getattr(self, 'new_in_320', False),
'new_in_330': getattr(self, 'new_in_330', False),
'new_in_api_v2': getattr(self, 'new_in_api_v2', False),
'deprecated': getattr(self, 'deprecated', False), 'deprecated': getattr(self, 'deprecated', False),
'swagger_method': getattr(self.request, 'swagger_method', None), 'swagger_method': getattr(self.request, 'swagger_method', None),
} }

View File

@@ -190,23 +190,6 @@ class Metadata(metadata.SimpleMetadata):
finally: finally:
delattr(view, '_request') delattr(view, '_request')
# Add version number in which view was added to Tower.
added_in_version = '1.2'
for version in ('3.2.0', '3.1.0', '3.0.0', '2.4.0', '2.3.0', '2.2.0',
'2.1.0', '2.0.0', '1.4.8', '1.4.5', '1.4', '1.3'):
if getattr(view, 'new_in_%s' % version.replace('.', ''), False):
added_in_version = version
break
metadata['added_in_version'] = added_in_version
# Add API version number in which view was added to Tower.
added_in_api_version = 'v1'
for version in ('v2',):
if getattr(view, 'new_in_api_%s' % version, False):
added_in_api_version = version
break
metadata['added_in_api_version'] = added_in_api_version
# Add type(s) handled by this view/serializer. # Add type(s) handled by this view/serializer.
if hasattr(view, 'get_serializer'): if hasattr(view, 'get_serializer'):
serializer = view.get_serializer() serializer = view.get_serializer()

View File

@@ -1,14 +0,0 @@
{% if not version_label_flag or version_label_flag == 'true' %}
{% if new_in_13 %}> _Added in AWX 1.3_{% endif %}
{% if new_in_14 %}> _Added in AWX 1.4_{% endif %}
{% if new_in_145 %}> _Added in Ansible Tower 1.4.5_{% endif %}
{% if new_in_148 %}> _Added in Ansible Tower 1.4.8_{% endif %}
{% if new_in_200 %}> _Added in Ansible Tower 2.0.0_{% endif %}
{% if new_in_220 %}> _Added in Ansible Tower 2.2.0_{% endif %}
{% if new_in_230 %}> _Added in Ansible Tower 2.3.0_{% endif %}
{% if new_in_240 %}> _Added in Ansible Tower 2.4.0_{% endif %}
{% if new_in_300 %}> _Added in Ansible Tower 3.0.0_{% endif %}
{% if new_in_310 %}> _New in Ansible Tower 3.1.0_{% endif %}
{% if new_in_320 %}> _New in Ansible Tower 3.2.0_{% endif %}
{% if new_in_330 %}> _New in Ansible Tower 3.3.0_{% endif %}
{% endif %}

View File

@@ -1,3 +1 @@
{{ docstring }} {{ docstring }}
{% include "api/_new_in_awx.md" %}

View File

@@ -38,5 +38,3 @@ Data about failed and successfull hosts by inventory will be given as:
"id": 2, "id": 2,
"name": "Test Inventory" "name": "Test Inventory"
}, },
{% include "api/_new_in_awx.md" %}

View File

@@ -35,5 +35,3 @@ Data will be returned in the following format:
Each element contains an epoch timestamp represented in seconds and a numerical value indicating Each element contains an epoch timestamp represented in seconds and a numerical value indicating
the number of events during that time period the number of events during that time period
{% include "api/_new_in_awx.md" %}

View File

@@ -1,3 +1 @@
Make a GET request to this resource to retrieve aggregate statistics for Tower. Make a GET request to this resource to retrieve aggregate statistics for Tower.
{% include "api/_new_in_awx.md" %}

View File

@@ -5,5 +5,3 @@ Make a GET request to this resource to retrieve a list of
current {{ parent_model_verbose_name }}. current {{ parent_model_verbose_name }}.
{% include "api/_list_common.md" %} {% include "api/_list_common.md" %}
{% include "api/_new_in_awx.md" %}

View File

@@ -9,5 +9,3 @@ You may filter by datetime:
and module and module
`?datetime=2015-06-01&module=ansible` `?datetime=2015-06-01&module=ansible`
{% include "api/_new_in_awx.md" %}

View File

@@ -9,5 +9,3 @@ You may filter scan runs using the `from` and `to` properties:
You may also filter by module You may also filter by module
`?module=packages` `?module=packages`
{% include "api/_new_in_awx.md" %}

View File

@@ -29,5 +29,3 @@ Response code from this action will be:
- 202 if some inventory source updates were successful, but some failed - 202 if some inventory source updates were successful, but some failed
- 400 if all of the inventory source updates failed - 400 if all of the inventory source updates failed
- 400 if there are no inventory sources in the inventory - 400 if there are no inventory sources in the inventory
{% include "api/_new_in_awx.md" %}

View File

@@ -9,5 +9,3 @@ cancelled. The response will include the following field:
Make a POST request to this resource to cancel a pending or running inventory Make a POST request to this resource to cancel a pending or running inventory
update. The response status code will be 202 if successful, or 405 if the update. The response status code will be 202 if successful, or 405 if the
update cannot be canceled. update cannot be canceled.
{% include "api/_new_in_awx.md" %}

View File

@@ -9,5 +9,3 @@ from its inventory source. The response will include the following field:
Make a POST request to this resource to update the inventory source. If Make a POST request to this resource to update the inventory source. If
successful, the response status code will be 202. If the inventory source is successful, the response status code will be 202. If the inventory source is
not defined or cannot be updated, a 405 status code will be returned. not defined or cannot be updated, a 405 status code will be returned.
{% include "api/_new_in_awx.md" %}

View File

@@ -11,5 +11,3 @@ also containing a list of its children.
Each group data structure includes the following fields: Each group data structure includes the following fields:
{% include "api/_result_fields_common.md" %} {% include "api/_result_fields_common.md" %}
{% include "api/_new_in_awx.md" %}

View File

@@ -23,5 +23,3 @@ Will show only failed plays. Alternatively `false` may be used.
?play__icontains=test ?play__icontains=test
Will filter plays matching the substring `test` Will filter plays matching the substring `test`
{% include "api/_new_in_awx.md" %}

View File

@@ -25,5 +25,3 @@ Will show only failed plays. Alternatively `false` may be used.
?task__icontains=test ?task__icontains=test
Will filter tasks matching the substring `test` Will filter tasks matching the substring `test`
{% include "api/_new_in_awx.md" %}

View File

@@ -1,13 +1,7 @@
{% with 'false' as version_label_flag %}
{% include "api/sub_list_create_api_view.md" %} {% include "api/sub_list_create_api_view.md" %}
{% endwith %}
Labels not associated with any other resources are deleted. A label can become disassociated with a resource as a result of 3 events. Labels not associated with any other resources are deleted. A label can become disassociated with a resource as a result of 3 events.
1. A label is explicitly disassociated with a related job template 1. A label is explicitly disassociated with a related job template
2. A job is deleted with labels 2. A job is deleted with labels
3. A cleanup job deletes a job with labels 3. A cleanup job deletes a job with labels
{% with 'true' as version_label_flag %}
{% include "api/_new_in_awx.md" %}
{% endwith %}

View File

@@ -5,6 +5,4 @@ Make a GET request to this resource to retrieve the list of
{{ model_verbose_name_plural }}. {{ model_verbose_name_plural }}.
{% include "api/_list_common.md" %} {% include "api/_list_common.md" %}
{% include "api/_new_in_awx.md" %}
{% endifmeth %} {% endifmeth %}

View File

@@ -8,5 +8,3 @@ fields to create a new {{ model_verbose_name }}:
{% with write_only=1 %} {% with write_only=1 %}
{% include "api/_result_fields_common.md" with serializer_fields=serializer_create_fields %} {% include "api/_result_fields_common.md" with serializer_fields=serializer_create_fields %}
{% endwith %} {% endwith %}
{% include "api/_new_in_awx.md" %}

View File

@@ -9,5 +9,3 @@ cancelled. The response will include the following field:
Make a POST request to this resource to cancel a pending or running project Make a POST request to this resource to cancel a pending or running project
update. The response status code will be 202 if successful, or 405 if the update. The response status code will be 202 if successful, or 405 if the
update cannot be canceled. update cannot be canceled.
{% include "api/_new_in_awx.md" %}

View File

@@ -8,5 +8,3 @@ from its SCM source. The response will include the following field:
Make a POST request to this resource to update the project. If the project Make a POST request to this resource to update the project. If the project
cannot be updated, a 405 status code will be returned. cannot be updated, a 405 status code will be returned.
{% include "api/_new_in_awx.md" %}

View File

@@ -8,5 +8,3 @@ Make GET request to this resource to retrieve a single {{ model_verbose_name }}
record containing the following fields: record containing the following fields:
{% include "api/_result_fields_common.md" %} {% include "api/_result_fields_common.md" %}
{% include "api/_new_in_awx.md" %}

View File

@@ -16,5 +16,3 @@ record containing the following fields:
Make a DELETE request to this resource to delete this {{ model_verbose_name }}. Make a DELETE request to this resource to delete this {{ model_verbose_name }}.
{% endifmeth %} {% endifmeth %}
{% include "api/_new_in_awx.md" %}

View File

@@ -29,5 +29,3 @@ For a PUT request, include **all** fields in the request.
{% ifmeth PATCH %} {% ifmeth PATCH %}
For a PATCH request, include only the fields that are being modified. For a PATCH request, include only the fields that are being modified.
{% endifmeth %} {% endifmeth %}
{% include "api/_new_in_awx.md" %}

View File

@@ -35,5 +35,3 @@ For a PATCH request, include only the fields that are being modified.
Make a DELETE request to this resource to delete this {{ model_verbose_name }}. Make a DELETE request to this resource to delete this {{ model_verbose_name }}.
{% endifmeth %} {% endifmeth %}
{% include "api/_new_in_awx.md" %}

View File

@@ -6,5 +6,4 @@ Make a GET request to this resource to retrieve a list of
{{ parent_model_verbose_name }}. {{ parent_model_verbose_name }}.
{% include "api/_list_common.md" %} {% include "api/_list_common.md" %}
{% include "api/_new_in_awx.md" %}
{% endifmeth %} {% endifmeth %}

View File

@@ -37,5 +37,3 @@ remove the {{ model_verbose_name }} from this {{ parent_model_verbose_name }}
{% if model_verbose_name != "label" %} without deleting the {{ model_verbose_name }}{% endif %}. {% if model_verbose_name != "label" %} without deleting the {{ model_verbose_name }}{% endif %}.
{% endif %} {% endif %}
{% endif %} {% endif %}
{% include "api/_new_in_awx.md" %}

View File

@@ -25,5 +25,3 @@ dark background.
Files over {{ settings.STDOUT_MAX_BYTES_DISPLAY|filesizeformat }} (configurable) Files over {{ settings.STDOUT_MAX_BYTES_DISPLAY|filesizeformat }} (configurable)
will not display in the browser. Use the `txt_download` or `ansi_download` will not display in the browser. Use the `txt_download` or `ansi_download`
formats to download the file directly to view it. formats to download the file directly to view it.
{% include "api/_new_in_awx.md" %}

File diff suppressed because it is too large Load Diff

View File

@@ -44,7 +44,6 @@ class SettingCategoryList(ListAPIView):
model = Setting # Not exactly, but needed for the view. model = Setting # Not exactly, but needed for the view.
serializer_class = SettingCategorySerializer serializer_class = SettingCategorySerializer
filter_backends = [] filter_backends = []
new_in_310 = True
view_name = _('Setting Categories') view_name = _('Setting Categories')
def get_queryset(self): def get_queryset(self):
@@ -69,7 +68,6 @@ class SettingSingletonDetail(RetrieveUpdateDestroyAPIView):
model = Setting # Not exactly, but needed for the view. model = Setting # Not exactly, but needed for the view.
serializer_class = SettingSingletonSerializer serializer_class = SettingSingletonSerializer
filter_backends = [] filter_backends = []
new_in_310 = True
view_name = _('Setting Detail') view_name = _('Setting Detail')
def get_queryset(self): def get_queryset(self):
@@ -170,7 +168,6 @@ class SettingLoggingTest(GenericAPIView):
serializer_class = SettingSingletonSerializer serializer_class = SettingSingletonSerializer
permission_classes = (IsSuperUser,) permission_classes = (IsSuperUser,)
filter_backends = [] filter_backends = []
new_in_320 = True
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
defaults = dict() defaults = dict()