1 from .client
import client
4 def get_entity_delta(d
):
5 return _delta_types
[d
.entity
](d
.deltas
)
8 def get_entity_class(entity_type
):
9 return _delta_types
[entity_type
].get_entity_class()
12 class EntityDelta(client
.Delta
):
14 return self
.data
['id']
17 def get_entity_class(self
):
21 class ActionDelta(EntityDelta
):
23 def get_entity_class(self
):
24 from .action
import Action
28 class ApplicationDelta(EntityDelta
):
30 return self
.data
['name']
33 def get_entity_class(self
):
34 from .application
import Application
38 class AnnotationDelta(EntityDelta
):
40 return self
.data
['tag']
43 def get_entity_class(self
):
44 from .annotation
import Annotation
48 class MachineDelta(EntityDelta
):
50 def get_entity_class(self
):
51 from .machine
import Machine
55 class UnitDelta(EntityDelta
):
57 return self
.data
['name']
60 def get_entity_class(self
):
61 from .unit
import Unit
65 class RelationDelta(EntityDelta
):
67 def get_entity_class(self
):
68 from .relation
import Relation
73 'action': ActionDelta
,
74 'application': ApplicationDelta
,
75 'annotation': AnnotationDelta
,
76 'machine': MachineDelta
,
78 'relation': RelationDelta
,