1 from .client
import client
4 def get_entity_delta(d
):
7 'application': ApplicationDelta
,
8 'annotation': AnnotationDelta
,
9 'machine': MachineDelta
,
11 'relation': RelationDelta
,
14 return _delta_types
[d
.entity
](d
.deltas
)
17 class EntityDelta(client
.Delta
):
19 return self
.data
['id']
21 def get_entity_class(self
):
25 class ActionDelta(EntityDelta
):
26 def get_entity_class(self
):
27 from .action
import Action
31 class ApplicationDelta(EntityDelta
):
33 return self
.data
['name']
35 def get_entity_class(self
):
36 from .application
import Application
40 class AnnotationDelta(EntityDelta
):
42 return self
.data
['tag']
44 def get_entity_class(self
):
45 from .annotation
import Annotation
49 class MachineDelta(EntityDelta
):
50 def get_entity_class(self
):
51 from .machine
import Machine
55 class UnitDelta(EntityDelta
):
57 return self
.data
['name']
59 def get_entity_class(self
):
60 from .unit
import Unit
64 class RelationDelta(EntityDelta
):
65 def get_entity_class(self
):
66 from .relation
import Relation