(cls, model, mask_secrets=False)
| 147 | |
| 148 | @classmethod |
| 149 | def from_model(cls, model, mask_secrets=False): |
| 150 | instance = cls._from_model(model, mask_secrets=mask_secrets) |
| 151 | instance["start_timestamp"] = isotime.format( |
| 152 | model.start_timestamp, offset=False |
| 153 | ) |
| 154 | if model.action_executions: |
| 155 | instance["action_executions"] = [ |
| 156 | cls.from_component_model(action_execution) |
| 157 | for action_execution in model.action_executions |
| 158 | ] |
| 159 | if model.rules: |
| 160 | instance["rules"] = [cls.from_component_model(rule) for rule in model.rules] |
| 161 | if model.trigger_instances: |
| 162 | instance["trigger_instances"] = [ |
| 163 | cls.from_component_model(trigger_instance) |
| 164 | for trigger_instance in model.trigger_instances |
| 165 | ] |
| 166 | return cls(**instance) |
| 167 | |
| 168 | |
| 169 | class TraceContext(object): |
nothing calls this directly
no test coverage detected