mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-08-04 08:56:50 +00:00
Sync OAS-driven integration test artifacts (mock manifest, test base, conftest, and per-operation integration tests) across 21 packages for CP-2453 full rollout evaluation. Co-authored-by: Cursor <cursoragent@cursor.com>
576 lines
18 KiB
Python
576 lines
18 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
Endpoint Agent Labels API
|
|
|
|
Manage labels applied to endpoint agents using this API.
|
|
|
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
|
|
Do not edit the class manually.
|
|
""" # noqa: E501
|
|
|
|
|
|
import json
|
|
|
|
from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation
|
|
|
|
OPERATION_MANIFEST = {
|
|
|
|
"create_endpoint_label": OperationExpectation(
|
|
operation_id="create_endpoint_label",
|
|
method="POST",
|
|
path="/endpoint/labels",
|
|
path_param_examples={
|
|
},
|
|
success_status=201,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"color" : "#ff3333",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"color" : "#ff3333",
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
error_responses={
|
|
|
|
"400": ErrorResponseExpectation(
|
|
status=400,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"errors" : [ {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
}, {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
} ],
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"delete_endpoint_label": OperationExpectation(
|
|
operation_id="delete_endpoint_label",
|
|
method="DELETE",
|
|
path="/endpoint/labels/{id}",
|
|
path_param_examples={
|
|
"id": 'id_example',
|
|
},
|
|
success_status=204,
|
|
success_body=None,
|
|
success_content_type="application/json",
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_endpoint_label": OperationExpectation(
|
|
operation_id="get_endpoint_label",
|
|
method="GET",
|
|
path="/endpoint/labels/{id}",
|
|
path_param_examples={
|
|
"id": 'id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"color" : "#ff3333",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_endpoint_labels": OperationExpectation(
|
|
operation_id="get_endpoint_labels",
|
|
method="GET",
|
|
path="/endpoint/labels",
|
|
path_param_examples={
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"_links" : {
|
|
"next" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
},
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"labels" : [ {
|
|
"color" : "#ff3333",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
}, {
|
|
"color" : "#ff3333",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"update_endpoint_label": OperationExpectation(
|
|
operation_id="update_endpoint_label",
|
|
method="PATCH",
|
|
path="/endpoint/labels/{id}",
|
|
path_param_examples={
|
|
"id": 'id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"color" : "#ff3333",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"color" : "#ff3333",
|
|
"matchType" : "and",
|
|
"name" : "Head office meeting rooms",
|
|
"id" : "abc-123-def",
|
|
"filters" : [ {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
}, {
|
|
"mode" : "in",
|
|
"values" : [ "10.1.1.0/24", "192.168.1.0/24" ],
|
|
"key" : "vpn-client-network"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
error_responses={
|
|
|
|
"400": ErrorResponseExpectation(
|
|
status=400,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"errors" : [ {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
}, {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
} ],
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
}
|