Skip to content

Commit ae690d6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Update NDM GetInterfaces documentation to add get_ip_addresses param (#2500)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4870f46 commit ae690d6

File tree

7 files changed

+27
-6
lines changed

7 files changed

+27
-6
lines changed

Diff for: .apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-14 08:41:57.654765",
8-
"spec_repo_commit": "e73254d7"
7+
"regenerated": "2025-04-14 16:33:13.508002",
8+
"spec_repo_commit": "c0287407"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-14 08:41:57.677047",
13-
"spec_repo_commit": "e73254d7"
12+
"regenerated": "2025-04-14 16:33:13.522553",
13+
"spec_repo_commit": "c0287407"
1414
}
1515
}
1616
}

Diff for: .generator/schemas/v2/openapi.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -46074,6 +46074,13 @@ paths:
4607446074
required: true
4607546075
schema:
4607646076
type: string
46077+
- description: Whether to get the IP addresses of the interfaces.
46078+
example: true
46079+
in: query
46080+
name: get_ip_addresses
46081+
required: false
46082+
schema:
46083+
type: boolean
4607746084
responses:
4607846085
'200':
4607946086
content:

Diff for: examples/v2/network-device-monitoring/GetInterfaces.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
api_instance = NetworkDeviceMonitoringApi(api_client)
1111
response = api_instance.get_interfaces(
1212
device_id="default:1.2.3.4",
13+
get_ip_addresses=True,
1314
)
1415

1516
print(response)

Diff for: src/datadog_api_client/v2/api/network_device_monitoring_api.py

+12
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ def __init__(self, api_client=None):
6666
"attribute": "device_id",
6767
"location": "query",
6868
},
69+
"get_ip_addresses": {
70+
"openapi_types": (bool,),
71+
"attribute": "get_ip_addresses",
72+
"location": "query",
73+
},
6974
},
7075
headers_map={
7176
"accept": ["application/json"],
@@ -179,18 +184,25 @@ def get_device(
179184
def get_interfaces(
180185
self,
181186
device_id: str,
187+
*,
188+
get_ip_addresses: Union[bool, UnsetType] = unset,
182189
) -> GetInterfacesResponse:
183190
"""Get the list of interfaces of the device.
184191
185192
Get the list of interfaces of the device.
186193
187194
:param device_id: The ID of the device to get interfaces from.
188195
:type device_id: str
196+
:param get_ip_addresses: Whether to get the IP addresses of the interfaces.
197+
:type get_ip_addresses: bool, optional
189198
:rtype: GetInterfacesResponse
190199
"""
191200
kwargs: Dict[str, Any] = {}
192201
kwargs["device_id"] = device_id
193202

203+
if get_ip_addresses is not unset:
204+
kwargs["get_ip_addresses"] = get_ip_addresses
205+
194206
return self._get_interfaces_endpoint.call_with_http_info(**kwargs)
195207

196208
def list_devices(
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-07-05T14:25:54.313Z
1+
2025-04-09T22:39:12.378Z

Diff for: tests/v2/cassettes/test_scenarios/test_get_the_list_of_interfaces_of_the_device_returns_ok_response.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interactions:
55
accept:
66
- application/json
77
method: GET
8-
uri: https://api.datadoghq.com/api/v2/ndm/interfaces?device_id=default:1.2.3.4
8+
uri: https://api.datadoghq.com/api/v2/ndm/interfaces?device_id=default%3A1.2.3.4&get_ip_addresses=true
99
response:
1010
body:
1111
string: '{"data":[{"id":"default:1.2.3.4:99","type":"interface","attributes":{"name":"if99","status":"up","description":"a

Diff for: tests/v2/features/network_device_monitoring.feature

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Feature: Network Device Monitoring
7979
Scenario: Get the list of interfaces of the device returns "OK" response
8080
Given new "GetInterfaces" request
8181
And request contains "device_id" parameter with value "default:1.2.3.4"
82+
And request contains "get_ip_addresses" parameter with value true
8283
When the request is sent
8384
Then the response status is 200 OK
8485
And the response "data[0].type" is equal to "interface"

0 commit comments

Comments
 (0)