mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 06:29:31 -02:30
Merge pull request #2983 from ansible/deprecated_facts
deprecate fact endpoints
This commit is contained in:
@@ -2358,6 +2358,7 @@ class HostFactVersionsList(SystemTrackingEnforcementMixin, ParentMixin, ListAPIV
|
|||||||
serializer_class = FactVersionSerializer
|
serializer_class = FactVersionSerializer
|
||||||
parent_model = Host
|
parent_model = Host
|
||||||
search_fields = ('facts',)
|
search_fields = ('facts',)
|
||||||
|
deprecated = True
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
from_spec = self.request.query_params.get('from', None)
|
from_spec = self.request.query_params.get('from', None)
|
||||||
@@ -2383,6 +2384,7 @@ class HostFactCompareView(SystemTrackingEnforcementMixin, SubDetailAPIView):
|
|||||||
model = Fact
|
model = Fact
|
||||||
parent_model = Host
|
parent_model = Host
|
||||||
serializer_class = FactSerializer
|
serializer_class = FactSerializer
|
||||||
|
deprecated = True
|
||||||
|
|
||||||
def retrieve(self, request, *args, **kwargs):
|
def retrieve(self, request, *args, **kwargs):
|
||||||
datetime_spec = request.query_params.get('datetime', None)
|
datetime_spec = request.query_params.get('datetime', None)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
# Python
|
# Python
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
@@ -129,6 +130,7 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
|
sys.stderr.write("This command has been deprecated and will be removed in a future release.\n")
|
||||||
if not feature_enabled('system_tracking'):
|
if not feature_enabled('system_tracking'):
|
||||||
raise CommandError("The System Tracking feature is not enabled for your instance")
|
raise CommandError("The System Tracking feature is not enabled for your instance")
|
||||||
cleanup_facts = CleanupFacts()
|
cleanup_facts = CleanupFacts()
|
||||||
|
|||||||
Reference in New Issue
Block a user