Skip to content

Commit

Permalink
[COST-4807] Remove remove-stale from enabled tags masu endpoint optio…
Browse files Browse the repository at this point in the history
…ns (#5007)

Co-authored-by: Michael Skarbek <mskarbek@redhat.com>
  • Loading branch information
cgoodfred and maskarb authored Apr 8, 2024
1 parent 81f259e commit 1aef108
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 111 deletions.
17 changes: 0 additions & 17 deletions koku/masu/api/enabled_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
#
"""View for enable_tags masu admin endpoint."""
import logging
import pkgutil

from django.db import connection
from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache
from django_tenants.utils import schema_context
from jinjasql import JinjaSql
from rest_framework import status
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
Expand Down Expand Up @@ -111,18 +108,4 @@ def post(self, request):
enabled_tag_key.save()
msg = f"Disabled tags for schema: {schema_name}."
LOG.info(msg)
elif action.lower() == "remove_stale":
jinja_sql = JinjaSql(param_style="format")
sql = pkgutil.get_data(
"masu.database",
f"sql/{PROVIDER_TYPE_TO_FILE_PATH.get(provider_type)}/remove_stale_enabled_tags.sql",
)
sql = sql.decode("utf-8")
params = {"schema": schema_name}
sql, params = jinja_sql.prepare_query(sql, params)
LOG.info("Removing stale enabled tag keys.")
with schema_context(schema_name):
with connection.cursor() as cursor:
cursor.execute(sql, params=params)

return Response({RESPONSE_KEY: tag_keys})
18 changes: 0 additions & 18 deletions koku/masu/database/sql/aws/remove_stale_enabled_tags.sql

This file was deleted.

18 changes: 0 additions & 18 deletions koku/masu/database/sql/azure/remove_stale_enabled_tags.sql

This file was deleted.

18 changes: 0 additions & 18 deletions koku/masu/database/sql/gcp/remove_stale_enabled_tags.sql

This file was deleted.

18 changes: 0 additions & 18 deletions koku/masu/database/sql/oci/remove_stale_enabled_tags.sql

This file was deleted.

22 changes: 0 additions & 22 deletions koku/masu/database/sql/openshift/remove_stale_enabled_tags.sql

This file was deleted.

0 comments on commit 1aef108

Please sign in to comment.