1- #!/usr/bin/python
21# -*- coding: utf-8 -*-
32
43"""
54Data models for the Deis API.
65"""
7- # pylint: disable=R0903,W0232
86
97from __future__ import unicode_literals
108import importlib
3634
3735# base models
3836
39-
4037class AuditedModel (models .Model ):
4138 """Add created and updated fields to a model."""
4239
@@ -57,8 +54,8 @@ class Meta:
5754 """Mark :class:`UuidAuditedModel` as abstract."""
5855 abstract = True
5956
60- # deis core models
6157
58+ # deis core models
6259
6360@python_2_unicode_compatible
6461class Key (UuidAuditedModel ):
@@ -127,7 +124,7 @@ def __str__(self):
127124
128125
129126class FlavorManager (models .Manager ):
130- """Manage database interactions for :class:`Flavor`."""
127+ """Manage database interactions for :class:`Flavor`\s ."""
131128
132129 def seed (self , user , ** kwargs ):
133130 """Seed the database with default Flavors for each cloud region."""
@@ -164,7 +161,6 @@ def __str__(self):
164161
165162@python_2_unicode_compatible
166163class Formation (UuidAuditedModel ):
167-
168164 """
169165 Formation of nodes used to host applications
170166 """
@@ -250,7 +246,6 @@ def calculate(self):
250246
251247@python_2_unicode_compatible
252248class Layer (UuidAuditedModel ):
253-
254249 """
255250 Layer of nodes used by the formation
256251
@@ -763,7 +758,7 @@ class Release(UuidAuditedModel):
763758 """
764759 Software release deployed by the application platform
765760
766- Releases contain a Build and a Config.
761+ Releases contain a :class:` Build` and a :class:` Config` .
767762 """
768763
769764 owner = models .ForeignKey (settings .AUTH_USER_MODEL )
@@ -844,10 +839,10 @@ def _user_purge(self):
844839User .publish = _user_publish
845840User .purge = _user_purge
846841
842+
847843# define update/delete callbacks for synchronizing
848844# models with the configuration management backend
849845
850-
851846def _publish_to_cm (** kwargs ):
852847 kwargs ['instance' ].publish ()
853848
0 commit comments