linode-api4 5.42.0__tar.gz → 5.43.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linode_api4-5.42.0/linode_api4.egg-info → linode_api4-5.43.0}/PKG-INFO +1 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/linode.py +0 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/monitor.py +52 -4
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/volume.py +0 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/linode.py +0 -2
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/monitor.py +53 -43
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/version.py +1 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0/linode_api4.egg-info}/PKG-INFO +1 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4.egg-info/SOURCES.txt +2 -0
- linode_api4-5.43.0/test/fixtures/monitor_alert-channels.json +31 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_alert-definitions.json +15 -2
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas_alert-definitions.json +15 -2
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas_alert-definitions_12345.json +15 -1
- linode_api4-5.43.0/test/fixtures/monitor_services_dbaas_alert-definitions_12345_entities.json +25 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/conftest.py +1 -2
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/monitor/test_monitor.py +37 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/monitor_api_test.py +64 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/monitor_test.py +24 -1
- {linode_api4-5.42.0 → linode_api4-5.43.0}/LICENSE +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/MANIFEST.in +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/README.rst +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/examples/install-on-linode/app.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/examples/install-on-linode/make_stackscript.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/common.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/errors.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/account.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/beta.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/database.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/domain.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/group.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/image.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/image_share_group.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/lke.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/lke_tier.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/lock.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/longview.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/maintenance.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/monitor_api.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/networking.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/nodebalancer.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/object_storage.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/placement.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/polling.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/profile.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/region.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/support.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/tag.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/groups/vpc.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/linode_client.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/login_client.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/account.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/base.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/beta.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/database.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/dbase.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/domain.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/filtering.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/image.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/image_share_group.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/linode_interfaces.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/lke.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/lock.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/longview.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/monitor_api.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/networking.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/nodebalancer.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/object_storage.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/placement.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/profile.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/region.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/serializable.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/support.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/tag.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/volume.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/objects/vpc.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/paginated_list.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/polling.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4/util.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4.egg-info/dependency_links.txt +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4.egg-info/requires.txt +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/linode_api4.egg-info/top_level.txt +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/pyproject.toml +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/setup.cfg +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/setup.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_availability.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_availability_us-east.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_betas.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_betas_cool.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_child-accounts.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_child-accounts_123456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_child-accounts_123456_token.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_events_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_invoices.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_invoices_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_invoices_123456_items.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_logins.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_logins_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_maintenance.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_notifications.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_oauth-clients_2737bf16b39ab5d7b4a1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_payment-method_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_payment-methods.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_payments.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_promo-codes.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_service-transfers.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_service-transfers_12345.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_settings.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_transfer.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/account_users_test-user.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/betas.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/betas_active.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_engines.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_instances.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_config.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances_123_credentials.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances_123_credentials_reset.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances_123_patch.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances_123_resume.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances_123_ssl.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_mysql_instances_123_suspend.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_config.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances_123_credentials.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances_123_credentials_reset.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances_123_patch.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances_123_resume.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances_123_ssl.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_postgresql_instances_123_suspend.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/databases_types.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/domains.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/domains_12345_clone.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/domains_12345_records.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/domains_12345_zone-file.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/domains_import.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_private_1234_sharegroups.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_private_123_regions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_private_1337.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_1234.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_1234_images.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_1234_images_shared_1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_1234_members.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_1234_members_abc123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_tokens.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_tokens_abc123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_tokens_abc123_sharegroup.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_sharegroups_tokens_abc123_sharegroup_images.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/images_upload.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_backups.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs_456789.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs_456789_interfaces.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_123_put.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_321.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_disks.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_disks_12345_clone.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_firewalls.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_ips.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_nodebalancers.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_transfer.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_transfer_2023_4.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_123_volumes.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_interfaces.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_interfaces_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_interfaces_123_firewalls.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_interfaces_456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_interfaces_789.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_interfaces_settings.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_instances_124_upgrade-interfaces.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_stackscripts_10079.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_types.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/linode_types_g6-nanode-1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18881.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18881_control__plane__acl.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18881_dashboard.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18881_nodes_123456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18881_pools_456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18882.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_clusters_18882_pools_789.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_tiers_standard_versions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_types.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/lke_versions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/locks.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/locks_1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/longview_clients.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/longview_plan.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/longview_subscriptions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/maintenance_policies.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/mongodb.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_dashboards.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_dashboards_1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas_dashboards.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas_metric-definitions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas_metrics.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_dbaas_token.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/monitor_services_linode_token.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/network-transfer_prices.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123_devices.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123_devices_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123_devices_456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123_history.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123_history_rules_2.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_123_rules.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_settings.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_templates.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_templates_public.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_firewalls_templates_vpc.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_ips_127.0.0.1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_ipv6_pools.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_ipv6_ranges.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_ipv6_ranges_2600%3A3c01%3A%3A.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/networking_vlans.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_123456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_123456_configs.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_123456_configs_65432_nodes.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_12345_configs_4567_rebuild.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_12345_firewalls.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_12345_stats.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/nodebalancers_types.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east-1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-acl.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-list.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-url.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_ssl.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_buckets_us-east_example-bucket_access.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_clusters.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_keys.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_quotas.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_quotas_obj-objects-us-ord-1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_quotas_obj-objects-us-ord-1_usage.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_transfer.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/object-storage_types.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/placement_groups.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/placement_groups_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_device_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_devices.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_logins.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_logins_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_preferences.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_security-questions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/profile_sshkeys.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/regions.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/regions_availability.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/regions_us-east_availability.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/regions_us-east_vpc-availability.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/regions_vpc-availability.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/support_tickets_123.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/tags.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/tags_nothing.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/tags_something.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/testmappedobj1.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/volumes.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/volumes_types.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/vpcs.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/vpcs_123456.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/vpcs_123456_ips.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/vpcs_123456_subnets.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/vpcs_123456_subnets_789.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/fixtures/vpcs_ips.json +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/filters/fixtures.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/filters/model_filters_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/helpers.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/linode_client/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/linode_client/test_errors.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/linode_client/test_linode_client.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/linode_client/test_retry.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/login_client/test_login_client.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/account/test_account.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/database/helpers.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/database/test_database.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/database/test_database_engine_config.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/domain/test_domain.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/firewall/test_firewall.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/firewall/test_firewall_templates.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/image/test_image.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/linode/interfaces/test_interfaces.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/linode/test_linode.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/lke/test_lke.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/lock/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/lock/test_lock.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/longview/test_longview.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/maintenance/test_maintenance.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/monitor_api/test_monitor_api.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/networking/test_networking.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/nodebalancer/test_nodebalancer.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/object_storage/test_obj.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/object_storage/test_obj_quotas.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/placement/test_placement.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/profile/test_profile.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/region/test_region.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/sharegroups/test_sharegroups.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/tag/test_tag.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/volume/test_blockstorage.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/volume/test_volume.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/integration/models/vpc/test_vpc.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/base.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/errors_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/fixtures.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/__init__.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/database_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/image_share_group_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/image_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/linode_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/lke_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/lke_tier_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/lock_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/networking_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/object_storage_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/placement_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/polling_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/region_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/groups/vpc_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/linode_client_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/login_client_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/account_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/base_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/beta_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/database_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/domain_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/firewall_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/image_share_group_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/image_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/linode_interface_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/linode_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/lke_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/lock_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/longview_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/mapped_object_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/networking_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/nodebalancers_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/object_storage_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/placement_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/profile_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/property_alias_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/region_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/serializable_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/support_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/tag_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/volume_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/objects/vpc_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/paginated_list_test.py +0 -0
- {linode_api4-5.42.0 → linode_api4-5.43.0}/test/unit/util_test.py +0 -0
|
@@ -322,7 +322,6 @@ class LinodeGroup(Group):
|
|
|
322
322
|
:param firewall: The firewall to attach this Linode to.
|
|
323
323
|
:type firewall: int or Firewall
|
|
324
324
|
:param disk_encryption: The disk encryption policy for this Linode.
|
|
325
|
-
NOTE: Disk encryption may not currently be available to all users.
|
|
326
325
|
:type disk_encryption: InstanceDiskEncryptionType or str
|
|
327
326
|
:param interfaces: An array of Network Interfaces to add to this Linode’s Configuration Profile.
|
|
328
327
|
At least one and up to three Interface objects can exist in this array.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any, Optional
|
|
1
|
+
from typing import Any, Optional, Union
|
|
2
2
|
|
|
3
3
|
from linode_api4 import PaginatedList
|
|
4
4
|
from linode_api4.errors import UnexpectedResponseError
|
|
@@ -6,6 +6,8 @@ from linode_api4.groups import Group
|
|
|
6
6
|
from linode_api4.objects import (
|
|
7
7
|
AlertChannel,
|
|
8
8
|
AlertDefinition,
|
|
9
|
+
AlertDefinitionEntity,
|
|
10
|
+
AlertScope,
|
|
9
11
|
MonitorDashboard,
|
|
10
12
|
MonitorMetricsDefinition,
|
|
11
13
|
MonitorService,
|
|
@@ -202,7 +204,7 @@ class MonitorGroup(Group):
|
|
|
202
204
|
|
|
203
205
|
.. note:: This endpoint is in beta and requires using the v4beta base URL.
|
|
204
206
|
|
|
205
|
-
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-
|
|
207
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-notification-channels
|
|
206
208
|
|
|
207
209
|
:param filters: Optional filter expressions to apply to the collection.
|
|
208
210
|
See :doc:`Filtering Collections</linode_api4/objects/filtering>` for details.
|
|
@@ -221,6 +223,8 @@ class MonitorGroup(Group):
|
|
|
221
223
|
trigger_conditions: dict,
|
|
222
224
|
entity_ids: Optional[list[str]] = None,
|
|
223
225
|
description: Optional[str] = None,
|
|
226
|
+
scope: Optional[Union[AlertScope, str]] = None,
|
|
227
|
+
regions: Optional[list[str]] = None,
|
|
224
228
|
) -> AlertDefinition:
|
|
225
229
|
"""
|
|
226
230
|
Create a new alert definition for a given service type.
|
|
@@ -252,6 +256,10 @@ class MonitorGroup(Group):
|
|
|
252
256
|
:type entity_ids: Optional[list[str]]
|
|
253
257
|
:param description: (Optional) Longer description for the alert definition.
|
|
254
258
|
:type description: Optional[str]
|
|
259
|
+
:param scope: (Optional) Alert scope (for example: `account`, `entity`, or `region`). Defaults to `entity`.
|
|
260
|
+
:type scope: Optional[Union[AlertScope, str]]
|
|
261
|
+
:param regions: (Optional) Regions to monitor.
|
|
262
|
+
:type regions: Optional[list[str]]
|
|
255
263
|
|
|
256
264
|
:returns: The newly created :class:`AlertDefinition`.
|
|
257
265
|
:rtype: AlertDefinition
|
|
@@ -267,10 +275,15 @@ class MonitorGroup(Group):
|
|
|
267
275
|
"rule_criteria": rule_criteria,
|
|
268
276
|
"trigger_conditions": trigger_conditions,
|
|
269
277
|
}
|
|
270
|
-
|
|
271
|
-
params["description"] = description
|
|
278
|
+
|
|
272
279
|
if entity_ids is not None:
|
|
273
280
|
params["entity_ids"] = entity_ids
|
|
281
|
+
if description is not None:
|
|
282
|
+
params["description"] = description
|
|
283
|
+
if scope is not None:
|
|
284
|
+
params["scope"] = scope
|
|
285
|
+
if regions is not None:
|
|
286
|
+
params["regions"] = regions
|
|
274
287
|
|
|
275
288
|
# API will validate service_type and return an error if missing
|
|
276
289
|
result = self.client.post(
|
|
@@ -284,3 +297,38 @@ class MonitorGroup(Group):
|
|
|
284
297
|
)
|
|
285
298
|
|
|
286
299
|
return AlertDefinition(self.client, result["id"], service_type, result)
|
|
300
|
+
|
|
301
|
+
def alert_definition_entities(
|
|
302
|
+
self,
|
|
303
|
+
service_type: str,
|
|
304
|
+
id: int,
|
|
305
|
+
*filters,
|
|
306
|
+
) -> PaginatedList:
|
|
307
|
+
"""
|
|
308
|
+
List entities associated with a specific alert definition.
|
|
309
|
+
|
|
310
|
+
This endpoint supports pagination fields (`page`, `page_size`) in the API.
|
|
311
|
+
|
|
312
|
+
.. note:: This endpoint is in beta and requires using the v4beta base URL.
|
|
313
|
+
|
|
314
|
+
API Documentation: TODO
|
|
315
|
+
|
|
316
|
+
:param service_type: Service type for the alert definition (e.g. `dbaas`).
|
|
317
|
+
:type service_type: str
|
|
318
|
+
:param id: Alert definition identifier.
|
|
319
|
+
:type id: int
|
|
320
|
+
:param filters: Optional filter expressions to apply to the collection.
|
|
321
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`.
|
|
322
|
+
|
|
323
|
+
:returns: A paginated list of entities associated with the alert definition.
|
|
324
|
+
:rtype: PaginatedList[AlertDefinitionEntity]
|
|
325
|
+
"""
|
|
326
|
+
|
|
327
|
+
endpoint = (
|
|
328
|
+
f"/monitor/services/{service_type}/alert-definitions/{id}/entities"
|
|
329
|
+
)
|
|
330
|
+
return self.client._get_and_filter(
|
|
331
|
+
AlertDefinitionEntity,
|
|
332
|
+
*filters,
|
|
333
|
+
endpoint=endpoint,
|
|
334
|
+
)
|
|
@@ -48,7 +48,6 @@ class VolumeGroup(Group):
|
|
|
48
48
|
:type tags: list[str]
|
|
49
49
|
:param encryption: Whether the new Volume should opt in or out of disk encryption.
|
|
50
50
|
:type encryption: str
|
|
51
|
-
Note: Block Storage Disk Encryption is not currently available to all users.
|
|
52
51
|
:returns: The new Volume.
|
|
53
52
|
:rtype: Volume
|
|
54
53
|
"""
|
|
@@ -1448,7 +1448,6 @@ class Instance(Base):
|
|
|
1448
1448
|
should already be set up, see :any:`ProfileGroup.ssh_keys`
|
|
1449
1449
|
for details.
|
|
1450
1450
|
:param disk_encryption: The disk encryption policy for this Linode.
|
|
1451
|
-
NOTE: Disk encryption may not currently be available to all users.
|
|
1452
1451
|
:type disk_encryption: InstanceDiskEncryptionType or str
|
|
1453
1452
|
:param stackscript: A StackScript object, or the ID of one, to deploy to this
|
|
1454
1453
|
disk. Requires deploying a compatible image.
|
|
@@ -1642,7 +1641,6 @@ class Instance(Base):
|
|
|
1642
1641
|
the key.
|
|
1643
1642
|
:type authorized_keys: list or str
|
|
1644
1643
|
:param disk_encryption: The disk encryption policy for this Linode.
|
|
1645
|
-
NOTE: Disk encryption may not currently be available to all users.
|
|
1646
1644
|
:type disk_encryption: InstanceDiskEncryptionType or str
|
|
1647
1645
|
|
|
1648
1646
|
:returns: The newly generated password, if one was not provided
|
|
@@ -7,11 +7,13 @@ from linode_api4.objects.serializable import JSONObject, StrEnum
|
|
|
7
7
|
|
|
8
8
|
__all__ = [
|
|
9
9
|
"AggregateFunction",
|
|
10
|
-
"Alert",
|
|
11
10
|
"AlertChannel",
|
|
12
11
|
"AlertDefinition",
|
|
12
|
+
"AlertDefinitionChannel",
|
|
13
|
+
"AlertDefinitionEntity",
|
|
14
|
+
"AlertEntities",
|
|
15
|
+
"AlertScope",
|
|
13
16
|
"AlertType",
|
|
14
|
-
"Alerts",
|
|
15
17
|
"MonitorDashboard",
|
|
16
18
|
"MonitorMetricsDefinition",
|
|
17
19
|
"MonitorService",
|
|
@@ -341,15 +343,15 @@ class RuleCriteria(JSONObject):
|
|
|
341
343
|
|
|
342
344
|
|
|
343
345
|
@dataclass
|
|
344
|
-
class
|
|
346
|
+
class AlertDefinitionChannel(JSONObject):
|
|
345
347
|
"""
|
|
346
|
-
Represents
|
|
348
|
+
Represents the notification channel set up for use with an alert.
|
|
347
349
|
|
|
348
350
|
Fields:
|
|
349
|
-
- id: int - Unique identifier
|
|
350
|
-
- label: str - Human-readable name for the alert
|
|
351
|
-
- type: str - Type of the alert
|
|
352
|
-
- url: str -
|
|
351
|
+
- id: int - Unique identifier for this notification channel.
|
|
352
|
+
- label: str - Human-readable name for the alert channel.
|
|
353
|
+
- type: str - Type of notification used with the channel. For a user alert definition, only `email` is supported.
|
|
354
|
+
- url: str - URL for the channel that ends in the channel's id.
|
|
353
355
|
"""
|
|
354
356
|
|
|
355
357
|
id: int = 0
|
|
@@ -358,18 +360,6 @@ class Alert(JSONObject):
|
|
|
358
360
|
url: str = ""
|
|
359
361
|
|
|
360
362
|
|
|
361
|
-
@dataclass
|
|
362
|
-
class Alerts(JSONObject):
|
|
363
|
-
"""
|
|
364
|
-
Represents a collection of alert definitions within an AlertChannel.
|
|
365
|
-
|
|
366
|
-
Fields:
|
|
367
|
-
- items: List[Alert] - List of alert definitions.
|
|
368
|
-
"""
|
|
369
|
-
|
|
370
|
-
items: List[Alert] = field(default_factory=list)
|
|
371
|
-
|
|
372
|
-
|
|
373
363
|
class AlertType(StrEnum):
|
|
374
364
|
"""
|
|
375
365
|
Enumeration of alert origin types used by alert definitions.
|
|
@@ -387,6 +377,43 @@ class AlertType(StrEnum):
|
|
|
387
377
|
user = "user"
|
|
388
378
|
|
|
389
379
|
|
|
380
|
+
class AlertScope(StrEnum):
|
|
381
|
+
"""
|
|
382
|
+
Scope values supported for alert definitions.
|
|
383
|
+
"""
|
|
384
|
+
|
|
385
|
+
entity = "entity"
|
|
386
|
+
region = "region"
|
|
387
|
+
account = "account"
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
@dataclass
|
|
391
|
+
class AlertEntities(JSONObject):
|
|
392
|
+
"""
|
|
393
|
+
Represents entity metadata for an alert definition.
|
|
394
|
+
|
|
395
|
+
For entity scoped alerts, `entities` envelope contains the URL to list entities,
|
|
396
|
+
a count, and a has_more_resources flag.
|
|
397
|
+
For region/account scoped alerts, the `entities` are returned as an empty object.
|
|
398
|
+
"""
|
|
399
|
+
|
|
400
|
+
url: str = ""
|
|
401
|
+
count: int = 0
|
|
402
|
+
has_more_resources: bool = False
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
@dataclass
|
|
406
|
+
class AlertDefinitionEntity(JSONObject):
|
|
407
|
+
"""
|
|
408
|
+
Represents an entity associated with an alert definition.
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
id: str = ""
|
|
412
|
+
label: str = ""
|
|
413
|
+
url: str = ""
|
|
414
|
+
_type: str = field(default="", metadata={"json_key": "type"})
|
|
415
|
+
|
|
416
|
+
|
|
390
417
|
class AlertDefinition(DerivedBase):
|
|
391
418
|
"""
|
|
392
419
|
Represents an alert definition for a monitor service.
|
|
@@ -406,12 +433,12 @@ class AlertDefinition(DerivedBase):
|
|
|
406
433
|
"severity": Property(mutable=True),
|
|
407
434
|
"type": Property(mutable=True),
|
|
408
435
|
"status": Property(mutable=True),
|
|
409
|
-
"has_more_resources": Property(
|
|
436
|
+
"has_more_resources": Property(), # Deprecated; use entities.has_more_resources.
|
|
410
437
|
"rule_criteria": Property(mutable=True, json_object=RuleCriteria),
|
|
411
438
|
"trigger_conditions": Property(
|
|
412
439
|
mutable=True, json_object=TriggerConditions
|
|
413
440
|
),
|
|
414
|
-
"alert_channels": Property(
|
|
441
|
+
"alert_channels": Property(json_object=AlertDefinitionChannel),
|
|
415
442
|
"created": Property(is_datetime=True),
|
|
416
443
|
"updated": Property(is_datetime=True),
|
|
417
444
|
"updated_by": Property(),
|
|
@@ -419,28 +446,12 @@ class AlertDefinition(DerivedBase):
|
|
|
419
446
|
"entity_ids": Property(mutable=True),
|
|
420
447
|
"description": Property(mutable=True),
|
|
421
448
|
"service_class": Property(alias_of="class"),
|
|
449
|
+
"scope": Property(AlertScope),
|
|
450
|
+
"regions": Property(mutable=True),
|
|
451
|
+
"entities": Property(json_object=AlertEntities),
|
|
422
452
|
}
|
|
423
453
|
|
|
424
454
|
|
|
425
|
-
@dataclass
|
|
426
|
-
class EmailChannelContent(JSONObject):
|
|
427
|
-
"""
|
|
428
|
-
Represents the content for an email alert channel.
|
|
429
|
-
"""
|
|
430
|
-
|
|
431
|
-
email_addresses: Optional[List[str]] = None
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
@dataclass
|
|
435
|
-
class ChannelContent(JSONObject):
|
|
436
|
-
"""
|
|
437
|
-
Represents the content block for an AlertChannel, which varies by channel type.
|
|
438
|
-
"""
|
|
439
|
-
|
|
440
|
-
email: Optional[EmailChannelContent] = None
|
|
441
|
-
# Other channel types like 'webhook', 'slack' could be added here as Optional fields.
|
|
442
|
-
|
|
443
|
-
|
|
444
455
|
@dataclass
|
|
445
456
|
class EmailDetails(JSONObject):
|
|
446
457
|
"""
|
|
@@ -481,7 +492,7 @@ class AlertChannel(Base):
|
|
|
481
492
|
fire. Alert channels define a destination and configuration for
|
|
482
493
|
notifications (for example: email lists, webhooks, PagerDuty, Slack, etc.).
|
|
483
494
|
|
|
484
|
-
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-
|
|
495
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-notification-channels
|
|
485
496
|
|
|
486
497
|
This class maps to the Monitor API's `/monitor/alert-channels` resource
|
|
487
498
|
and is used by the SDK to list, load, and inspect channels.
|
|
@@ -499,7 +510,6 @@ class AlertChannel(Base):
|
|
|
499
510
|
"channel_type": Property(),
|
|
500
511
|
"details": Property(mutable=False, json_object=ChannelDetails),
|
|
501
512
|
"alerts": Property(mutable=False, json_object=AlertInfo),
|
|
502
|
-
"content": Property(mutable=False, json_object=ChannelContent),
|
|
503
513
|
"created": Property(is_datetime=True),
|
|
504
514
|
"updated": Property(is_datetime=True),
|
|
505
515
|
"created_by": Property(),
|
|
@@ -188,6 +188,7 @@ test/fixtures/longview_plan.json
|
|
|
188
188
|
test/fixtures/longview_subscriptions.json
|
|
189
189
|
test/fixtures/maintenance_policies.json
|
|
190
190
|
test/fixtures/mongodb.json
|
|
191
|
+
test/fixtures/monitor_alert-channels.json
|
|
191
192
|
test/fixtures/monitor_alert-definitions.json
|
|
192
193
|
test/fixtures/monitor_dashboards.json
|
|
193
194
|
test/fixtures/monitor_dashboards_1.json
|
|
@@ -195,6 +196,7 @@ test/fixtures/monitor_services.json
|
|
|
195
196
|
test/fixtures/monitor_services_dbaas.json
|
|
196
197
|
test/fixtures/monitor_services_dbaas_alert-definitions.json
|
|
197
198
|
test/fixtures/monitor_services_dbaas_alert-definitions_12345.json
|
|
199
|
+
test/fixtures/monitor_services_dbaas_alert-definitions_12345_entities.json
|
|
198
200
|
test/fixtures/monitor_services_dbaas_dashboards.json
|
|
199
201
|
test/fixtures/monitor_services_dbaas_metric-definitions.json
|
|
200
202
|
test/fixtures/monitor_services_dbaas_metrics.json
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"id": 123,
|
|
5
|
+
"label": "alert notification channel",
|
|
6
|
+
"type": "user",
|
|
7
|
+
"channel_type": "email",
|
|
8
|
+
"details": {
|
|
9
|
+
"email": {
|
|
10
|
+
"usernames": [
|
|
11
|
+
"admin-user1",
|
|
12
|
+
"admin-user2"
|
|
13
|
+
],
|
|
14
|
+
"recipient_type": "user"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"alerts": {
|
|
18
|
+
"url": "/monitor/alert-channels/123/alerts",
|
|
19
|
+
"type": "alerts-definitions",
|
|
20
|
+
"alert_count": 0
|
|
21
|
+
},
|
|
22
|
+
"created": "2024-01-01T00:00:00",
|
|
23
|
+
"updated": "2024-01-01T00:00:00",
|
|
24
|
+
"created_by": "tester",
|
|
25
|
+
"updated_by": "tester"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"page": 1,
|
|
29
|
+
"pages": 1,
|
|
30
|
+
"results": 1
|
|
31
|
+
}
|
|
@@ -7,13 +7,26 @@
|
|
|
7
7
|
"severity": 1,
|
|
8
8
|
"type": "user",
|
|
9
9
|
"description": "A test alert for dbaas service",
|
|
10
|
+
"scope": "entity",
|
|
11
|
+
"regions": [],
|
|
10
12
|
"entity_ids": ["13217"],
|
|
11
|
-
"
|
|
13
|
+
"entities": {
|
|
14
|
+
"url": "/monitor/services/dbaas/alert-definitions/12345/entities",
|
|
15
|
+
"count": 1,
|
|
16
|
+
"has_more_resources": false
|
|
17
|
+
},
|
|
18
|
+
"alert_channels": [
|
|
19
|
+
{
|
|
20
|
+
"id": 10000,
|
|
21
|
+
"label": "Read-Write Channel",
|
|
22
|
+
"type": "email",
|
|
23
|
+
"url": "/monitor/alert-channels/10000"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
12
26
|
"has_more_resources": false,
|
|
13
27
|
"rule_criteria": null,
|
|
14
28
|
"trigger_conditions": null,
|
|
15
29
|
"class": "alert",
|
|
16
|
-
"notification_groups": [],
|
|
17
30
|
"status": "active",
|
|
18
31
|
"created": "2024-01-01T00:00:00",
|
|
19
32
|
"updated": "2024-01-01T00:00:00",
|
|
@@ -7,10 +7,24 @@
|
|
|
7
7
|
"severity": 1,
|
|
8
8
|
"type": "user",
|
|
9
9
|
"description": "A test alert for dbaas service",
|
|
10
|
+
"scope": "entity",
|
|
11
|
+
"regions": [],
|
|
10
12
|
"entity_ids": [
|
|
11
13
|
"13217"
|
|
12
14
|
],
|
|
13
|
-
"
|
|
15
|
+
"entities": {
|
|
16
|
+
"url": "/monitor/services/dbaas/alert-definitions/12345/entities",
|
|
17
|
+
"count": 1,
|
|
18
|
+
"has_more_resources": false
|
|
19
|
+
},
|
|
20
|
+
"alert_channels": [
|
|
21
|
+
{
|
|
22
|
+
"id": 10000,
|
|
23
|
+
"label": "Read-Write Channel",
|
|
24
|
+
"type": "email",
|
|
25
|
+
"url": "/monitor/alert-channels/10000"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
14
28
|
"has_more_resources": false,
|
|
15
29
|
"rule_criteria": {
|
|
16
30
|
"rules": [
|
|
@@ -39,7 +53,6 @@
|
|
|
39
53
|
"trigger_occurrences": 3
|
|
40
54
|
},
|
|
41
55
|
"class": "alert",
|
|
42
|
-
"notification_groups": [],
|
|
43
56
|
"status": "active",
|
|
44
57
|
"created": "2024-01-01T00:00:00",
|
|
45
58
|
"updated": "2024-01-01T00:00:00",
|
|
@@ -5,10 +5,24 @@
|
|
|
5
5
|
"severity": 1,
|
|
6
6
|
"type": "user",
|
|
7
7
|
"description": "A test alert for dbaas service",
|
|
8
|
+
"scope": "entity",
|
|
9
|
+
"regions": [],
|
|
8
10
|
"entity_ids": [
|
|
9
11
|
"13217"
|
|
10
12
|
],
|
|
11
|
-
"
|
|
13
|
+
"entities": {
|
|
14
|
+
"url": "/monitor/services/dbaas/alert-definitions/12345/entities",
|
|
15
|
+
"count": 1,
|
|
16
|
+
"has_more_resources": false
|
|
17
|
+
},
|
|
18
|
+
"alert_channels": [
|
|
19
|
+
{
|
|
20
|
+
"id": 10000,
|
|
21
|
+
"label": "Read-Write Channel",
|
|
22
|
+
"type": "email",
|
|
23
|
+
"url": "/monitor/alert-channels/10000"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
12
26
|
"has_more_resources": false,
|
|
13
27
|
"rule_criteria": {
|
|
14
28
|
"rules": [
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"id": "1",
|
|
5
|
+
"label": "mydatabase-1",
|
|
6
|
+
"url": "/v4/databases/mysql/instances/1",
|
|
7
|
+
"type": "dbaas"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "2",
|
|
11
|
+
"label": "mydatabase-2",
|
|
12
|
+
"url": "/v4/databases/mysql/instances/2",
|
|
13
|
+
"type": "dbaas"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "3",
|
|
17
|
+
"label": "mydatabase-3",
|
|
18
|
+
"url": "/v4/databases/mysql/instances/3",
|
|
19
|
+
"type": "dbaas"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"page": 1,
|
|
23
|
+
"pages": 1,
|
|
24
|
+
"results": 3
|
|
25
|
+
}
|
|
@@ -16,7 +16,6 @@ import requests
|
|
|
16
16
|
from requests.exceptions import ConnectionError, RequestException
|
|
17
17
|
|
|
18
18
|
from linode_api4 import (
|
|
19
|
-
ExplicitNullValue,
|
|
20
19
|
InterfaceGeneration,
|
|
21
20
|
LinodeInterfaceDefaultRouteOptions,
|
|
22
21
|
LinodeInterfaceOptions,
|
|
@@ -645,7 +644,7 @@ def linode_with_linode_interfaces(
|
|
|
645
644
|
public=LinodeInterfacePublicOptions(),
|
|
646
645
|
),
|
|
647
646
|
LinodeInterfaceOptions(
|
|
648
|
-
firewall_id=
|
|
647
|
+
firewall_id=e2e_test_firewall.id,
|
|
649
648
|
vpc=LinodeInterfaceVPCOptions(
|
|
650
649
|
subnet_id=subnet.id,
|
|
651
650
|
),
|
|
@@ -7,9 +7,10 @@ from test.integration.helpers import (
|
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
|
-
from linode_api4 import LinodeClient
|
|
10
|
+
from linode_api4 import LinodeClient, PaginatedList
|
|
11
11
|
from linode_api4.objects import (
|
|
12
12
|
AlertDefinition,
|
|
13
|
+
AlertDefinitionEntity,
|
|
13
14
|
ApiError,
|
|
14
15
|
MonitorDashboard,
|
|
15
16
|
MonitorMetricsDefinition,
|
|
@@ -256,12 +257,14 @@ def test_integration_create_get_update_delete_alert_definition(
|
|
|
256
257
|
|
|
257
258
|
assert created.id
|
|
258
259
|
assert getattr(created, "label", None) == label
|
|
260
|
+
assert getattr(created, "entities", None) is not None
|
|
259
261
|
|
|
260
262
|
created = wait_for_alert_ready(created.id, service_type)
|
|
261
263
|
|
|
262
264
|
updated = client.load(AlertDefinition, created.id, service_type)
|
|
263
265
|
updated.label = f"{label}-updated"
|
|
264
266
|
updated.save()
|
|
267
|
+
assert getattr(updated, "entities", None) is not None
|
|
265
268
|
|
|
266
269
|
updated = wait_for_alert_ready(updated.id, service_type)
|
|
267
270
|
|
|
@@ -275,3 +278,36 @@ def test_integration_create_get_update_delete_alert_definition(
|
|
|
275
278
|
AlertDefinition, created.id, service_type
|
|
276
279
|
)
|
|
277
280
|
delete_alert.delete()
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def test_alert_definition_entities(test_linode_client):
|
|
284
|
+
"""Test listing entities associated with an alert definition.
|
|
285
|
+
|
|
286
|
+
This test first retrieves alert definitions for a service type, then lists entities for the first alert definition.
|
|
287
|
+
It asserts that the returned entities have expected fields.
|
|
288
|
+
"""
|
|
289
|
+
client = test_linode_client
|
|
290
|
+
service_type = "dbaas"
|
|
291
|
+
|
|
292
|
+
alert_definitions = client.monitor.alert_definitions(
|
|
293
|
+
service_type=service_type
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
if len(alert_definitions) == 0:
|
|
297
|
+
pytest.fail("No alert definitions available for dbaas service type")
|
|
298
|
+
|
|
299
|
+
assert getattr(alert_definitions[0], "entities", None) is not None
|
|
300
|
+
|
|
301
|
+
alert_def = alert_definitions[0]
|
|
302
|
+
entities = client.monitor.alert_definition_entities(
|
|
303
|
+
service_type, alert_def.id
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
assert isinstance(entities, PaginatedList)
|
|
307
|
+
if len(entities) > 0:
|
|
308
|
+
entity = entities[0]
|
|
309
|
+
assert isinstance(entity, AlertDefinitionEntity)
|
|
310
|
+
assert entity.id
|
|
311
|
+
assert entity.label
|
|
312
|
+
assert entity.url
|
|
313
|
+
assert entity._type == service_type
|
|
@@ -4,6 +4,8 @@ from linode_api4 import PaginatedList
|
|
|
4
4
|
from linode_api4.objects import (
|
|
5
5
|
AggregateFunction,
|
|
6
6
|
AlertDefinition,
|
|
7
|
+
AlertDefinitionChannel,
|
|
8
|
+
AlertDefinitionEntity,
|
|
7
9
|
EntityMetricOptions,
|
|
8
10
|
)
|
|
9
11
|
|
|
@@ -71,6 +73,20 @@ class MonitorAlertDefinitionsTest(ClientBaseCase):
|
|
|
71
73
|
# assert collection and element types
|
|
72
74
|
assert isinstance(alert, PaginatedList)
|
|
73
75
|
assert isinstance(alert[0], AlertDefinition)
|
|
76
|
+
assert alert[0].scope == "entity"
|
|
77
|
+
assert alert[0].regions == []
|
|
78
|
+
assert alert[0].entities.url.endswith(
|
|
79
|
+
"/alert-definitions/12345/entities"
|
|
80
|
+
)
|
|
81
|
+
assert alert[0].entities.count == 1
|
|
82
|
+
assert alert[0].entities.has_more_resources is False
|
|
83
|
+
assert isinstance(alert[0].alert_channels, list)
|
|
84
|
+
assert len(alert[0].alert_channels) == 1
|
|
85
|
+
assert isinstance(
|
|
86
|
+
alert[0].alert_channels[0], AlertDefinitionChannel
|
|
87
|
+
)
|
|
88
|
+
assert alert[0].alert_channels[0].id == 10000
|
|
89
|
+
assert alert[0].alert_channels[0]._type == "email"
|
|
74
90
|
|
|
75
91
|
# fetch the raw JSON from the client and assert its fields
|
|
76
92
|
raw = self.client.get(url)
|
|
@@ -90,6 +106,11 @@ class MonitorAlertDefinitionsTest(ClientBaseCase):
|
|
|
90
106
|
"service_type": service_type,
|
|
91
107
|
"severity": 1,
|
|
92
108
|
"status": "active",
|
|
109
|
+
"entities": {
|
|
110
|
+
"url": f"/monitor/services/dbaas/alert-definitions/67890/entities",
|
|
111
|
+
"count": 1,
|
|
112
|
+
"has_more_resources": False,
|
|
113
|
+
},
|
|
93
114
|
}
|
|
94
115
|
|
|
95
116
|
with self.mock_post(result) as mock_post:
|
|
@@ -100,6 +121,8 @@ class MonitorAlertDefinitionsTest(ClientBaseCase):
|
|
|
100
121
|
channel_ids=[1, 2],
|
|
101
122
|
rule_criteria={"rules": []},
|
|
102
123
|
trigger_conditions={"criteria_condition": "ALL"},
|
|
124
|
+
scope="entity",
|
|
125
|
+
regions=[],
|
|
103
126
|
entity_ids=["13217"],
|
|
104
127
|
description="created via test",
|
|
105
128
|
)
|
|
@@ -109,10 +132,51 @@ class MonitorAlertDefinitionsTest(ClientBaseCase):
|
|
|
109
132
|
assert mock_post.call_data["label"] == "Created Alert"
|
|
110
133
|
assert mock_post.call_data["severity"] == 1
|
|
111
134
|
assert "channel_ids" in mock_post.call_data
|
|
135
|
+
assert mock_post.call_data["scope"] == "entity"
|
|
136
|
+
assert mock_post.call_data["regions"] == []
|
|
112
137
|
|
|
113
138
|
assert isinstance(alert, AlertDefinition)
|
|
114
139
|
assert alert.id == 67890
|
|
140
|
+
assert alert.entities.url.endswith(
|
|
141
|
+
"/alert-definitions/67890/entities"
|
|
142
|
+
)
|
|
143
|
+
assert alert.entities.count == 1
|
|
144
|
+
assert alert.entities.has_more_resources is False
|
|
115
145
|
|
|
116
146
|
# fetch the same response from the client and assert
|
|
117
147
|
resp = self.client.post(url, data={})
|
|
118
148
|
assert resp["label"] == "Created Alert"
|
|
149
|
+
|
|
150
|
+
def test_alert_definition_entities(self):
|
|
151
|
+
service_type = "dbaas"
|
|
152
|
+
id = 12345
|
|
153
|
+
url = (
|
|
154
|
+
f"/monitor/services/{service_type}/alert-definitions/{id}/entities"
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
with self.mock_get(url) as mock_get:
|
|
158
|
+
entities = self.client.monitor.alert_definition_entities(
|
|
159
|
+
service_type, id
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
assert mock_get.call_url == url
|
|
163
|
+
assert isinstance(entities, PaginatedList)
|
|
164
|
+
assert len(entities) == 3
|
|
165
|
+
|
|
166
|
+
assert isinstance(entities[0], AlertDefinitionEntity)
|
|
167
|
+
assert entities[0].id == "1"
|
|
168
|
+
assert entities[0].label == "mydatabase-1"
|
|
169
|
+
assert entities[0].url == "/v4/databases/mysql/instances/1"
|
|
170
|
+
assert entities[0]._type == "dbaas"
|
|
171
|
+
|
|
172
|
+
assert isinstance(entities[1], AlertDefinitionEntity)
|
|
173
|
+
assert entities[1].id == "2"
|
|
174
|
+
assert entities[1].label == "mydatabase-2"
|
|
175
|
+
assert entities[1].url == "/v4/databases/mysql/instances/2"
|
|
176
|
+
assert entities[1]._type == "dbaas"
|
|
177
|
+
|
|
178
|
+
assert isinstance(entities[2], AlertDefinitionEntity)
|
|
179
|
+
assert entities[2].id == "3"
|
|
180
|
+
assert entities[2].label == "mydatabase-3"
|
|
181
|
+
assert entities[2].url == "/v4/databases/mysql/instances/3"
|
|
182
|
+
assert entities[2]._type == "dbaas"
|