diff --git a/README.md b/README.md index 648aab5..62aee2f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ ActiveGates | :heavy_check_mark: | `dt.activegates ActiveGates - Auto-update configuration | :warning: | `dt.activegates_autoupdate` | ActiveGates - Auto-update jobs | :x: | | Audit Logs | :x: | | -Extensions 2.0 | :warning: | `dt.extensions` | +Extensions 2.0 | :x: | | Metrics | :warning: | `dt.metrics` | Monitored entities | :warning: | `dt.entities` | Monitored entities - Custom tags | :x: | | @@ -91,7 +91,7 @@ Conditional naming | :x: | | Credential vault | :x: | | Dashboards | :warning: |`dt.dashboards` | Data privacy and security | :x: | | -Extensions | :x: | | +Extensions | :warning: | `dt.extensions` | Frequent issue detection | :x: | | Kubernetes credentials configuration | :x: | | Maintenance windows | :x: | | diff --git a/dynatrace/environment_v2/extension.py b/dynatrace/configuration_v1/extension.py similarity index 91% rename from dynatrace/environment_v2/extension.py rename to dynatrace/configuration_v1/extension.py index 542dc05..865d78d 100644 --- a/dynatrace/environment_v2/extension.py +++ b/dynatrace/configuration_v1/extension.py @@ -4,7 +4,6 @@ from dynatrace.environment_v2.configuration import ConfigurationMetadata from dynatrace.dynatrace_object import DynatraceObject -from dynatrace.configuration_v1.endpoint import EndpointShortRepresentation from dynatrace.environment_v2.entity import EntityShortRepresentation from dynatrace.http_client import HttpClient from dynatrace.pagination import PaginatedList @@ -15,12 +14,6 @@ def __init__(self, http_client: HttpClient): self.__http_client = http_client pass - def list_endpoints(self, plugin_id: str) -> PaginatedList[EndpointShortRepresentation]: - """ - Lists endpoints of the specified ActiveGate plugin - """ - return PaginatedList("EndpointShortRepresentation", self.__http_client, f"/api/config/v1/plugins/{plugin_id}/endpoints", list_item="values") - def list(self, page_size: int = 200) -> PaginatedList["ExtensionDto"]: """ List all uploaded extensions @@ -223,13 +216,13 @@ def get_full_extension(self) -> Extension: return Extension(self._http_client, None, response) @property - def instances(self) -> PaginatedList[ExtensionShortRepresentation]: - return PaginatedList( - ExtensionShortRepresentation, - self._http_client, - f"/api/config/v1/extensions/{self.id}/instances", - list_item="configurationsList", - ) + def instances(self, page_size: int = 200) -> PaginatedList["ExtensionShortRepresentation"]: + """ + Returns the list of instances for this extension + :param page_size: Page size, default 200 + """ + params = {"pageSize": page_size} + return PaginatedList(ExtensionShortRepresentation, self._http_client, f"/api/config/v1/extensions/{self.id}/instances", list_item="configurationsList", target_params=params) def delete(self) -> Response: """ diff --git a/dynatrace/main.py b/dynatrace/main.py index 40b2406..75be295 100644 --- a/dynatrace/main.py +++ b/dynatrace/main.py @@ -2,6 +2,8 @@ from typing import Dict, Optional from dynatrace.configuration_v1.dashboard import DashboardService +from dynatrace.configuration_v1.extension import ExtensionService +from dynatrace.configuration_v1.maintenance_windows import MaintenanceWindowService from dynatrace.configuration_v1.plugins import PluginService from dynatrace.environment_v1.cluster_time import ClusterTimeService from dynatrace.environment_v1.custom_device import CustomDeviceService @@ -10,10 +12,8 @@ from dynatrace.environment_v2.activegate import ActiveGateService from dynatrace.environment_v2.activegate_autoupdate import ActiveGateAutoUpdateService from dynatrace.environment_v2.entity import EntityService -from dynatrace.environment_v2.extension import ExtensionService from dynatrace.environment_v2.metric import MetricService from dynatrace.environment_v2.token import TokenService -from dynatrace.configuration_v1.maintenance_windows import MaintenanceWindowService from dynatrace.http_client import HttpClient diff --git a/setup.py b/setup.py index b0615c7..ff42eee 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="dtapi", - version="1.1.7", + version="1.1.8", packages=find_packages(), install_requires=["requests>=2.21"], python_requires=">=3.6",