Skip to content

Commit b0b5428

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 37b40f1 of spec repo
1 parent b087562 commit b0b5428

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35657,7 +35657,7 @@ components:
3565735657
items:
3565835658
$ref: '#/components/schemas/ObservabilityPipelineConfigDestinationItem'
3565935659
type: array
35660-
processors:
35660+
processor_groups:
3566135661
description: A list of processor groups that transform or enrich log data.
3566235662
example:
3566335663
- enabled: true

examples/v2/observability-pipelines/CreatePipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS,
4242
),
4343
],
44-
processors=[
44+
processor_groups=[
4545
ObservabilityPipelineConfigProcessorGroup(
4646
enabled=True,
4747
id="my-processor-group",

examples/v2/observability-pipelines/UpdatePipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS,
4646
),
4747
],
48-
processors=[
48+
processor_groups=[
4949
ObservabilityPipelineConfigProcessorGroup(
5050
enabled=True,
5151
id="my-processor-group",

examples/v2/observability-pipelines/ValidatePipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS,
4242
),
4343
],
44-
processors=[
44+
processor_groups=[
4545
ObservabilityPipelineConfigProcessorGroup(
4646
enabled=True,
4747
id="my-processor-group",

src/datadog_api_client/v2/model/observability_pipeline_config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ def openapi_types(_):
127127

128128
return {
129129
"destinations": ([ObservabilityPipelineConfigDestinationItem],),
130-
"processors": ([ObservabilityPipelineConfigProcessorGroup],),
130+
"processor_groups": ([ObservabilityPipelineConfigProcessorGroup],),
131131
"sources": ([ObservabilityPipelineConfigSourceItem],),
132132
}
133133

134134
attribute_map = {
135135
"destinations": "destinations",
136-
"processors": "processors",
136+
"processor_groups": "processor_groups",
137137
"sources": "sources",
138138
}
139139

@@ -184,7 +184,7 @@ def __init__(
184184
ObservabilityPipelineSocketSource,
185185
]
186186
],
187-
processors: Union[List[ObservabilityPipelineConfigProcessorGroup], UnsetType] = unset,
187+
processor_groups: Union[List[ObservabilityPipelineConfigProcessorGroup], UnsetType] = unset,
188188
**kwargs,
189189
):
190190
"""
@@ -193,14 +193,14 @@ def __init__(
193193
:param destinations: A list of destination components where processed logs are sent.
194194
:type destinations: [ObservabilityPipelineConfigDestinationItem]
195195
196-
:param processors: A list of processor groups that transform or enrich log data.
197-
:type processors: [ObservabilityPipelineConfigProcessorGroup], optional
196+
:param processor_groups: A list of processor groups that transform or enrich log data.
197+
:type processor_groups: [ObservabilityPipelineConfigProcessorGroup], optional
198198
199199
:param sources: A list of configured data sources for the pipeline.
200200
:type sources: [ObservabilityPipelineConfigSourceItem]
201201
"""
202-
if processors is not unset:
203-
kwargs["processors"] = processors
202+
if processor_groups is not unset:
203+
kwargs["processor_groups"] = processor_groups
204204
super().__init__(kwargs)
205205

206206
self_.destinations = destinations

tests/v2/features/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@
883883
"parameters": [
884884
{
885885
"name": "body",
886-
"value": "{\n \"data\":{\n \"attributes\":{\n \"config\":{\n \"destinations\":[\n {\n \"id\":\"datadog-logs-destination\",\n \"inputs\":[\n \"processor-group-0\"\n ],\n \"type\":\"datadog_logs\"\n }\n ],\n \"processors\":[\n {\n \"id\":\"processor-group-0\",\n \"include\":\"service:my-service\",\n \"display_name\": \"My Processor Group\",\n \"inputs\":[\n \"datadog-agent-source\"\n ],\n \"enabled\": true,\n \"processors\": [\n {\n \"id\": \"filter-processor\",\n \"type\": \"filter\",\n \"include\": \"status:error\",\n \"display_name\": \"My Filter Processor\",\n \"enabled\": true\n }\n ]\n }\n ],\n \"sources\":[\n {\n \"id\":\"datadog-agent-source\",\n \"type\":\"datadog_agent\"\n }\n ]\n },\n \"name\":\"Main Observability Pipeline\"\n },\n \"type\":\"pipelines\"\n }\n}"
886+
"value": "{\n \"data\":{\n \"attributes\":{\n \"config\":{\n \"destinations\":[\n {\n \"id\":\"datadog-logs-destination\",\n \"inputs\":[\n \"processor-group-0\"\n ],\n \"type\":\"datadog_logs\"\n }\n ],\n \"processor_groups\":[\n {\n \"id\":\"processor-group-0\",\n \"include\":\"service:my-service\",\n \"display_name\": \"My Processor Group\",\n \"inputs\":[\n \"datadog-agent-source\"\n ],\n \"enabled\": true,\n \"processors\": [\n {\n \"id\": \"filter-processor\",\n \"type\": \"filter\",\n \"include\": \"status:error\",\n \"display_name\": \"My Filter Processor\",\n \"enabled\": true\n }\n ]\n }\n ],\n \"sources\":[\n {\n \"id\":\"datadog-agent-source\",\n \"type\":\"datadog_agent\"\n }\n ]\n },\n \"name\":\"Main Observability Pipeline\"\n },\n \"type\":\"pipelines\"\n }\n}"
887887
}
888888
],
889889
"step": "there is a valid \"pipeline\" in the system",

tests/v2/features/observability_pipelines.feature

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ Feature: Observability Pipelines
1212
Scenario: Create a new pipeline returns "Bad Request" response
1313
Given operation "CreatePipeline" enabled
1414
And new "CreatePipeline" request
15-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
15+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@generated @skip @team:DataDog/observability-pipelines
2020
Scenario: Create a new pipeline returns "Conflict" response
2121
Given operation "CreatePipeline" enabled
2222
And new "CreatePipeline" request
23-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
23+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
2424
When the request is sent
2525
Then the response status is 409 Conflict
2626

2727
@team:DataDog/observability-pipelines
2828
Scenario: Create a new pipeline returns "OK" response
2929
Given operation "CreatePipeline" enabled
3030
And new "CreatePipeline" request
31-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
31+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
3232
When the request is sent
3333
Then the response status is 201 OK
3434
And the response "data" has field "id"
@@ -106,7 +106,7 @@ Feature: Observability Pipelines
106106
And new "UpdatePipeline" request
107107
And there is a valid "pipeline" in the system
108108
And request contains "pipeline_id" parameter from "pipeline.data.id"
109-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
109+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
110110
When the request is sent
111111
Then the response status is 400 Bad Request
112112

@@ -115,7 +115,7 @@ Feature: Observability Pipelines
115115
Given operation "UpdatePipeline" enabled
116116
And new "UpdatePipeline" request
117117
And request contains "pipeline_id" parameter from "REPLACE.ME"
118-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
118+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
119119
When the request is sent
120120
Then the response status is 409 Conflict
121121

@@ -124,7 +124,7 @@ Feature: Observability Pipelines
124124
Given operation "UpdatePipeline" enabled
125125
And new "UpdatePipeline" request
126126
And request contains "pipeline_id" parameter with value "3fa85f64-5717-4562-b3fc-2c963f66afa6"
127-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
127+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
128128
When the request is sent
129129
Then the response status is 404 Not Found
130130

@@ -134,7 +134,7 @@ Feature: Observability Pipelines
134134
And there is a valid "pipeline" in the system
135135
And new "UpdatePipeline" request
136136
And request contains "pipeline_id" parameter from "pipeline.data.id"
137-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "updated-datadog-logs-destination-id", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Updated Pipeline Name"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
137+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "updated-datadog-logs-destination-id", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Updated Pipeline Name"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
138138
When the request is sent
139139
Then the response status is 200 OK
140140
And the response "data" has field "id"
@@ -149,7 +149,7 @@ Feature: Observability Pipelines
149149
Scenario: Validate an observability pipeline returns "Bad Request" response
150150
Given operation "ValidatePipeline" enabled
151151
And new "ValidatePipeline" request
152-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
152+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
153153
When the request is sent
154154
Then the response status is 400 Bad Request
155155
And the response "errors[0].title" is equal to "Field 'include' is required"
@@ -161,7 +161,7 @@ Feature: Observability Pipelines
161161
Scenario: Validate an observability pipeline returns "OK" response
162162
Given operation "ValidatePipeline" enabled
163163
And new "ValidatePipeline" request
164-
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
164+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
165165
When the request is sent
166166
Then the response status is 200 OK
167167
And the response "errors" has length 0

0 commit comments

Comments
 (0)