MCPcopy
hub / github.com/apache/caldera / ResultSchema

Class ResultSchema

app/objects/secondclass/c_result.py:6–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class ResultSchema(ma.Schema):
7 id = ma.fields.String()
8 output = ma.fields.String()
9 stderr = ma.fields.String()
10 exit_code = ma.fields.String()
11 pid = ma.fields.String()
12 status = ma.fields.String()
13 agent_reported_time = ma.fields.DateTime(format=BaseObject.TIME_FORMAT, load_default=None)
14
15 @ma.post_load
16 def build_result(self, data, **_):
17 return Result(**data)
18
19 @ma.post_dump()
20 def prepare_dump(self, data, **_):
21 if data.get('agent_reported_time', None) is None:
22 data.pop('agent_reported_time', None)
23 return data
24
25
26class Result(BaseObject):

Callers 1

ResultClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected