From 0125f5e36619251dfa6ea38179b56e7af98f1332 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 14 Apr 2025 16:33:44 +0000 Subject: [PATCH] Regenerate client from commit c0287407 of spec repo --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 7 +++++++ ...of-interfaces-of-the-device-returns-OK-response.frozen | 2 +- ...st-of-interfaces-of-the-device-returns-OK-response.yml | 4 ++-- examples/v2/network-device-monitoring/GetInterfaces.rb | 5 ++++- features/scenarios_model_mapping.rb | 1 + features/v2/network_device_monitoring.feature | 1 + .../v2/api/network_device_monitoring_api.rb | 2 ++ 8 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 75b796b0d044..fa679cea03b9 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-14 08:41:51.732917", - "spec_repo_commit": "e73254d7" + "regenerated": "2025-04-14 16:33:14.288032", + "spec_repo_commit": "c0287407" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-14 08:41:51.748495", - "spec_repo_commit": "e73254d7" + "regenerated": "2025-04-14 16:33:14.303837", + "spec_repo_commit": "c0287407" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5aec87b0070a..b69f15d75a3b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -46074,6 +46074,13 @@ paths: required: true schema: type: string + - description: Whether to get the IP addresses of the interfaces. + example: true + in: query + name: get_ip_addresses + required: false + schema: + type: boolean responses: '200': content: diff --git a/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.frozen b/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.frozen index fc2d55d03c0c..ea692e94b5a6 100644 --- a/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.frozen +++ b/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.frozen @@ -1 +1 @@ -2024-07-05T14:25:54.313Z \ No newline at end of file +2025-04-09T22:39:12.378Z \ No newline at end of file diff --git a/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.yml b/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.yml index fcfb252c223a..32d005655479 100644 --- a/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.yml +++ b/cassettes/features/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.yml @@ -1,12 +1,12 @@ http_interactions: -- recorded_at: Fri, 05 Jul 2024 14:25:54 GMT +- recorded_at: Wed, 09 Apr 2025 22:39:12 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/ndm/interfaces?device_id=default:1.2.3.4 + uri: https://api.datadoghq.com/api/v2/ndm/interfaces?device_id=default%3A1.2.3.4&get_ip_addresses=true response: body: encoding: UTF-8 diff --git a/examples/v2/network-device-monitoring/GetInterfaces.rb b/examples/v2/network-device-monitoring/GetInterfaces.rb index a00279c88d3b..8f8107cd69c9 100644 --- a/examples/v2/network-device-monitoring/GetInterfaces.rb +++ b/examples/v2/network-device-monitoring/GetInterfaces.rb @@ -2,4 +2,7 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::NetworkDeviceMonitoringAPI.new -p api_instance.get_interfaces("default:1.2.3.4") +opts = { + get_ip_addresses: true, +} +p api_instance.get_interfaces("default:1.2.3.4", opts) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index dbc02bca84af..732e6cbc585d 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1757,6 +1757,7 @@ }, "v2.GetInterfaces" => { "device_id" => "String", + "get_ip_addresses" => "Boolean", }, "v2.ListDeviceUserTags" => { "device_id" => "String", diff --git a/features/v2/network_device_monitoring.feature b/features/v2/network_device_monitoring.feature index 6058284396d6..50be39165309 100644 --- a/features/v2/network_device_monitoring.feature +++ b/features/v2/network_device_monitoring.feature @@ -79,6 +79,7 @@ Feature: Network Device Monitoring Scenario: Get the list of interfaces of the device returns "OK" response Given new "GetInterfaces" request And request contains "device_id" parameter with value "default:1.2.3.4" + And request contains "get_ip_addresses" parameter with value true When the request is sent Then the response status is 200 OK And the response "data[0].type" is equal to "interface" diff --git a/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb b/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb index bbb432192ef8..8169687eee57 100644 --- a/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb @@ -102,6 +102,7 @@ def get_interfaces(device_id, opts = {}) # # @param device_id [String] The ID of the device to get interfaces from. # @param opts [Hash] the optional parameters + # @option opts [Boolean] :get_ip_addresses Whether to get the IP addresses of the interfaces. # @return [Array<(GetInterfacesResponse, Integer, Hash)>] GetInterfacesResponse data, response status code and response headers def get_interfaces_with_http_info(device_id, opts = {}) @@ -118,6 +119,7 @@ def get_interfaces_with_http_info(device_id, opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'device_id'] = device_id + query_params[:'get_ip_addresses'] = opts[:'get_ip_addresses'] if !opts[:'get_ip_addresses'].nil? # header parameters header_params = opts[:header_params] || {}