Skip to content

Commit 9dcb72a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 442fcd8b of spec repo (#903)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent fca78fa commit 9dcb72a

File tree

25 files changed

+960
-14
lines changed

25 files changed

+960
-14
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-03-30 19:43:53.124064",
8-
"spec_repo_commit": "363a0c66"
7+
"regenerated": "2022-03-30 20:57:03.095638",
8+
"spec_repo_commit": "442fcd8b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-03-30 19:43:53.144448",
13-
"spec_repo_commit": "363a0c66"
12+
"regenerated": "2022-03-30 20:57:03.107080",
13+
"spec_repo_commit": "442fcd8b"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17398,6 +17398,11 @@ paths:
1739817398
- file: dashboard_payload.json
1739917399
name: body
1740017400
step: there is a valid "dashboard" in the system
17401+
screenboard_dashboard:
17402+
parameters:
17403+
- file: screenboard_dashboard_payload.json
17404+
name: body
17405+
step: there is a valid "screenboard_dashboard" in the system
1740117406
x-menu-order: 1
1740217407
x-undo:
1740317408
operationId: DeleteDashboard

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7816,6 +7816,23 @@ paths:
78167816
tags:
78177817
- Dashboard Lists
78187818
x-codegen-request-body-name: body
7819+
x-given:
7820+
dashboard_list_dashboard:
7821+
parameters:
7822+
- name: dashboard_list_id
7823+
source: dashboard_list.id
7824+
- name: body
7825+
value: "{\n \"dashboards\": [\n {\n \"id\": \"{{ dashboard.id
7826+
}}\",\n \"type\": \"custom_timeboard\"\n }\n ]\n}"
7827+
step: the "dashboard_list" has the "dashboard"
7828+
dashboard_list_screenboard_dashboard:
7829+
parameters:
7830+
- name: dashboard_list_id
7831+
source: dashboard_list.id
7832+
- name: body
7833+
value: "{\n \"dashboards\": [\n {\n \"id\": \"{{ screenboard_dashboard.id
7834+
}}\",\n \"type\": \"custom_screenboard\"\n }\n ]\n}"
7835+
step: the "dashboard_list" has the "screenboard_dashboard"
78197836
x-menu-order: 2
78207837
x-undo:
78217838
type: safe
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Add custom timeboard dashboard to an existing dashboard list returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client.v2 import ApiClient, Configuration
7+
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
8+
from datadog_api_client.v2.model.dashboard_list_add_items_request import DashboardListAddItemsRequest
9+
from datadog_api_client.v2.model.dashboard_list_item_request import DashboardListItemRequest
10+
from datadog_api_client.v2.model.dashboard_type import DashboardType
11+
12+
# there is a valid "dashboard_list" in the system
13+
DASHBOARD_LIST_ID = environ["DASHBOARD_LIST_ID"]
14+
15+
# there is a valid "dashboard" in the system
16+
DASHBOARD_ID = environ["DASHBOARD_ID"]
17+
18+
body = DashboardListAddItemsRequest(
19+
dashboards=[DashboardListItemRequest(id=DASHBOARD_ID, type=DashboardType("custom_timeboard"))]
20+
)
21+
22+
configuration = Configuration()
23+
with ApiClient(configuration) as api_client:
24+
api_instance = DashboardListsApi(api_client)
25+
response = api_instance.create_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID), body=body)
26+
27+
print(response)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Add custom screenboard dashboard to an existing dashboard list returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client.v2 import ApiClient, Configuration
7+
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
8+
from datadog_api_client.v2.model.dashboard_list_add_items_request import DashboardListAddItemsRequest
9+
from datadog_api_client.v2.model.dashboard_list_item_request import DashboardListItemRequest
10+
from datadog_api_client.v2.model.dashboard_type import DashboardType
11+
12+
# there is a valid "dashboard_list" in the system
13+
DASHBOARD_LIST_ID = environ["DASHBOARD_LIST_ID"]
14+
15+
# there is a valid "screenboard_dashboard" in the system
16+
SCREENBOARD_DASHBOARD_ID = environ["SCREENBOARD_DASHBOARD_ID"]
17+
18+
body = DashboardListAddItemsRequest(
19+
dashboards=[DashboardListItemRequest(id=SCREENBOARD_DASHBOARD_ID, type=DashboardType("custom_screenboard"))]
20+
)
21+
22+
configuration = Configuration()
23+
with ApiClient(configuration) as api_client:
24+
api_instance = DashboardListsApi(api_client)
25+
response = api_instance.create_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID), body=body)
26+
27+
print(response)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Delete custom timeboard dashboard from an existing dashboard list returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client.v2 import ApiClient, Configuration
7+
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
8+
from datadog_api_client.v2.model.dashboard_list_delete_items_request import DashboardListDeleteItemsRequest
9+
from datadog_api_client.v2.model.dashboard_list_item_request import DashboardListItemRequest
10+
from datadog_api_client.v2.model.dashboard_type import DashboardType
11+
12+
# there is a valid "dashboard_list" in the system
13+
DASHBOARD_LIST_ID = environ["DASHBOARD_LIST_ID"]
14+
15+
# there is a valid "dashboard" in the system
16+
DASHBOARD_ID = environ["DASHBOARD_ID"]
17+
18+
body = DashboardListDeleteItemsRequest(
19+
dashboards=[DashboardListItemRequest(id=DASHBOARD_ID, type=DashboardType("custom_timeboard"))]
20+
)
21+
22+
configuration = Configuration()
23+
with ApiClient(configuration) as api_client:
24+
api_instance = DashboardListsApi(api_client)
25+
response = api_instance.delete_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID), body=body)
26+
27+
print(response)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Delete custom screenboard dashboard from an existing dashboard list returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client.v2 import ApiClient, Configuration
7+
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
8+
from datadog_api_client.v2.model.dashboard_list_delete_items_request import DashboardListDeleteItemsRequest
9+
from datadog_api_client.v2.model.dashboard_list_item_request import DashboardListItemRequest
10+
from datadog_api_client.v2.model.dashboard_type import DashboardType
11+
12+
# there is a valid "dashboard_list" in the system
13+
DASHBOARD_LIST_ID = environ["DASHBOARD_LIST_ID"]
14+
15+
# there is a valid "screenboard_dashboard" in the system
16+
SCREENBOARD_DASHBOARD_ID = environ["SCREENBOARD_DASHBOARD_ID"]
17+
18+
body = DashboardListDeleteItemsRequest(
19+
dashboards=[DashboardListItemRequest(id=SCREENBOARD_DASHBOARD_ID, type=DashboardType("custom_screenboard"))]
20+
)
21+
22+
configuration = Configuration()
23+
with ApiClient(configuration) as api_client:
24+
api_instance = DashboardListsApi(api_client)
25+
response = api_instance.delete_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID), body=body)
26+
27+
print(response)

