azure migrations

* delete azure credentials
* delete azure inventory sources
This commit is contained in:
Chris Meyers
2017-09-15 11:19:40 -04:00
committed by Ryan Petrello
parent a08a158672
commit 0b40331107
5 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
import logging
from django.db.models import Q
logger = logging.getLogger('awx.main.migrations')
def remove_azure_credentials(apps, schema_editor):
'''Azure is not supported as of 3.2 and greater. Instead, azure_rm is
supported.
'''
Credential = apps.get_model('main', 'Credential')
logger.debug("Removing all Azure Credentials from database.")
Credential.objects.filter(kind='azure').delete()