1919from django .dispatch import receiver
2020from django .dispatch .dispatcher import Signal
2121from django .utils .encoding import python_2_unicode_compatible
22+ from json_field .fields import JSONField # @UnusedImport
2223
2324from api import fields , tasks
2425from provider import import_provider_module
@@ -111,7 +112,7 @@ class Provider(UuidAuditedModel):
111112 owner = models .ForeignKey (settings .AUTH_USER_MODEL )
112113 id = models .SlugField (max_length = 64 )
113114 type = models .SlugField (max_length = 16 , choices = PROVIDERS )
114- creds = fields . CredentialsField (blank = True )
115+ creds = JSONField (blank = True )
115116
116117 class Meta :
117118 unique_together = (('owner' , 'id' ),)
@@ -148,7 +149,7 @@ class Flavor(UuidAuditedModel):
148149 owner = models .ForeignKey (settings .AUTH_USER_MODEL )
149150 id = models .SlugField (max_length = 64 )
150151 provider = models .ForeignKey ('Provider' )
151- params = fields . ParamsField (blank = True )
152+ params = JSONField (blank = True )
152153
153154 class Meta :
154155 unique_together = (('owner' , 'id' ),)
@@ -167,7 +168,7 @@ class Formation(UuidAuditedModel):
167168 owner = models .ForeignKey (settings .AUTH_USER_MODEL )
168169 id = models .SlugField (max_length = 64 , unique = True )
169170 domain = models .CharField (max_length = 128 , blank = True , null = True )
170- nodes = fields . JSONField (default = '{}' , blank = True )
171+ nodes = JSONField (default = '{}' , blank = True )
171172
172173 class Meta :
173174 unique_together = (('owner' , 'id' ),)
@@ -256,7 +257,7 @@ class Layer(UuidAuditedModel):
256257 ssh_port = models .SmallIntegerField (default = 22 )
257258
258259 # example: {'run_list': [deis::runtime'], 'environment': 'dev'}
259- config = fields . JSONField (default = '{}' , blank = True )
260+ config = JSONField (default = '{}' , blank = True )
260261
261262 class Meta :
262263 unique_together = (('formation' , 'id' ),)
@@ -390,7 +391,7 @@ class Node(UuidAuditedModel):
390391
391392 provider_id = models .SlugField (max_length = 64 , blank = True , null = True )
392393 fqdn = models .CharField (max_length = 256 , blank = True , null = True )
393- status = fields . NodeStatusField (blank = True , null = True )
394+ status = JSONField (blank = True , null = True )
394395
395396 class Meta :
396397 unique_together = (('formation' , 'id' ),)
@@ -438,7 +439,7 @@ class App(UuidAuditedModel):
438439 id = models .SlugField (max_length = 64 , unique = True )
439440 formation = models .ForeignKey ('Formation' )
440441
441- containers = fields . JSONField (default = '{}' , blank = True )
442+ containers = JSONField (default = '{}' , blank = True )
442443
443444 def __str__ (self ):
444445 return self .id
@@ -666,7 +667,7 @@ class Config(UuidAuditedModel):
666667 app = models .ForeignKey ('App' )
667668 version = models .PositiveIntegerField ()
668669
669- values = fields . EnvVarsField (default = '{}' , blank = True )
670+ values = JSONField (default = '{}' , blank = True )
670671
671672 class Meta :
672673 get_latest_by = 'created'
@@ -690,9 +691,9 @@ class Build(UuidAuditedModel):
690691
691692 image = models .CharField (max_length = 256 , default = 'deis/buildstep' )
692693
693- procfile = fields . ProcfileField (blank = True )
694+ procfile = JSONField (blank = True )
694695 dockerfile = models .TextField (blank = True )
695- config = fields . EnvVarsField (blank = True )
696+ config = JSONField (blank = True )
696697
697698 url = models .URLField ('URL' )
698699 size = models .IntegerField (blank = True , null = True )
0 commit comments