Removed PEM file things.

This commit is contained in:
Luke Sneeringer
2014-07-21 11:08:27 -05:00
parent dd79ba8de7
commit 4d0abd4cca
4 changed files with 325 additions and 75 deletions

View File

@@ -14,26 +14,12 @@ from django.core.urlresolvers import reverse
# AWX
from awx.main import storage
from awx.main.fields import BinaryField
from awx.main.utils import decrypt_field
from awx.main.models.base import *
__all__ = ['Credential']
class PEM(models.Model):
"""Model representing a PEM p12 private key created with openssl.
These are notably used as credentials for authenticating to Google
services, and Tower uses them for Google Compute Engine.
"""
filename = models.CharField(max_length=100, unique=True)
contents = BinaryField()
class Meta:
app_label = 'main'
class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
'''
A credential contains information about how to talk to a remote resource
@@ -51,7 +37,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
]
PASSWORD_FIELDS = ('password', 'ssh_key_data', 'ssh_key_unlock',
'sudo_password', 'vault_password', 'pem_file')
'sudo_password', 'vault_password')
class Meta:
app_label = 'main'
@@ -137,12 +123,6 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
default='',
help_text=_('Vault password (or "ASK" to prompt the user).'),
)
pem_file = models.FileField(
blank=True,
null=True,
upload_to='irrelevant',
storage=storage.DatabaseStorage(PEM),
)
@property
def needs_password(self):