diff --git a/.apigentools-info b/.apigentools-info index c469a17fa3..e26407e105 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-08 20:00:50.307792", - "spec_repo_commit": "3e2afa30" + "regenerated": "2025-04-08 20:55:42.169501", + "spec_repo_commit": "21cf6edb" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-08 20:00:50.398680", - "spec_repo_commit": "3e2afa30" + "regenerated": "2025-04-08 20:55:42.184778", + "spec_repo_commit": "21cf6edb" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 061d18d5c3..cc558ab240 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17271,6 +17271,14 @@ components: example: 0 format: int64 type: integer + ip_addresses: + description: The interface IP addresses + example: + - 1.1.1.1 + - 1.1.1.2 + items: + type: string + type: array mac_address: description: The interface MAC address example: 00:00:00:00:00:00 diff --git a/src/datadog_api_client/v2/model/interface_attributes.py b/src/datadog_api_client/v2/model/interface_attributes.py index 4dee2c9674..53c8378e4a 100644 --- a/src/datadog_api_client/v2/model/interface_attributes.py +++ b/src/datadog_api_client/v2/model/interface_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -26,6 +26,7 @@ def openapi_types(_): "alias": (str,), "description": (str,), "index": (int,), + "ip_addresses": ([str],), "mac_address": (str,), "name": (str,), "status": (InterfaceAttributesStatus,), @@ -35,6 +36,7 @@ def openapi_types(_): "alias": "alias", "description": "description", "index": "index", + "ip_addresses": "ip_addresses", "mac_address": "mac_address", "name": "name", "status": "status", @@ -45,6 +47,7 @@ def __init__( alias: Union[str, UnsetType] = unset, description: Union[str, UnsetType] = unset, index: Union[int, UnsetType] = unset, + ip_addresses: Union[List[str], UnsetType] = unset, mac_address: Union[str, UnsetType] = unset, name: Union[str, UnsetType] = unset, status: Union[InterfaceAttributesStatus, UnsetType] = unset, @@ -62,6 +65,9 @@ def __init__( :param index: The interface index :type index: int, optional + :param ip_addresses: The interface IP addresses + :type ip_addresses: [str], optional + :param mac_address: The interface MAC address :type mac_address: str, optional @@ -77,6 +83,8 @@ def __init__( kwargs["description"] = description if index is not unset: kwargs["index"] = index + if ip_addresses is not unset: + kwargs["ip_addresses"] = ip_addresses if mac_address is not unset: kwargs["mac_address"] = mac_address if name is not unset: diff --git a/tests/v2/cassettes/test_scenarios/test_get_the_list_of_interfaces_of_the_device_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_the_list_of_interfaces_of_the_device_returns_ok_response.yaml index 845c1f3118..71b25566d8 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_the_list_of_interfaces_of_the_device_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_the_list_of_interfaces_of_the_device_returns_ok_response.yaml @@ -9,7 +9,7 @@ interactions: response: body: string: '{"data":[{"id":"default:1.2.3.4:99","type":"interface","attributes":{"name":"if99","status":"up","description":"a - network interface","mac_address":"00:00:00:00:00:00","alias":"interface_99","index":99}},{"id":"default:1.2.3.4:999","type":"interface","attributes":{"name":"if999","status":"down","description":"another + network interface","mac_address":"00:00:00:00:00:00","ip_addresses":["1.1.1.1","1.1.1.2"],"alias":"interface_99","index":99}},{"id":"default:1.2.3.4:999","type":"interface","attributes":{"name":"if999","status":"down","description":"another network interface","mac_address":"99:99:99:99:99:99","alias":"interface_999","index":999}}]}' headers: content-type: diff --git a/tests/v2/features/network_device_monitoring.feature b/tests/v2/features/network_device_monitoring.feature index 6952a281f0..6058284396 100644 --- a/tests/v2/features/network_device_monitoring.feature +++ b/tests/v2/features/network_device_monitoring.feature @@ -86,6 +86,7 @@ Feature: Network Device Monitoring And the response "data[0].attributes.name" is equal to "if99" And the response "data[0].attributes.description" is equal to "a network interface" And the response "data[0].attributes.mac_address" is equal to "00:00:00:00:00:00" + And the response "data[0].attributes.ip_addresses" is equal to ["1.1.1.1","1.1.1.2"] And the response "data[0].attributes.alias" is equal to "interface_99" And the response "data[0].attributes.index" is equal to 99 And the response "data[0].attributes.status" is equal to "up"