Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion src/datadog_api_client/v2/model/interface_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -26,6 +26,7 @@ def openapi_types(_):
"alias": (str,),
"description": (str,),
"index": (int,),
"ip_addresses": ([str],),
"mac_address": (str,),
"name": (str,),
"status": (InterfaceAttributesStatus,),
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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

Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions tests/v2/features/network_device_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down