Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions thousandeyes-sdk-administrative/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,17 @@ src/thousandeyes_sdk/administrative/models/validation_error.py
src/thousandeyes_sdk/administrative/models/validation_error_item.py
src/thousandeyes_sdk/administrative/py.typed
test/__init__.py
test/conftest.py
test/integration_test_utils.py
test/mock_manifest.py
test/test_account_groups_api.py
test/test_account_groups_api_integration.py
test/test_permissions_api.py
test/test_permissions_api_integration.py
test/test_roles_api.py
test/test_roles_api_integration.py
test/test_user_events_api.py
test/test_user_events_api_integration.py
test/test_users_api.py
test/test_users_api_integration.py
test/test_utils.py
6 changes: 3 additions & 3 deletions thousandeyes-sdk-administrative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This API provides the following operations to manage your organization:

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 7.0.96
- API version: 7.0.99
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

Expand Down Expand Up @@ -85,8 +85,8 @@ configuration = thousandeyes_sdk.core.Configuration(
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.AccountGroupsApi(api_client)
account_group_request = thousandeyes_sdk.administrative.AccountGroupRequest() # AccountGroupRequest |
expand = [thousandeyes_sdk.administrative.ExpandAccountGroupOptions()] # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
account_group_request = # AccountGroupRequest |
expand = # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)

try:
# Create account group
Expand Down
10 changes: 5 additions & 5 deletions thousandeyes-sdk-administrative/docs/AccountGroupsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ configuration = thousandeyes_sdk.core.Configuration(
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.AccountGroupsApi(api_client)
account_group_request = thousandeyes_sdk.administrative.AccountGroupRequest() # AccountGroupRequest |
expand = [thousandeyes_sdk.administrative.ExpandAccountGroupOptions()] # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
account_group_request = # AccountGroupRequest |
expand = # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)

try:
# Create account group
Expand Down Expand Up @@ -219,7 +219,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.AccountGroupsApi(api_client)
id = '1234' # str | Identifier for the account group.
expand = [thousandeyes_sdk.administrative.ExpandAccountGroupOptions()] # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
expand = # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)

try:
# Retrieve account group
Expand Down Expand Up @@ -387,8 +387,8 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.AccountGroupsApi(api_client)
id = '1234' # str | Identifier for the account group.
account_group_request = thousandeyes_sdk.administrative.AccountGroupRequest() # AccountGroupRequest |
expand = [thousandeyes_sdk.administrative.ExpandAccountGroupOptions()] # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
account_group_request = # AccountGroupRequest |
expand = # List[ExpandAccountGroupOptions] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)

try:
# Update account group
Expand Down
4 changes: 2 additions & 2 deletions thousandeyes-sdk-administrative/docs/RolesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ configuration = thousandeyes_sdk.core.Configuration(
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.RolesApi(api_client)
role_request_body = thousandeyes_sdk.administrative.RoleRequestBody() # RoleRequestBody |
role_request_body = # RoleRequestBody |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)

try:
Expand Down Expand Up @@ -390,7 +390,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.RolesApi(api_client)
id = '23' # str | The ID of the desired role.
role_request_body = thousandeyes_sdk.administrative.RoleRequestBody() # RoleRequestBody |
role_request_body = # RoleRequestBody |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)

try:
Expand Down
4 changes: 2 additions & 2 deletions thousandeyes-sdk-administrative/docs/UsersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ configuration = thousandeyes_sdk.core.Configuration(
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.UsersApi(api_client)
user_request = thousandeyes_sdk.administrative.UserRequest() # UserRequest |
user_request = # UserRequest |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)

try:
Expand Down Expand Up @@ -471,7 +471,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.administrative.UsersApi(api_client)
id = '1234' # str | Identifier for the user.
user_request = thousandeyes_sdk.administrative.UserRequest() # UserRequest |
user_request = # UserRequest |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)

try:
Expand Down
7 changes: 7 additions & 0 deletions thousandeyes-sdk-administrative/test/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import sys
from pathlib import Path

_repo_root = Path(__file__).resolve().parents[2]
_core_test_support = _repo_root / "thousandeyes-sdk-core" / "test"
if str(_core_test_support) not in sys.path:
sys.path.insert(0, str(_core_test_support))
37 changes: 37 additions & 0 deletions thousandeyes-sdk-administrative/test/integration_test_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding: utf-8

"""
Administrative API

Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).

Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


import unittest

from thousandeyes_sdk.core.api_client import ApiClient
from thousandeyes_sdk.core.configuration import Configuration
from sdk_test_support.mock_server import ERROR_STATUS_HEADER, OPERATION_ID_HEADER, MockApiServer

from .mock_manifest import OPERATION_MANIFEST


class IntegrationTestBase(unittest.TestCase):
def setUp(self) -> None:
self.server = MockApiServer(OPERATION_MANIFEST)
self.server.start()
configuration = Configuration(host=self.server.base_url, access_token="test-token")
self.api_client = ApiClient(configuration=configuration)

def tearDown(self) -> None:
self.server.stop()

def te_headers(self, operation_id: str, error_status=None):
headers = {OPERATION_ID_HEADER: operation_id}
if error_status is not None:
headers[ERROR_STATUS_HEADER] = error_status
return headers
Loading
Loading