Skip to content

Commit 47886a7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 16aa0e9 of spec repo (#447)
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 2620ca0 commit 47886a7

File tree

13 files changed

+452
-4
lines changed

13 files changed

+452
-4
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.5.1.dev2",
7-
"regenerated": "2022-01-10 14:23:32.138128",
8-
"spec_repo_commit": "d9089b2"
7+
"regenerated": "2022-01-10 18:21:11.009424",
8+
"spec_repo_commit": "16aa0e9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-10 14:23:32.160386",
13-
"spec_repo_commit": "d9089b2"
12+
"regenerated": "2022-01-10 18:21:11.034033",
13+
"spec_repo_commit": "16aa0e9"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,18 @@ components:
360360
- ADMIN
361361
- READ_ONLY
362362
- ERROR
363+
AgentCheck:
364+
description: Array of strings.
365+
example:
366+
- ntp
367+
- ntp
368+
- ntp:d884b5186b651429
369+
- OK
370+
- ''
371+
- ''
372+
items:
373+
description: Agent check running on the host.
374+
type: array
363375
AlertGraphWidgetDefinition:
364376
description: Alert graphs are timeseries graphs showing the current status of
365377
any monitor defined on your system.
@@ -3124,13 +3136,94 @@ components:
31243136
meta:
31253137
description: Metadata associated with your host.
31263138
properties:
3139+
agent_checks:
3140+
description: A list of Agent checks running on the host.
3141+
items:
3142+
$ref: '#/components/schemas/AgentCheck'
3143+
type: array
3144+
agent_version:
3145+
description: The Datadog Agent version.
3146+
example: 7.32.3
3147+
type: string
3148+
cpuCores:
3149+
description: The number of cores.
3150+
example: 1
3151+
format: int64
3152+
type: integer
3153+
fbsdV:
3154+
description: An array of Mac versions.
3155+
items:
3156+
description: The version name.
3157+
example: FreeBSD
3158+
type: string
3159+
type: array
3160+
gohai:
3161+
description: JSON string containing system information.
3162+
example: '{"cpu":{"cache_size":"8192 KB","cpu_cores":"1","cpu_logical_processors":"1","family":"6","mhz":"2712.000","model":"142","model_name":"Intel(R)
3163+
Core(TM) i7-8559U CPU @ 2.70GHz","stepping":"10","vendor_id":"GenuineIntel"},"filesystem":[{"kb_size":"3966896","mounted_on":"/dev","name":"udev"},{"kb_size":"797396","mounted_on":"/run","name":"tmpfs"},{"kb_size":"64800356","mounted_on":"/","name":"/dev/mapper/vagrant--vg-root"},{"kb_size":"3986972","mounted_on":"/dev/shm","name":"tmpfs"},{"kb_size":"5120","mounted_on":"/run/lock","name":"tmpfs"},{"kb_size":"3986972","mounted_on":"/sys/fs/cgroup","name":"tmpfs"},{"kb_size":"488245288","mounted_on":"/vagrant","name":"vagrant"},{"kb_size":"797392","mounted_on":"/run/user/1000","name":"tmpfs"}],"memory":{"swap_total":"1003516kB","total":"7973944kB"},"network":{"interfaces":[{"ipv4":"10.0.2.15","ipv4-network":"10.0.2.0/24","ipv6":"fe80::a00:27ff:fec2:be11","ipv6-network":"fe80::/64","macaddress":"08:00:27:c2:be:11","name":"eth0"},{"ipv4":"192.168.122.1","ipv4-network":"192.168.122.0/24","macaddress":"52:54:00:6f:1c:bf","name":"virbr0"}],"ipaddress":"10.0.2.15","ipaddressv6":"fe80::a00:27ff:fec2:be11","macaddress":"08:00:27:c2:be:11"},"platform":{"GOOARCH":"amd64","GOOS":"linux","goV":"1.16.7","hardware_platform":"x86_64","hostname":"vagrant","kernel_name":"Linux","kernel_release":"4.15.0-29-generic","kernel_version":"#31-Ubuntu
3164+
SMP Tue Jul 17 15:39:52 UTC 2018","machine":"x86_64","os":"GNU/Linux","processor":"x86_64","pythonV":"2.7.15rc1"}}'
3165+
type: string
3166+
install_method:
3167+
description: Agent install method.
3168+
properties:
3169+
installer_version:
3170+
description: The installer version.
3171+
example: install_script-1.7.1
3172+
type: string
3173+
tool:
3174+
description: Tool used to install the agent.
3175+
example: install_script
3176+
type: string
3177+
tool_version:
3178+
description: The tool version.
3179+
example: install_script
3180+
type: string
3181+
type: object
3182+
macV:
3183+
description: An array of Mac versions.
3184+
items:
3185+
description: Version name.
3186+
example: Mac
3187+
type: string
3188+
type: array
3189+
machine:
3190+
description: The machine architecture.
3191+
example: amd64
3192+
type: string
31273193
nixV:
31283194
description: Array of Unix versions.
31293195
items:
31303196
description: Version name.
31313197
example: Ubuntu
31323198
type: string
31333199
type: array
3200+
platform:
3201+
description: The OS platform.
3202+
example: linux
3203+
type: string
3204+
processor:
3205+
description: The processor.
3206+
example: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
3207+
type: string
3208+
pythonV:
3209+
description: The Python version.
3210+
example: 3.8.11
3211+
type: string
3212+
socket-fqdn:
3213+
description: The socket fqdn.
3214+
example: vagrant.vm.
3215+
type: string
3216+
socket-hostname:
3217+
description: The socket hostname.
3218+
example: vagrant
3219+
type: string
3220+
winV:
3221+
description: An array of Windows versions.
3222+
items:
3223+
description: Version name.
3224+
example: Windows
3225+
type: string
3226+
type: array
31343227
type: object
31353228
metrics:
31363229
description: Host Metrics collected.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2021-12-23T19:59:00.751Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"log": {
3+
"_recordingName": "Hosts/Get all hosts with metadata deserializes successfully",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "5.1.1"
8+
},
9+
"entries": [
10+
{
11+
"_id": "3a41037868e8c1cd1403ef7956f820ac",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 393,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "include_hosts_metadata",
30+
"value": "true"
31+
}
32+
],
33+
"url": "https://api.datadoghq.com/api/v1/hosts?include_hosts_metadata=true"
34+
},
35+
"response": {
36+
"bodySize": 3089,
37+
"content": {
38+
"mimeType": "application/json",
39+
"size": 3089,
40+
"text": "{\"exact_total_matching\":true,\"total_returned\":1,\"host_list\":[{\"last_reported_time\":1640288946,\"name\":\"vagrant\",\"is_muted\":false,\"mute_timeout\":null,\"apps\":[\"ntp\",\"agent\"],\"tags_by_source\":{\"Datadog\":[\"host:vagrant\"]},\"up\":true,\"metrics\":{\"load\":0.031666666,\"iowait\":0.0434962,\"cpu\":0.6632819},\"sources\":[\"agent\"],\"meta\":{\"socket-hostname\":\"vagrant\",\"nixV\":[\"ubuntu\",\"18.04\",\"\"],\"pythonV\":\"3.8.11\",\"macV\":[\"\",\"\",\"\"],\"cpuCores\":1,\"agent_flavor\":\"agent\",\"platform\":\"linux\",\"timezones\":[\"UTC\"],\"winV\":[\"\",\"\",\"\"],\"machine\":\"amd64\",\"install_method\":{\"tool\":\"install_script\",\"installer_version\":\"install_script-1.7.1\",\"tool_version\":\"install_script\"},\"fbsdV\":[\"\",\"\",\"\"],\"gohai\":\"{\\\"cpu\\\":{\\\"cache_size\\\":\\\"8192 KB\\\",\\\"cpu_cores\\\":\\\"1\\\",\\\"cpu_logical_processors\\\":\\\"1\\\",\\\"family\\\":\\\"6\\\",\\\"mhz\\\":\\\"2711.998\\\",\\\"model\\\":\\\"142\\\",\\\"model_name\\\":\\\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\\\",\\\"stepping\\\":\\\"10\\\",\\\"vendor_id\\\":\\\"GenuineIntel\\\"},\\\"filesystem\\\":[{\\\"kb_size\\\":\\\"3966892\\\",\\\"mounted_on\\\":\\\"/dev\\\",\\\"name\\\":\\\"udev\\\"},{\\\"kb_size\\\":\\\"797396\\\",\\\"mounted_on\\\":\\\"/run\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"64800356\\\",\\\"mounted_on\\\":\\\"/\\\",\\\"name\\\":\\\"/dev/mapper/vagrant--vg-root\\\"},{\\\"kb_size\\\":\\\"3986968\\\",\\\"mounted_on\\\":\\\"/dev/shm\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"5120\\\",\\\"mounted_on\\\":\\\"/run/lock\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"3986968\\\",\\\"mounted_on\\\":\\\"/sys/fs/cgroup\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"488245288\\\",\\\"mounted_on\\\":\\\"/vagrant\\\",\\\"name\\\":\\\"/vagrant\\\"},{\\\"kb_size\\\":\\\"797392\\\",\\\"mounted_on\\\":\\\"/run/user/1000\\\",\\\"name\\\":\\\"tmpfs\\\"}],\\\"memory\\\":{\\\"swap_total\\\":\\\"1003516kB\\\",\\\"total\\\":\\\"7973940kB\\\"},\\\"network\\\":{\\\"interfaces\\\":[{\\\"ipv4\\\":\\\"10.0.2.15\\\",\\\"ipv4-network\\\":\\\"10.0.2.0/24\\\",\\\"ipv6\\\":\\\"fe80::a00:27ff:fec2:be11\\\",\\\"ipv6-network\\\":\\\"fe80::/64\\\",\\\"macaddress\\\":\\\"08:00:27:c2:be:11\\\",\\\"name\\\":\\\"eth0\\\"},{\\\"ipv4\\\":\\\"192.168.122.1\\\",\\\"ipv4-network\\\":\\\"192.168.122.0/24\\\",\\\"macaddress\\\":\\\"52:54:00:6f:1c:bf\\\",\\\"name\\\":\\\"virbr0\\\"}],\\\"ipaddress\\\":\\\"10.0.2.15\\\",\\\"ipaddressv6\\\":\\\"fe80::a00:27ff:fec2:be11\\\",\\\"macaddress\\\":\\\"08:00:27:c2:be:11\\\"},\\\"platform\\\":{\\\"GOOARCH\\\":\\\"amd64\\\",\\\"GOOS\\\":\\\"linux\\\",\\\"goV\\\":\\\"1.16.7\\\",\\\"hardware_platform\\\":\\\"x86_64\\\",\\\"hostname\\\":\\\"vagrant\\\",\\\"kernel_name\\\":\\\"Linux\\\",\\\"kernel_release\\\":\\\"4.15.0-29-generic\\\",\\\"kernel_version\\\":\\\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\\\",\\\"machine\\\":\\\"x86_64\\\",\\\"os\\\":\\\"GNU/Linux\\\",\\\"processor\\\":\\\"x86_64\\\",\\\"pythonV\\\":\\\"2.7.15rc1\\\"}}\",\"network\":null,\"logs_agent\":{\"transport\":\"\"},\"host_id\":1036078308,\"agent_version\":\"7.32.3\",\"processor\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"socket-fqdn\":\"vagrant.vm.\",\"agent_checks\":[[\"ntp\",\"ntp\",\"ntp:d884b5186b651429\",\"OK\",\"\",\"\"]]},\"host_name\":\"vagrant\",\"id\":1036078308,\"aliases\":[\"vagrant\"]}],\"total_matching\":1}"
41+
},
42+
"cookies": [],
43+
"headers": [
44+
{
45+
"name": "content-type",
46+
"value": "application/json"
47+
}
48+
],
49+
"headersSize": 384,
50+
"httpVersion": "HTTP/1.1",
51+
"redirectURL": "",
52+
"status": 200,
53+
"statusText": "OK"
54+
},
55+
"startedDateTime": "2021-12-23T19:59:00.780Z",
56+
"time": 250
57+
}
58+
],
59+
"pages": [],
60+
"version": "1.2"
61+
}
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2021-12-28T15:40:34.083Z"

