Skip to content

Commit

Permalink
updated cassettes generated with the right key. The IS sandbox had in…
Browse files Browse the repository at this point in the history
…consistently tagged hosts.
  • Loading branch information
dongothing-dd committed Jan 14, 2025
1 parent 4443dc6 commit bb09437
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
26 changes: 10 additions & 16 deletions tests/integration/api/cassettes/TestDatadog.test_hosts_get_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,25 @@ interactions:
Connection:
- keep-alive
User-Agent:
- datadogpy/0.50.3-dev (python 3.12.3; os linux; arch aarch64)
- datadogpy/0.50.3-dev (python 3.8.20; os linux; arch aarch64)
method: GET
uri: https://api.datadoghq.com/api/v1/hosts?count=100&filter=env%3Adev&from_=0&include_hosts_metadata=True&include_muted_hosts_data=True&sort_field=host_name&sort_order=asc&start=0
uri: https://api.datadoghq.com/api/v1/hosts?count=100&filter=env%3Adev&from_=0&include_hosts_metadata=False&include_muted_hosts_data=True&sort_field=host_name&sort_order=asc&start=0
response:
body:
string: '{"host_list":[{"id":27481196051,"tags_by_source":{"Datadog":["env:dev","host:ip-172-31-14-202.us-west-1.compute.internal"]},"aliases":["i-0b6c56389c4206eac","ip-172-31-14-202.us-west-1.compute.internal"],"apps":["ntp","agent"],"sources":["agent"],"name":"ip-172-31-14-202.us-west-1.compute.internal","host_name":"ip-172-31-14-202.us-west-1.compute.internal","aws_id":"i-0b6c56389c4206eac","up":true,"last_reported_time":1734636980,"is_muted":false,"mute_timeout":null,"meta":{"gohai":"{\"cpu\":{\"cache_size\":\"46080
KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2299.998\",\"model\":\"79\",\"model_name\":\"Intel(R)
Xeon(R) CPU E5-2686 v4 @ 2.30GHz\",\"stepping\":\"1\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"907364\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"362948\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"30136300\",\"mounted_on\":\"/\",\"name\":\"/dev/xvda4\"},{\"kb_size\":\"983040\",\"mounted_on\":\"/boot\",\"name\":\"/dev/xvda3\"},{\"kb_size\":\"204580\",\"mounted_on\":\"/efi\",\"name\":\"/dev/xvda2\"},{\"kb_size\":\"181472\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"0kB\",\"total\":\"1858281472\"},\"network\":{\"interfaces\":[{\"ipv4\":[\"172.31.14.202\"],\"ipv4-network\":\"172.31.0.0/20\",\"ipv6\":[\"fe80::4ce:eaff:fee4:d439\"],\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"06:ce:ea:e4:d4:39\",\"name\":\"eth0\"},{\"ipv4\":[\"172.17.0.1\"],\"ipv4-network\":\"172.17.0.0/16\",\"ipv6\":[\"fe80::42:e7ff:fe6e:8e5b\"],\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"02:42:e7:6e:8e:5b\",\"name\":\"docker0\"},{\"ipv4\":[\"172.18.0.1\"],\"ipv4-network\":\"172.18.0.0/16\",\"ipv6\":[\"fe80::42:32ff:fe0a:575c\"],\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"02:42:32:0a:57:5c\",\"name\":\"br-6cee6f1db3c3\"},{\"ipv4\":[],\"ipv6\":[\"fe80::3469:aff:fe8e:2f37\"],\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"36:69:0a:8e:2f:37\",\"name\":\"veth522c76c\"}],\"ipaddress\":\"172.31.14.202\",\"ipaddressv6\":\"fe80::4ce:eaff:fee4:d439\",\"macaddress\":\"06:ce:ea:e4:d4:39\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.22.8\",\"hardware_platform\":\"x86_64\",\"hostname\":\"ip-172-31-14-202.us-west-1.compute.internal\",\"kernel_name\":\"Linux\",\"kernel_release\":\"5.14.0-427.20.1.el9_4.x86_64\",\"kernel_version\":\"#1
SMP PREEMPT_DYNAMIC Thu May 23 16:37:13 EDT 2024\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\"}}","socket-fqdn":"ip-172-31-14-202.us-west-1.compute.internal.","machine":"amd64","agent_flavor":"agent","install_method":{"installer_version":"install_script-1.36.0","tool":"install_script","tool_version":"install_script_agent7"},"platform":"linux","processor":"Intel(R)
Xeon(R) CPU E5-2686 v4 @ 2.30GHz","pythonV":"3.12.6","nixV":["redhat","9.5",""],"network":{"network-id":"vpc-946eb0f0"},"cpuCores":1,"socket-hostname":"ip-172-31-14-202.us-west-1.compute.internal","timezones":["UTC"],"fbsdV":["","",""],"agent_checks":[["container_lifecycle","container_lifecycle","container_lifecycle","OK","",""],["ntp","ntp","ntp:3c427a42a70bbf8","OK","",""],["telemetry","telemetry","telemetry","OK","",""],["memory","memory","memory","OK","",""],["network","network","network:4b0649b7e11f0772","OK","",""],["load","load","load","OK","",""],["io","io","io","OK","",""],["disk","disk","disk:67cc0574430a16ba","OK","",""],["cpu","cpu","cpu","OK","",""],["container_image","container_image","container_image","OK","",""],["service_discovery","service_discovery","service_discovery","OK","",""],["uptime","uptime","uptime","OK","",""],["file_handle","file_handle","file_handle","OK","",""]],"winV":["","",""],"agent_version":"7.59.0","logs_agent":{"auto_multi_line_detection_enabled":false,"transport":""},"macV":["","",""],"host_id":27481196051},"metrics":{"cpu":2.034643,"iowait":0.0073472015,"load":0.0025555554}},{"id":23185512164,"tags_by_source":{"Datadog":["app:database","env:dev","fourthtag:something","managedby:manual","manual_tag:first","other_tag:second","owner:dongothing","region:mountain","team:integration-services","thirdtag:abc_123_thing","host:gothing-windows-aws"]},"aliases":["i-0e22acf18a4892f62","gothing-windows-aws"],"apps":["agent","ntp"],"sources":["agent"],"name":"gothing-windows-aws","host_name":"gothing-windows-aws","aws_id":"i-0e22acf18a4892f62","up":true,"last_reported_time":1734636768,"is_muted":false,"mute_timeout":null,"meta":{"gohai":"{\"cpu\":{\"cache_size_l1\":\"32768\",\"cache_size_l2\":\"262144\",\"cache_size_l3\":\"47185920\",\"cpu_cores\":\"2\",\"cpu_logical_processors\":\"2\",\"cpu_numa_nodes\":\"1\",\"cpu_pkgs\":\"1\",\"family\":\"6\",\"mhz\":\"2300\",\"model\":\"79\",\"model_name\":\"Intel(R)
Xeon(R) CPU E5-2686 v4 @ 2.30GHz\",\"stepping\":\"1\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"104855548\",\"mounted_on\":\"C:\\\\\",\"name\":\"\\\\\\\\?\\\\Volume{6d1c1d2f-0000-0000-0000-100000000000}\\\\\"}],\"memory\":{\"total\":\"8589524992\"},\"network\":{\"interfaces\":[{\"ipv4\":[\"172.31.13.116\"],\"ipv4-network\":\"172.31.0.0/20\",\"ipv6\":[\"fe80::200f:2cab:b405:ff46\"],\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"06:52:fc:91:a7:8b\",\"name\":\"Ethernet
2\"}],\"ipaddress\":\"172.31.13.116\",\"ipaddressv6\":\"fe80::200f:2cab:b405:ff46\",\"macaddress\":\"06:52:fc:91:a7:8b\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"windows\",\"family\":\"Standalone
Workstation\",\"goV\":\"1.22.7\",\"hostname\":\"EC2AMAZ-PO2N6RI\",\"kernel_name\":\"Windows\",\"kernel_release\":\"10.0.20348\",\"machine\":\"x86_64\",\"os\":\"Windows
Server 2022 Datacenter\"}}","agent_version":"7.57.2","winV":["Windows Server
2022 Datacenter","10.0 Build 20348"],"network":null,"macV":["",""],"pythonV":"3.11.8","install_method":{"installer_version":"7.57.2","tool":"windows_msi_gui","tool_version":"windows_msi_next_gen_1.0.0.0"},"logs_agent":{"auto_multi_line_detection_enabled":false,"transport":"HTTP"},"socket-fqdn":"EC2AMAZ-PO2N6RI.us-west-1.compute.internal.","agent_checks":[["agentcrashdetect","agentcrashdetect","agentcrashdetect","OK","",""],["uptime","uptime","uptime","OK","",""],["ntp","ntp","ntp:3c427a42a70bbf8","OK","",""],["memory","memory","memory","OK","",""],["file_handle","file_handle","file_handle","OK","",""],["cpu","cpu","cpu","OK","",""],["container_image","container_image","container_image","OK","",""],["telemetry","telemetry","telemetry","OK","",""],["network","network","network:4b0649b7e11f0772","OK","",""],["io","io","io","OK","",""],["disk","disk","disk:67cc0574430a16ba","OK","",""],["container_lifecycle","container_lifecycle","container_lifecycle","OK","",""],["winproc","winproc","winproc","OK","",""]],"agent_flavor":"agent","nixV":["",""],"processor":"Intel(R)
Xeon(R) CPU E5-2686 v4 @ 2.30GHz","platform":"windows","fbsdV":["",""],"socket-hostname":"EC2AMAZ-PO2N6RI","cpuCores":2,"timezones":["UTC"],"machine":"amd64","host_id":23185512164},"metrics":{"cpu":1.3142827,"iowait":0,"load":null}}],"total_returned":2,"total_matching":2,"exact_total_matching":true}
'
string: !!binary |
H4sIAAAAAAAEA5xSy27EIAy89zM4J1Eg2bzO/YtqhbyEbpEIoGB2W0X595qs1EOlHracYGyPPWM2
9uEjSmsisultY2Zmk+jbgfOxq0+8YAjXKC9fMvq0Ks2mjb0CwuyvlM60u02zvrHiYJlMKHkvyoaX
vC1FLaoUy7uOWPJK+SUk1JVxqFcHlp33goE1EHXMTKasL506dc0wqlbUnQZFrE8REl8IB5nDQMVw
1Q7ZuWCP0Y/ID+ZgITFPNXiIlP+qhHuU2do/dKbAJlyTLpgF2saqg19RzxJNnpL3TTcMXTeO5EiU
C/lIVO9gIxXk15HnE23QJWsJ0wi0KXKYbqtRJH1jKiSiqvqh5Q3t1fg7GKqoq7oWQtR92wzU3gNR
Z6w5Hafdd3IQPYKlsTCtLvfO/+KAFkD1YRx9BoL0JyiUvwNZ1/7yDQAA//8DAFrb9LBoAgAA
headers:
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Thu, 19 Dec 2024 20:07:45 GMT
- Tue, 14 Jan 2025 20:39:44 GMT
Transfer-Encoding:
- chunked
content-encoding:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ def test_hosts_get_all(self, dog):
"count": 100,
"from_": 0,
"include_muted_hosts_data": True,
"include_hosts_metadata": True
"include_hosts_metadata": False
}

all_hosts = dog.Hosts.get_all(**params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,27 @@ interactions:
Connection:
- keep-alive
User-Agent:
- datadogpy/0.50.3-dev (python 3.12.3; os linux; arch aarch64)
- datadogpy/0.50.3-dev (python 3.8.20; os linux; arch aarch64)
method: GET
uri: https://api.datadoghq.com/api/v1/hosts?count=100&filter=env&from_=0&include_hosts_metadata=False&sort_dir=asc&sort_field=host_name&start=0
response:
body:
string: '{"host_list":[{"id":23185512164,"tags_by_source":{"Datadog":["app:database","env:dev","fourthtag:something","managedby:manual","manual_tag:first","other_tag:second","owner:dongothing","region:mountain","team:integration-services","thirdtag:abc_123_thing","host:gothing-windows-aws"]},"aliases":["i-0e22acf18a4892f62","gothing-windows-aws"],"apps":["ntp","agent"],"sources":["agent"],"name":"gothing-windows-aws","host_name":"gothing-windows-aws","aws_id":"i-0e22acf18a4892f62","up":true,"last_reported_time":1734638540,"is_muted":false,"mute_timeout":null,"meta":{},"metrics":{"cpu":1.3145235,"iowait":0,"load":null}},{"id":27639881247,"tags_by_source":{"Datadog":["env:something","host:EC2AMAZ-MO5317L"]},"aliases":["i-081339270eeb1cc57","EC2AMAZ-MO5317L"],"apps":["ntp","agent"],"sources":["agent"],"name":"EC2AMAZ-MO5317L","host_name":"EC2AMAZ-MO5317L","aws_id":"i-081339270eeb1cc57","up":true,"last_reported_time":1734638543,"is_muted":false,"mute_timeout":null,"meta":{},"metrics":{"cpu":1.4423724,"iowait":0,"load":null}},{"id":27481196051,"tags_by_source":{"Datadog":["env:dev","host:ip-172-31-14-202.us-west-1.compute.internal"]},"aliases":["i-0b6c56389c4206eac","ip-172-31-14-202.us-west-1.compute.internal"],"apps":["agent","ntp"],"sources":["agent"],"name":"ip-172-31-14-202.us-west-1.compute.internal","host_name":"ip-172-31-14-202.us-west-1.compute.internal","aws_id":"i-0b6c56389c4206eac","up":true,"last_reported_time":1734638269,"is_muted":false,"mute_timeout":null,"meta":{},"metrics":{"cpu":2.039951,"iowait":0.005161117,"load":0.0024444445}}],"total_returned":3,"total_matching":3,"exact_total_matching":true}

'
string: !!binary |
H4sIAAAAAAAEA6xTTW+cMBC992f4DMgfgA23qMmtUe+tIuT1uhtLYCM8zrZa8d87ZrVt2iRVVion
e8bvzcd7nMhjiDCMLgLpv56I25Oey1Z0SjFey4KAPsRh92OIIS3Gkv5EbjXofTjgc2L9Ux/DZOHR
+QMpNq7+7iO/ub/5Ut5/bgSTn8jDWhA9Oh1tzBhXUsWE6Lik1u6YMY1E5AsQYuZ5A+iD9YBPPMzk
oSDnRp5lMOb1hK29IDk3NLyZ1cc45IHf6CnNpIcl2YKMGne02DksYPcDuFyNSdEqVXMqCuLiMCVM
kf6bHiMC8m17FxLu1adxxJgFjfvDbeBpcQZHOBEzJ6SqGinrTnBkCkftEEKxaNBImLHrWlyUqRVj
XUsb9g5l9vbpoombSyZ5KVjJ6pJTXqVYHm2EklUmTDN2WzkPdvF6fEWvXWuaVqjO4LSt1QZZryL8
rWXWEG+bov/W8poCf+p8HfK5B16Z8z0eaNuu+w8ekKpmAnX9ZYGKUs45lbVQFzdQjIlm++p1xQ1C
AD2iNSEtPvsPLXQOTRrM9lfmkP2uDQx/J7K31w8/AQAA//8DAI9b56cCBAAA
headers:
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Thu, 19 Dec 2024 20:14:07 GMT
- Tue, 14 Jan 2025 20:39:45 GMT
Transfer-Encoding:
- chunked
content-encoding:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ interactions:
Connection:
- keep-alive
User-Agent:
- datadogpy/0.50.3-dev (python 3.12.3; os linux; arch aarch64)
- datadogpy/0.50.3-dev (python 3.8.20; os linux; arch aarch64)
method: GET
uri: https://api.datadoghq.com/api/v1/hosts/totals
response:
body:
string: '{"total_up":8,"total_active":8}'
string: '{"total_up":6,"total_active":6}'
headers:
Connection:
- keep-alive
Expand All @@ -23,7 +23,7 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 19 Dec 2024 21:46:38 GMT
- Tue, 14 Jan 2025 20:39:45 GMT
content-security-policy:
- frame-ancestors 'self'; report-uri https://logs.browser-intake-datadoghq.com/api/v2/logs?dd-api-key=pube4f163c23bbf91c16b8f57f56af9fc58&dd-evp-origin=content-security-policy&ddsource=csp-report&ddtags=site%3Adatadoghq.com
strict-transport-security:
Expand Down

0 comments on commit bb09437

Please sign in to comment.