mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-19 04:58:09 +00:00
allow extra fields in Events (#805)
This commit is contained in:
@ -84,7 +84,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"BlobRef": {
|
"BlobRef": {
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -588,7 +587,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"container": {
|
"container": {
|
||||||
"title": "Container",
|
"title": "Container",
|
||||||
@ -628,7 +626,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"JobConfig": {
|
"JobConfig": {
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -737,7 +734,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"Error": {
|
"Error": {
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -918,7 +914,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -959,7 +954,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -1000,7 +994,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -1042,7 +1035,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"NodeState": {
|
"NodeState": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -1135,7 +1127,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"Architecture": {
|
"Architecture": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -1243,7 +1234,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"pool_name": {
|
"pool_name": {
|
||||||
"title": "Pool Name",
|
"title": "Pool Name",
|
||||||
@ -1272,7 +1262,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"region": {
|
"region": {
|
||||||
"title": "Region",
|
"title": "Region",
|
||||||
@ -1301,7 +1290,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"region": {
|
"region": {
|
||||||
"title": "Region",
|
"title": "Region",
|
||||||
@ -1336,7 +1324,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"Error": {
|
"Error": {
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1470,7 +1457,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"BlobRef": {
|
"BlobRef": {
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -2047,7 +2033,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"image": {
|
"image": {
|
||||||
"title": "Image",
|
"title": "Image",
|
||||||
@ -2103,7 +2088,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"pool_name": {
|
"pool_name": {
|
||||||
"title": "Pool Name",
|
"title": "Pool Name",
|
||||||
@ -2145,7 +2129,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"Error": {
|
"Error": {
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -2266,7 +2249,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"ContainerType": {
|
"ContainerType": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -2712,7 +2694,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"ContainerType": {
|
"ContainerType": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -3199,7 +3180,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"ContainerType": {
|
"ContainerType": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -3612,7 +3592,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"ContainerType": {
|
"ContainerType": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -4052,7 +4031,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"ContainerType": {
|
"ContainerType": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -4450,7 +4428,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"additionalProperties": false,
|
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"Architecture": {
|
"Architecture": {
|
||||||
"description": "An enumeration.",
|
"description": "An enumeration.",
|
||||||
@ -4607,7 +4584,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"title": "ErrorCode"
|
"title": "ErrorCode"
|
||||||
},
|
},
|
||||||
"EventCrashReported": {
|
"EventCrashReported": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"container": {
|
"container": {
|
||||||
"title": "Container",
|
"title": "Container",
|
||||||
@ -4633,7 +4609,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventFileAdded": {
|
"EventFileAdded": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"container": {
|
"container": {
|
||||||
"title": "Container",
|
"title": "Container",
|
||||||
@ -4652,7 +4627,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventJobCreated": {
|
"EventJobCreated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/JobConfig"
|
"$ref": "#/definitions/JobConfig"
|
||||||
@ -4674,7 +4648,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventJobStopped": {
|
"EventJobStopped": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/JobConfig"
|
"$ref": "#/definitions/JobConfig"
|
||||||
@ -4703,7 +4676,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventNodeCreated": {
|
"EventNodeCreated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -4728,7 +4700,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventNodeDeleted": {
|
"EventNodeDeleted": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -4753,7 +4724,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventNodeHeartbeat": {
|
"EventNodeHeartbeat": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -4778,7 +4748,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventNodeStateUpdated": {
|
"EventNodeStateUpdated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"machine_id": {
|
"machine_id": {
|
||||||
"format": "uuid",
|
"format": "uuid",
|
||||||
@ -4821,7 +4790,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventPoolCreated": {
|
"EventPoolCreated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"arch": {
|
"arch": {
|
||||||
"$ref": "#/definitions/Architecture"
|
"$ref": "#/definitions/Architecture"
|
||||||
@ -4851,7 +4819,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventPoolDeleted": {
|
"EventPoolDeleted": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"pool_name": {
|
"pool_name": {
|
||||||
"title": "Pool Name",
|
"title": "Pool Name",
|
||||||
@ -4865,7 +4832,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventProxyCreated": {
|
"EventProxyCreated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"region": {
|
"region": {
|
||||||
"title": "Region",
|
"title": "Region",
|
||||||
@ -4879,7 +4845,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventProxyDeleted": {
|
"EventProxyDeleted": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"region": {
|
"region": {
|
||||||
"title": "Region",
|
"title": "Region",
|
||||||
@ -4893,7 +4858,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventProxyFailed": {
|
"EventProxyFailed": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"error": {
|
"error": {
|
||||||
"$ref": "#/definitions/Error"
|
"$ref": "#/definitions/Error"
|
||||||
@ -4911,7 +4875,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventRegressionReported": {
|
"EventRegressionReported": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"container": {
|
"container": {
|
||||||
"title": "Container",
|
"title": "Container",
|
||||||
@ -4937,7 +4900,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventScalesetCreated": {
|
"EventScalesetCreated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"image": {
|
"image": {
|
||||||
"title": "Image",
|
"title": "Image",
|
||||||
@ -4977,7 +4939,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventScalesetDeleted": {
|
"EventScalesetDeleted": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"pool_name": {
|
"pool_name": {
|
||||||
"title": "Pool Name",
|
"title": "Pool Name",
|
||||||
@ -4997,7 +4958,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventScalesetFailed": {
|
"EventScalesetFailed": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"error": {
|
"error": {
|
||||||
"$ref": "#/definitions/Error"
|
"$ref": "#/definitions/Error"
|
||||||
@ -5021,7 +4981,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventTaskCreated": {
|
"EventTaskCreated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/TaskConfig"
|
"$ref": "#/definitions/TaskConfig"
|
||||||
@ -5049,7 +5008,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventTaskFailed": {
|
"EventTaskFailed": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/TaskConfig"
|
"$ref": "#/definitions/TaskConfig"
|
||||||
@ -5081,7 +5039,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventTaskHeartbeat": {
|
"EventTaskHeartbeat": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/TaskConfig"
|
"$ref": "#/definitions/TaskConfig"
|
||||||
@ -5106,7 +5063,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventTaskStateUpdated": {
|
"EventTaskStateUpdated": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/TaskConfig"
|
"$ref": "#/definitions/TaskConfig"
|
||||||
@ -5140,7 +5096,6 @@ Each event will be submitted via HTTP POST to the user provided URL.
|
|||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"EventTaskStopped": {
|
"EventTaskStopped": {
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"config": {
|
"config": {
|
||||||
"$ref": "#/definitions/TaskConfig"
|
"$ref": "#/definitions/TaskConfig"
|
||||||
|
@ -8,7 +8,7 @@ from enum import Enum
|
|||||||
from typing import List, Optional, Union
|
from typing import List, Optional, Union
|
||||||
from uuid import UUID, uuid4
|
from uuid import UUID, uuid4
|
||||||
|
|
||||||
from pydantic import BaseModel, Extra, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from .enums import OS, Architecture, NodeState, TaskState, TaskType
|
from .enums import OS, Architecture, NodeState, TaskState, TaskType
|
||||||
from .models import (
|
from .models import (
|
||||||
@ -25,8 +25,7 @@ from .responses import BaseResponse
|
|||||||
|
|
||||||
|
|
||||||
class BaseEvent(BaseModel):
|
class BaseEvent(BaseModel):
|
||||||
class Config:
|
pass
|
||||||
extra = Extra.forbid
|
|
||||||
|
|
||||||
|
|
||||||
class EventTaskStopped(BaseEvent):
|
class EventTaskStopped(BaseEvent):
|
||||||
|
Reference in New Issue
Block a user