cassettes/v1/Hosts_3483037620/Get-all-hosts-with-metadata-for-your-organization-returns-OK-response_2722143993/recording.har

Lines changed: 62 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get all hosts with metadata for your organization returns "OK" response
3+
*/
4+
5+
import { v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = v1.createConfiguration();
8+
const apiInstance = new v1.HostsApi(configuration);
9+
10+
let params: v1.HostsApiListHostsRequest = {
11+
includeHostsMetadata: true,
12+
};
13+
14+
apiInstance
15+
.listHosts(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get all hosts with metadata deserializes successfully
3+
*/
4+
5+
import { v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = v1.createConfiguration();
8+
const apiInstance = new v1.HostsApi(configuration);
9+
10+
let params: v1.HostsApiListHostsRequest = {
11+
includeHostsMetadata: true,
12+
};
13+
14+
apiInstance
15+
.listHosts(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

features/v1/hosts.feature

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@ Feature: Hosts
2020
When the request is sent
2121
Then the response status is 200 OK
2222

23+
@replay-only @team:DataDog/core-index
24+
Scenario: Get all hosts with metadata deserializes successfully
25+
Given new "ListHosts" request
26+
And request contains "include_hosts_metadata" parameter with value true
27+
When the request is sent
28+
Then the response status is 200 OK
29+
And the response "total_returned" is equal to 1
30+
And the response "host_list[0].meta.platform" is equal to "linux"
31+
And the response "host_list[0].meta.nixV" is equal to ["ubuntu","18.04",""]
32+
And the response "host_list[0].meta.install_method.tool" is equal to "install_script"
33+
And the response "host_list[0].meta.agent_checks[0]" is equal to ["ntp","ntp","ntp:d884b5186b651429","OK","",""]
34+
And the response "host_list[0].meta.gohai" is equal to "{\"cpu\":{\"cache_size\":\"8192 KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2711.998\",\"model\":\"142\",\"model_name\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"stepping\":\"10\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"3966892\",\"mounted_on\":\"/dev\",\"name\":\"udev\"},{\"kb_size\":\"797396\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"64800356\",\"mounted_on\":\"/\",\"name\":\"/dev/mapper/vagrant--vg-root\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"5120\",\"mounted_on\":\"/run/lock\",\"name\":\"tmpfs\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/sys/fs/cgroup\",\"name\":\"tmpfs\"},{\"kb_size\":\"488245288\",\"mounted_on\":\"/vagrant\",\"name\":\"/vagrant\"},{\"kb_size\":\"797392\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"1003516kB\",\"total\":\"7973940kB\"},\"network\":{\"interfaces\":[{\"ipv4\":\"10.0.2.15\",\"ipv4-network\":\"10.0.2.0/24\",\"ipv6\":\"fe80::a00:27ff:fec2:be11\",\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"08:00:27:c2:be:11\",\"name\":\"eth0\"},{\"ipv4\":\"192.168.122.1\",\"ipv4-network\":\"192.168.122.0/24\",\"macaddress\":\"52:54:00:6f:1c:bf\",\"name\":\"virbr0\"}],\"ipaddress\":\"10.0.2.15\",\"ipaddressv6\":\"fe80::a00:27ff:fec2:be11\",\"macaddress\":\"08:00:27:c2:be:11\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.16.7\",\"hardware_platform\":\"x86_64\",\"hostname\":\"vagrant\",\"kernel_name\":\"Linux\",\"kernel_release\":\"4.15.0-29-generic\",\"kernel_version\":\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\",\"pythonV\":\"2.7.15rc1\"}}"
35+
36+
@team:DataDog/core-index
37+
Scenario: Get all hosts with metadata for your organization returns "OK" response
38+
Given new "ListHosts" request
39+
And request contains "include_hosts_metadata" parameter with value true
40+
When the request is sent
41+
Then the response status is 200 OK
42+
2343
@generated @skip @team:DataDog/core-index
2444
Scenario: Get the total number of active hosts returns "Invalid Parameter Error" response
2545
Given new "GetHostTotals" request

packages/datadog-api-client-v1/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ models/HostMapWidgetDefinitionRequests.ts
201201
models/HostMapWidgetDefinitionStyle.ts
202202
models/HostMapWidgetDefinitionType.ts
203203
models/HostMeta.ts
204+
models/HostMetaInstallMethod.ts
204205
models/HostMetrics.ts
205206
models/HostMuteResponse.ts
206207
models/HostMuteSettings.ts

0 commit comments

Comments
 (0)