examples/v2/dashboard-lists/GetDashboardListItems.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
Get items of a Dashboard List returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client.v2 import ApiClient, Configuration
67
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
78

9+
# there is a valid "dashboard_list" in the system
10+
DASHBOARD_LIST_ID = environ["DASHBOARD_LIST_ID"]
11+
812
configuration = Configuration()
913
with ApiClient(configuration) as api_client:
1014
api_instance = DashboardListsApi(api_client)
11-
response = api_instance.get_dashboard_list_items(dashboard_list_id=9223372036854775807)
15+
response = api_instance.get_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID))
1216

1317
print(response)

examples/v2/dashboard-lists/UpdateDashboardListItems.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@
22
Update items of a dashboard list returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client.v2 import ApiClient, Configuration
67
from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi
78
from datadog_api_client.v2.model.dashboard_list_item_request import DashboardListItemRequest
89
from datadog_api_client.v2.model.dashboard_list_update_items_request import DashboardListUpdateItemsRequest
910
from datadog_api_client.v2.model.dashboard_type import DashboardType
1011

12+
# there is a valid "dashboard_list" in the system
13+
DASHBOARD_LIST_ID = environ["DASHBOARD_LIST_ID"]
14+
15+
# there is a valid "screenboard_dashboard" in the system
16+
SCREENBOARD_DASHBOARD_ID = environ["SCREENBOARD_DASHBOARD_ID"]
17+
1118
body = DashboardListUpdateItemsRequest(
12-
dashboards=[DashboardListItemRequest(id="q5j-nti-fv6", type=DashboardType("host_timeboard"))]
19+
dashboards=[DashboardListItemRequest(id=SCREENBOARD_DASHBOARD_ID, type=DashboardType("custom_screenboard"))]
1320
)
1421

1522
configuration = Configuration()
1623
with ApiClient(configuration) as api_client:
1724
api_instance = DashboardListsApi(api_client)
18-
response = api_instance.update_dashboard_list_items(dashboard_list_id=9223372036854775807, body=body)
25+
response = api_instance.update_dashboard_list_items(dashboard_list_id=int(DASHBOARD_LIST_ID), body=body)
1926

2027
print(response)

tests/v1/features/given.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
"tag": "Dashboards",
1212
"operationId": "CreateDashboard"
1313
},
14+
{
15+
"parameters": [
16+
{
17+
"name": "body",
18+
"value": "{\n \"layout_type\": \"free\",\n \"title\": \"{{ unique }} with Profile Metrics Query\",\n \"widgets\": [\n {\n \"layout\": {\n \"height\": 10,\n \"width\": 10,\n \"x\": 10,\n \"y\": 10\n },\n \"definition\": {\n \"type\": \"timeseries\",\n \"requests\": [\n {\n \"profile_metrics_query\": {\n \"compute\": {\n \"aggregation\": \"sum\",\n \"facet\": \"@prof_core_cpu_cores\"\n },\n \"search\": {\n \"query\": \"runtime:jvm\"\n },\n \"group_by\": [\n {\n \"facet\": \"service\",\n \"limit\": 10,\n \"sort\": {\n \"aggregation\": \"sum\",\n \"order\": \"desc\",\n \"facet\": \"@prof_core_cpu_cores\"\n }\n }\n ]\n }\n }\n ]\n }\n }\n ]\n}\n"
19+
}
20+
],
21+
"step": "there is a valid \"screenboard_dashboard\" in the system",
22+
"key": "screenboard_dashboard",
23+
"tag": "Dashboards",
24+
"operationId": "CreateDashboard"
25+
},
1426
{
1527
"parameters": [
1628
{

0 commit comments

Comments
 (0)