Skip to content
Open
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
30 changes: 23 additions & 7 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2381,6 +2381,18 @@ components:
schema:
$ref: "#/components/schemas/HTTPCDRulesNotFoundResponse"
description: Deployment rule not found.
NDMBadRequestResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
NDMNotFoundResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found
NotAuthorizedResponse:
content:
"application/json":
Expand Down Expand Up @@ -203394,7 +203406,7 @@ paths:
parameters:
- $ref: "#/components/parameters/NDMPageSize"
- $ref: "#/components/parameters/NDMPageNumber"
- description: The field to sort the devices by. Defaults to `name`.
- description: The field to sort devices by. Defaults to `name`. Prefix the field with `-` to sort in descending order, for example, `-name`.
example: status
in: query
name: sort
Expand Down Expand Up @@ -203432,7 +203444,7 @@ paths:
$ref: "#/components/schemas/ListDevicesResponse"
description: OK
"400":
$ref: "#/components/responses/BadRequestResponse"
$ref: "#/components/responses/NDMBadRequestResponse"
"403":
$ref: "#/components/responses/ForbiddenResponse"
"429":
Expand Down Expand Up @@ -203480,7 +203492,7 @@ paths:
"403":
$ref: "#/components/responses/ForbiddenResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
$ref: "#/components/responses/NDMNotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get the device details
Expand Down Expand Up @@ -203577,7 +203589,7 @@ paths:
"403":
$ref: "#/components/responses/ForbiddenResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
$ref: "#/components/responses/NDMNotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get the list of tags for a device
Expand Down Expand Up @@ -203629,10 +203641,12 @@ paths:
schema:
$ref: "#/components/schemas/ListTagsResponse"
description: OK
"400":
$ref: "#/components/responses/NDMBadRequestResponse"
"403":
$ref: "#/components/responses/ForbiddenResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
$ref: "#/components/responses/NDMNotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Update the tags for a device
Expand Down Expand Up @@ -203670,7 +203684,7 @@ paths:
"403":
$ref: "#/components/responses/ForbiddenResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
$ref: "#/components/responses/NDMNotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: List tags for an interface
Expand Down Expand Up @@ -203720,10 +203734,12 @@ paths:
schema:
$ref: "#/components/schemas/ListInterfaceTagsResponse"
description: OK
"400":
$ref: "#/components/responses/NDMBadRequestResponse"
"403":
$ref: "#/components/responses/ForbiddenResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
$ref: "#/components/responses/NDMNotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Update the tags for an interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def list_devices(
:type page_size: int, optional
:param page_number: Specific page number to return. Defaults to 0.
:type page_number: int, optional
:param sort: The field to sort the devices by. Defaults to ``name``.
:param sort: The field to sort devices by. Defaults to ``name``. Prefix the field with ``-`` to sort in descending order, for example, ``-name``.
:type sort: str, optional
:param filter_tag: Filter devices by tag.
:type filter_tag: str, optional
Expand Down Expand Up @@ -312,7 +312,7 @@ def list_devices_with_pagination(
:type page_size: int, optional
:param page_number: Specific page number to return. Defaults to 0.
:type page_number: int, optional
:param sort: The field to sort the devices by. Defaults to ``name``.
:param sort: The field to sort devices by. Defaults to ``name``. Prefix the field with ``-`` to sort in descending order, for example, ``-name``.
:type sort: str, optional
:param filter_tag: Filter devices by tag.
:type filter_tag: str, optional
Expand Down
16 changes: 16 additions & 0 deletions tests/v2/features/network_device_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ Feature: Network Device Monitoring
And the response "data.attributes.tags[0]" is equal to "tag:test"
And the response "data.attributes.tags[1]" is equal to "tag:testbis"

@generated @skip @team:ddoghq/network-device-monitoring
Scenario: Update the tags for a device returns "Bad Request" response
Given new "UpdateDeviceUserTags" request
And request contains "device_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"tags": ["tag:test", "tag:testbis"]}, "id": "example:1.2.3.4"}}
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:ddoghq/network-device-monitoring
Scenario: Update the tags for a device returns "Not Found" response
Given new "UpdateDeviceUserTags" request
Expand All @@ -162,6 +170,14 @@ Feature: Network Device Monitoring
And the response "data.attributes.tags[0]" is equal to "tag:test"
And the response "data.attributes.tags[1]" is equal to "tag:testbis"

@generated @skip @team:ddoghq/network-device-monitoring
Scenario: Update the tags for an interface returns "Bad Request" response
Given new "UpdateInterfaceUserTags" request
And request contains "interface_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"tags": ["tag:test", "tag:testbis"]}, "id": "example:1.2.3.4:1"}}
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:ddoghq/network-device-monitoring
Scenario: Update the tags for an interface returns "Not Found" response
Given new "UpdateInterfaceUserTags" request
Expand Down
Loading