linode-api4 5.40.0__tar.gz → 5.42.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.40.0/linode_api4.egg-info → linode_api4-5.42.0}/PKG-INFO +4 -3
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/common.py +4 -4
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/linode.py +4 -3
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/profile.py +4 -4
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/region.py +35 -1
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/database.py +0 -115
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/linode.py +111 -53
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/lke.py +8 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/nodebalancer.py +7 -5
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/region.py +38 -0
- linode_api4-5.42.0/linode_api4/util.py +62 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/version.py +1 -1
- {linode_api4-5.40.0 → linode_api4-5.42.0/linode_api4.egg-info}/PKG-INFO +4 -3
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4.egg-info/SOURCES.txt +4 -4
- {linode_api4-5.40.0 → linode_api4-5.42.0}/pyproject.toml +4 -3
- linode_api4-5.42.0/test/fixtures/regions_us-east_vpc-availability.json +5 -0
- linode_api4-5.42.0/test/fixtures/regions_vpc-availability.json +132 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/database/test_database.py +7 -1
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/database/test_database_engine_config.py +1 -1
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/linode/test_linode.py +9 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/lke/test_lke.py +15 -0
- linode_api4-5.42.0/test/integration/models/region/test_region.py +62 -0
- linode_api4-5.42.0/test/integration/models/volume/test_blockstorage.py +67 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/vpc/test_vpc.py +1 -1
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/region_test.py +27 -3
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/database_test.py +0 -115
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/linode_test.py +41 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/region_test.py +12 -0
- linode_api4-5.42.0/test/unit/util_test.py +174 -0
- linode_api4-5.40.0/linode_api4/util.py +0 -29
- linode_api4-5.40.0/test/fixtures/databases_mysql_instances_123_backups.json +0 -13
- linode_api4-5.40.0/test/fixtures/databases_mysql_instances_123_backups_456_restore.json +0 -1
- linode_api4-5.40.0/test/fixtures/databases_postgresql_instances_123_backups.json +0 -13
- linode_api4-5.40.0/test/fixtures/databases_postgresql_instances_123_backups_456_restore.json +0 -1
- linode_api4-5.40.0/test/unit/util_test.py +0 -55
- {linode_api4-5.40.0 → linode_api4-5.42.0}/LICENSE +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/MANIFEST.in +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/README.rst +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/examples/install-on-linode/app.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/examples/install-on-linode/make_stackscript.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/errors.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/account.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/beta.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/database.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/domain.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/group.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/image.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/image_share_group.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/lke.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/lke_tier.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/lock.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/longview.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/maintenance.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/monitor.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/monitor_api.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/networking.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/nodebalancer.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/object_storage.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/placement.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/polling.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/support.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/tag.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/volume.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/groups/vpc.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/linode_client.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/login_client.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/account.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/base.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/beta.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/dbase.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/domain.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/filtering.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/image.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/image_share_group.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/linode_interfaces.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/lock.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/longview.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/monitor.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/monitor_api.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/networking.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/object_storage.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/placement.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/profile.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/serializable.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/support.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/tag.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/volume.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/objects/vpc.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/paginated_list.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4/polling.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4.egg-info/dependency_links.txt +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4.egg-info/requires.txt +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/linode_api4.egg-info/top_level.txt +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/setup.cfg +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/setup.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_availability.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_availability_us-east.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_betas.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_betas_cool.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_child-accounts.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_child-accounts_123456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_child-accounts_123456_token.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_events_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_invoices.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_invoices_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_invoices_123456_items.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_logins.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_logins_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_maintenance.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_notifications.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_oauth-clients_2737bf16b39ab5d7b4a1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_payment-method_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_payment-methods.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_payments.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_promo-codes.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_service-transfers.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_service-transfers_12345.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_settings.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_transfer.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/account_users_test-user.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/betas.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/betas_active.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_engines.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_instances.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_config.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances_123_credentials.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances_123_credentials_reset.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances_123_patch.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances_123_resume.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances_123_ssl.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_mysql_instances_123_suspend.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_config.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances_123_credentials.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances_123_credentials_reset.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances_123_patch.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances_123_resume.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances_123_ssl.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_postgresql_instances_123_suspend.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/databases_types.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/domains.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/domains_12345_clone.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/domains_12345_records.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/domains_12345_zone-file.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/domains_import.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_private_1234_sharegroups.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_private_123_regions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_private_1337.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_1234.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_1234_images.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_1234_images_shared_1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_1234_members.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_1234_members_abc123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_tokens.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_tokens_abc123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_tokens_abc123_sharegroup.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_sharegroups_tokens_abc123_sharegroup_images.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/images_upload.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_backups.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs_456789.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs_456789_interfaces.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_123_put.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_321.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_disks.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_disks_12345_clone.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_firewalls.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_ips.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_nodebalancers.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_transfer.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_transfer_2023_4.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_123_volumes.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_interfaces.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_interfaces_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_interfaces_123_firewalls.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_interfaces_456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_interfaces_789.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_interfaces_settings.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_instances_124_upgrade-interfaces.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_stackscripts_10079.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_types.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/linode_types_g6-nanode-1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18881.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18881_control__plane__acl.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18881_dashboard.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18881_nodes_123456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18881_pools_456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18882.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_clusters_18882_pools_789.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_tiers_standard_versions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_types.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/lke_versions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/locks.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/locks_1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/longview_clients.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/longview_plan.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/longview_subscriptions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/maintenance_policies.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/mongodb.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_alert-definitions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_dashboards.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_dashboards_1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas_alert-definitions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas_alert-definitions_12345.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas_dashboards.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas_metric-definitions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas_metrics.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_dbaas_token.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/monitor_services_linode_token.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/network-transfer_prices.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123_devices.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123_devices_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123_devices_456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123_history.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123_history_rules_2.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_123_rules.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_settings.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_templates.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_templates_public.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_firewalls_templates_vpc.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_ips_127.0.0.1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_ipv6_pools.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_ipv6_ranges.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_ipv6_ranges_2600%3A3c01%3A%3A.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/networking_vlans.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_123456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_123456_configs.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_123456_configs_65432_nodes.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_12345_configs_4567_rebuild.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_12345_firewalls.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_12345_stats.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/nodebalancers_types.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east-1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-acl.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-list.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-url.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_ssl.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_buckets_us-east_example-bucket_access.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_clusters.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_keys.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_quotas.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_quotas_obj-objects-us-ord-1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_quotas_obj-objects-us-ord-1_usage.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_transfer.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/object-storage_types.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/placement_groups.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/placement_groups_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_device_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_devices.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_logins.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_logins_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_preferences.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_security-questions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/profile_sshkeys.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/regions.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/regions_availability.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/regions_us-east_availability.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/support_tickets_123.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/tags.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/tags_nothing.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/tags_something.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/testmappedobj1.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/volumes.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/volumes_types.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/vpcs.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/vpcs_123456.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/vpcs_123456_ips.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/vpcs_123456_subnets.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/vpcs_123456_subnets_789.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/fixtures/vpcs_ips.json +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/conftest.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/filters/fixtures.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/filters/model_filters_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/helpers.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/linode_client/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/linode_client/test_errors.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/linode_client/test_linode_client.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/linode_client/test_retry.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/login_client/test_login_client.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/account/test_account.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/database/helpers.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/domain/test_domain.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/firewall/test_firewall.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/firewall/test_firewall_templates.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/image/test_image.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/linode/interfaces/test_interfaces.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/lock/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/lock/test_lock.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/longview/test_longview.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/maintenance/test_maintenance.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/monitor/test_monitor.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/monitor_api/test_monitor_api.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/networking/test_networking.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/nodebalancer/test_nodebalancer.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/object_storage/test_obj.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/object_storage/test_obj_quotas.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/placement/test_placement.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/profile/test_profile.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/sharegroups/test_sharegroups.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/tag/test_tag.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/integration/models/volume/test_volume.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/base.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/errors_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/fixtures.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/__init__.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/database_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/image_share_group_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/image_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/linode_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/lke_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/lke_tier_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/lock_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/monitor_api_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/networking_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/object_storage_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/placement_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/polling_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/groups/vpc_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/linode_client_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/login_client_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/account_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/base_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/beta_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/domain_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/firewall_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/image_share_group_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/image_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/linode_interface_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/lke_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/lock_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/longview_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/mapped_object_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/monitor_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/networking_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/nodebalancers_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/object_storage_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/placement_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/profile_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/property_alias_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/serializable_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/support_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/tag_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/volume_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/objects/vpc_test.py +0 -0
- {linode_api4-5.40.0 → linode_api4-5.42.0}/test/unit/paginated_list_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linode_api4
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.42.0
|
|
4
4
|
Summary: The official Python SDK for Linode API v4
|
|
5
5
|
Author-email: Linode <devs@linode.com>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -14,11 +14,12 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
14
14
|
Classifier: License :: OSI Approved :: BSD License
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Requires-Python: >=3.10
|
|
22
23
|
Description-Content-Type: text/x-rst
|
|
23
24
|
License-File: LICENSE
|
|
24
25
|
Requires-Dist: requests
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from dataclasses import dataclass
|
|
2
|
+
from pathlib import Path
|
|
3
3
|
|
|
4
4
|
from linode_api4.objects import JSONObject
|
|
5
5
|
|
|
@@ -47,9 +47,9 @@ def load_and_validate_keys(authorized_keys):
|
|
|
47
47
|
ret.append(k)
|
|
48
48
|
else:
|
|
49
49
|
# it doesn't appear to be a key.. is it a path to the key?
|
|
50
|
-
|
|
51
|
-
if
|
|
52
|
-
with open(
|
|
50
|
+
k_path = Path(k).expanduser()
|
|
51
|
+
if k_path.is_file():
|
|
52
|
+
with open(k_path) as f:
|
|
53
53
|
ret.append(f.read().rstrip())
|
|
54
54
|
else:
|
|
55
55
|
raise ValueError(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import base64
|
|
2
|
-
import
|
|
2
|
+
from pathlib import Path
|
|
3
3
|
from typing import Any, Dict, List, Optional, Union
|
|
4
4
|
|
|
5
5
|
from linode_api4.common import load_and_validate_keys
|
|
@@ -457,8 +457,9 @@ class LinodeGroup(Group):
|
|
|
457
457
|
script_body = script
|
|
458
458
|
if not script.startswith("#!"):
|
|
459
459
|
# it doesn't look like a stackscript body, let's see if it's a file
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
script_path = Path(script)
|
|
461
|
+
if script_path.is_file():
|
|
462
|
+
with open(script_path) as f:
|
|
462
463
|
script_body = f.read()
|
|
463
464
|
else:
|
|
464
465
|
raise ValueError(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from datetime import datetime
|
|
2
|
+
from pathlib import Path
|
|
3
3
|
|
|
4
4
|
from linode_api4 import UnexpectedResponseError
|
|
5
5
|
from linode_api4.common import SSH_KEY_TYPES
|
|
@@ -322,9 +322,9 @@ class ProfileGroup(Group):
|
|
|
322
322
|
"""
|
|
323
323
|
if not key.startswith(SSH_KEY_TYPES):
|
|
324
324
|
# this might be a file path - look for it
|
|
325
|
-
|
|
326
|
-
if
|
|
327
|
-
with open(
|
|
325
|
+
key_path = Path(key).expanduser()
|
|
326
|
+
if key_path.is_file():
|
|
327
|
+
with open(key_path) as f:
|
|
328
328
|
key = f.read().strip()
|
|
329
329
|
if not key.startswith(SSH_KEY_TYPES):
|
|
330
330
|
raise ValueError("Invalid SSH Public Key")
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
from linode_api4.groups import Group
|
|
2
2
|
from linode_api4.objects import Region
|
|
3
|
-
from linode_api4.objects.region import
|
|
3
|
+
from linode_api4.objects.region import (
|
|
4
|
+
RegionAvailabilityEntry,
|
|
5
|
+
RegionVPCAvailability,
|
|
6
|
+
)
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
class RegionGroup(Group):
|
|
@@ -43,3 +46,34 @@ class RegionGroup(Group):
|
|
|
43
46
|
return self.client._get_and_filter(
|
|
44
47
|
RegionAvailabilityEntry, *filters, endpoint="/regions/availability"
|
|
45
48
|
)
|
|
49
|
+
|
|
50
|
+
def vpc_availability(self, *filters):
|
|
51
|
+
"""
|
|
52
|
+
Returns VPC availability data for all regions.
|
|
53
|
+
|
|
54
|
+
NOTE: IPv6 VPCs may not currently be available to all users.
|
|
55
|
+
|
|
56
|
+
This endpoint supports pagination with the following parameters:
|
|
57
|
+
- page: Page number (>= 1)
|
|
58
|
+
- page_size: Number of items per page (25-500)
|
|
59
|
+
|
|
60
|
+
Pagination is handled automatically by PaginatedList. To configure page_size,
|
|
61
|
+
set it when creating the LinodeClient:
|
|
62
|
+
|
|
63
|
+
client = LinodeClient(token, page_size=100)
|
|
64
|
+
|
|
65
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-regions-vpc-availability
|
|
66
|
+
|
|
67
|
+
:param filters: Any number of filters to apply to this query.
|
|
68
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
|
|
69
|
+
for more details on filtering.
|
|
70
|
+
|
|
71
|
+
:returns: A list of VPC availability data for regions.
|
|
72
|
+
:rtype: PaginatedList of RegionVPCAvailability
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
return self.client._get_and_filter(
|
|
76
|
+
RegionVPCAvailability,
|
|
77
|
+
*filters,
|
|
78
|
+
endpoint="/regions/vpc-availability",
|
|
79
|
+
)
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
from dataclasses import dataclass, field
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
|
-
from deprecated import deprecated
|
|
5
|
-
|
|
6
4
|
from linode_api4.objects import (
|
|
7
5
|
Base,
|
|
8
|
-
DerivedBase,
|
|
9
6
|
JSONObject,
|
|
10
7
|
MappedObject,
|
|
11
8
|
Property,
|
|
@@ -86,69 +83,6 @@ class DatabasePrivateNetwork(JSONObject):
|
|
|
86
83
|
public_access: Optional[bool] = None
|
|
87
84
|
|
|
88
85
|
|
|
89
|
-
@deprecated(
|
|
90
|
-
reason="Backups are not supported for non-legacy database clusters."
|
|
91
|
-
)
|
|
92
|
-
class DatabaseBackup(DerivedBase):
|
|
93
|
-
"""
|
|
94
|
-
A generic Managed Database backup.
|
|
95
|
-
|
|
96
|
-
This class is not intended to be used on its own.
|
|
97
|
-
Use the appropriate subclasses for the corresponding database engine. (e.g. MySQLDatabaseBackup)
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
api_endpoint = ""
|
|
101
|
-
derived_url_path = "backups"
|
|
102
|
-
parent_id_name = "database_id"
|
|
103
|
-
|
|
104
|
-
properties = {
|
|
105
|
-
"created": Property(is_datetime=True),
|
|
106
|
-
"id": Property(identifier=True),
|
|
107
|
-
"label": Property(),
|
|
108
|
-
"type": Property(),
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
def restore(self):
|
|
112
|
-
"""
|
|
113
|
-
Restore a backup to a Managed Database on your Account.
|
|
114
|
-
|
|
115
|
-
API Documentation:
|
|
116
|
-
|
|
117
|
-
- MySQL: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instance-backup-restore
|
|
118
|
-
- PostgreSQL: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instance-backup-restore
|
|
119
|
-
"""
|
|
120
|
-
|
|
121
|
-
return self._client.post(
|
|
122
|
-
"{}/restore".format(self.api_endpoint), model=self
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
@deprecated(
|
|
127
|
-
reason="Backups are not supported for non-legacy database clusters."
|
|
128
|
-
)
|
|
129
|
-
class MySQLDatabaseBackup(DatabaseBackup):
|
|
130
|
-
"""
|
|
131
|
-
A backup for an accessible Managed MySQL Database.
|
|
132
|
-
|
|
133
|
-
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance-backup
|
|
134
|
-
"""
|
|
135
|
-
|
|
136
|
-
api_endpoint = "/databases/mysql/instances/{database_id}/backups/{id}"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
@deprecated(
|
|
140
|
-
reason="Backups are not supported for non-legacy database clusters."
|
|
141
|
-
)
|
|
142
|
-
class PostgreSQLDatabaseBackup(DatabaseBackup):
|
|
143
|
-
"""
|
|
144
|
-
A backup for an accessible Managed PostgreSQL Database.
|
|
145
|
-
|
|
146
|
-
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgresql-instance-backup
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
api_endpoint = "/databases/postgresql/instances/{database_id}/backups/{id}"
|
|
150
|
-
|
|
151
|
-
|
|
152
86
|
@dataclass
|
|
153
87
|
class MySQLDatabaseConfigMySQLOptions(JSONObject):
|
|
154
88
|
"""
|
|
@@ -296,7 +230,6 @@ class MySQLDatabase(Base):
|
|
|
296
230
|
"id": Property(identifier=True),
|
|
297
231
|
"label": Property(mutable=True),
|
|
298
232
|
"allow_list": Property(mutable=True, unordered=True),
|
|
299
|
-
"backups": Property(derived_class=MySQLDatabaseBackup),
|
|
300
233
|
"cluster_size": Property(mutable=True),
|
|
301
234
|
"created": Property(is_datetime=True),
|
|
302
235
|
"encrypted": Property(),
|
|
@@ -304,7 +237,6 @@ class MySQLDatabase(Base):
|
|
|
304
237
|
"hosts": Property(),
|
|
305
238
|
"port": Property(),
|
|
306
239
|
"region": Property(),
|
|
307
|
-
"replication_type": Property(),
|
|
308
240
|
"ssl_connection": Property(),
|
|
309
241
|
"status": Property(volatile=True),
|
|
310
242
|
"type": Property(mutable=True),
|
|
@@ -393,28 +325,6 @@ class MySQLDatabase(Base):
|
|
|
393
325
|
"{}/patch".format(MySQLDatabase.api_endpoint), model=self
|
|
394
326
|
)
|
|
395
327
|
|
|
396
|
-
@deprecated(
|
|
397
|
-
reason="Backups are not supported for non-legacy database clusters."
|
|
398
|
-
)
|
|
399
|
-
def backup_create(self, label, **kwargs):
|
|
400
|
-
"""
|
|
401
|
-
Creates a snapshot backup of a Managed MySQL Database.
|
|
402
|
-
|
|
403
|
-
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instance-backup
|
|
404
|
-
"""
|
|
405
|
-
|
|
406
|
-
params = {
|
|
407
|
-
"label": label,
|
|
408
|
-
}
|
|
409
|
-
params.update(kwargs)
|
|
410
|
-
|
|
411
|
-
self._client.post(
|
|
412
|
-
"{}/backups".format(MySQLDatabase.api_endpoint),
|
|
413
|
-
model=self,
|
|
414
|
-
data=params,
|
|
415
|
-
)
|
|
416
|
-
self.invalidate()
|
|
417
|
-
|
|
418
328
|
def invalidate(self):
|
|
419
329
|
"""
|
|
420
330
|
Clear out cached properties.
|
|
@@ -464,7 +374,6 @@ class PostgreSQLDatabase(Base):
|
|
|
464
374
|
"id": Property(identifier=True),
|
|
465
375
|
"label": Property(mutable=True),
|
|
466
376
|
"allow_list": Property(mutable=True, unordered=True),
|
|
467
|
-
"backups": Property(derived_class=PostgreSQLDatabaseBackup),
|
|
468
377
|
"cluster_size": Property(mutable=True),
|
|
469
378
|
"created": Property(is_datetime=True),
|
|
470
379
|
"encrypted": Property(),
|
|
@@ -472,8 +381,6 @@ class PostgreSQLDatabase(Base):
|
|
|
472
381
|
"hosts": Property(),
|
|
473
382
|
"port": Property(),
|
|
474
383
|
"region": Property(),
|
|
475
|
-
"replication_commit_type": Property(),
|
|
476
|
-
"replication_type": Property(),
|
|
477
384
|
"ssl_connection": Property(),
|
|
478
385
|
"status": Property(volatile=True),
|
|
479
386
|
"type": Property(mutable=True),
|
|
@@ -563,28 +470,6 @@ class PostgreSQLDatabase(Base):
|
|
|
563
470
|
"{}/patch".format(PostgreSQLDatabase.api_endpoint), model=self
|
|
564
471
|
)
|
|
565
472
|
|
|
566
|
-
@deprecated(
|
|
567
|
-
reason="Backups are not supported for non-legacy database clusters."
|
|
568
|
-
)
|
|
569
|
-
def backup_create(self, label, **kwargs):
|
|
570
|
-
"""
|
|
571
|
-
Creates a snapshot backup of a Managed PostgreSQL Database.
|
|
572
|
-
|
|
573
|
-
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instance-backup
|
|
574
|
-
"""
|
|
575
|
-
|
|
576
|
-
params = {
|
|
577
|
-
"label": label,
|
|
578
|
-
}
|
|
579
|
-
params.update(kwargs)
|
|
580
|
-
|
|
581
|
-
self._client.post(
|
|
582
|
-
"{}/backups".format(PostgreSQLDatabase.api_endpoint),
|
|
583
|
-
model=self,
|
|
584
|
-
data=params,
|
|
585
|
-
)
|
|
586
|
-
self.invalidate()
|
|
587
|
-
|
|
588
473
|
def invalidate(self):
|
|
589
474
|
"""
|
|
590
475
|
Clear out cached properties.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import copy
|
|
2
4
|
import string
|
|
3
5
|
import sys
|
|
@@ -40,9 +42,16 @@ from linode_api4.objects.region import Region
|
|
|
40
42
|
from linode_api4.objects.serializable import JSONObject, StrEnum
|
|
41
43
|
from linode_api4.objects.vpc import VPC, VPCSubnet
|
|
42
44
|
from linode_api4.paginated_list import PaginatedList
|
|
43
|
-
from linode_api4.util import
|
|
45
|
+
from linode_api4.util import (
|
|
46
|
+
drop_null_keys,
|
|
47
|
+
generate_device_suffixes,
|
|
48
|
+
normalize_as_list,
|
|
49
|
+
)
|
|
44
50
|
|
|
45
51
|
PASSWORD_CHARS = string.ascii_letters + string.digits + string.punctuation
|
|
52
|
+
MIN_DEVICE_LIMIT = 8
|
|
53
|
+
MB_PER_GB = 1024
|
|
54
|
+
MAX_DEVICE_LIMIT = 64
|
|
46
55
|
|
|
47
56
|
|
|
48
57
|
class InstanceDiskEncryptionType(StrEnum):
|
|
@@ -1243,14 +1252,14 @@ class Instance(Base):
|
|
|
1243
1252
|
# create derived objects
|
|
1244
1253
|
def config_create(
|
|
1245
1254
|
self,
|
|
1246
|
-
kernel=None,
|
|
1247
|
-
label=None,
|
|
1248
|
-
devices
|
|
1249
|
-
disks
|
|
1250
|
-
volumes
|
|
1251
|
-
interfaces
|
|
1255
|
+
kernel: Kernel | str | None = None,
|
|
1256
|
+
label: str | None = None,
|
|
1257
|
+
devices: "Disk | Volume | dict[str, Any] | list[Disk | Volume | dict[str, Any]] | None" = None,
|
|
1258
|
+
disks: Disk | int | list[Disk | int] | None = None,
|
|
1259
|
+
volumes: "Volume | int | list[Volume | int] | None" = None,
|
|
1260
|
+
interfaces: list[ConfigInterface | dict[str, Any]] | None = None,
|
|
1252
1261
|
**kwargs,
|
|
1253
|
-
):
|
|
1262
|
+
) -> Config:
|
|
1254
1263
|
"""
|
|
1255
1264
|
Creates a Linode Config with the given attributes.
|
|
1256
1265
|
|
|
@@ -1260,10 +1269,13 @@ class Instance(Base):
|
|
|
1260
1269
|
:param label: The config label
|
|
1261
1270
|
:param disks: The list of disks, starting at sda, to map to this config.
|
|
1262
1271
|
:param volumes: The volumes, starting after the last disk, to map to this
|
|
1263
|
-
|
|
1272
|
+
config.
|
|
1264
1273
|
:param devices: A list of devices to assign to this config, in device
|
|
1265
|
-
|
|
1266
|
-
|
|
1274
|
+
index order, a raw device mapping dict to pass directly to the API
|
|
1275
|
+
(e.g. ``{"sda": {"disk_id": 123}, "sdb": Volume(...)}``), or
|
|
1276
|
+
a single Disk or Volume.
|
|
1277
|
+
If this is given, you may not include disks or volumes.
|
|
1278
|
+
:param interfaces: A list of ConfigInterface objects or dicts to assign to this config.
|
|
1267
1279
|
:param **kwargs: Any other arguments accepted by the api.
|
|
1268
1280
|
|
|
1269
1281
|
:returns: A new Linode Config
|
|
@@ -1271,56 +1283,99 @@ class Instance(Base):
|
|
|
1271
1283
|
# needed here to avoid circular imports
|
|
1272
1284
|
from .volume import Volume # pylint: disable=import-outside-toplevel
|
|
1273
1285
|
|
|
1286
|
+
interfaces = [] if interfaces is None else interfaces
|
|
1287
|
+
|
|
1274
1288
|
hypervisor_prefix = "sd" if self.hypervisor == "kvm" else "xvd"
|
|
1289
|
+
|
|
1290
|
+
device_limit = int(
|
|
1291
|
+
max(
|
|
1292
|
+
MIN_DEVICE_LIMIT,
|
|
1293
|
+
min(self.specs.memory // MB_PER_GB, MAX_DEVICE_LIMIT),
|
|
1294
|
+
)
|
|
1295
|
+
)
|
|
1296
|
+
|
|
1275
1297
|
device_names = [
|
|
1276
|
-
hypervisor_prefix +
|
|
1298
|
+
hypervisor_prefix + suffix
|
|
1299
|
+
for suffix in generate_device_suffixes(device_limit)
|
|
1277
1300
|
]
|
|
1278
|
-
device_map = {
|
|
1279
|
-
device_names[i]: None for i in range(0, len(device_names))
|
|
1280
|
-
}
|
|
1281
1301
|
|
|
1302
|
+
def _flatten_device(device: Disk | Volume | dict | None):
|
|
1303
|
+
if device is None:
|
|
1304
|
+
return None
|
|
1305
|
+
elif isinstance(device, Disk):
|
|
1306
|
+
return {"disk_id": device.id}
|
|
1307
|
+
elif isinstance(device, Volume):
|
|
1308
|
+
return {"volume_id": device.id}
|
|
1309
|
+
elif isinstance(device, dict):
|
|
1310
|
+
return device
|
|
1311
|
+
|
|
1312
|
+
raise TypeError("Disk, Volume, or dict expected!")
|
|
1313
|
+
|
|
1314
|
+
def _device_entry(device: Disk | Volume | int, key: str):
|
|
1315
|
+
if isinstance(device, (Disk, Volume)):
|
|
1316
|
+
return _flatten_device(device)
|
|
1317
|
+
|
|
1318
|
+
try:
|
|
1319
|
+
device_id = int(device)
|
|
1320
|
+
except (TypeError, ValueError):
|
|
1321
|
+
raise TypeError(
|
|
1322
|
+
"Disk, Volume, or integer ID expected!"
|
|
1323
|
+
) from None
|
|
1324
|
+
|
|
1325
|
+
return {key: device_id}
|
|
1326
|
+
|
|
1327
|
+
def _build_devices():
|
|
1328
|
+
# Devices is a dict, flatten and pass through
|
|
1329
|
+
if isinstance(devices, dict):
|
|
1330
|
+
return {
|
|
1331
|
+
k: (
|
|
1332
|
+
_flatten_device(v)
|
|
1333
|
+
if isinstance(v, (Disk, Volume))
|
|
1334
|
+
else v
|
|
1335
|
+
)
|
|
1336
|
+
for k, v in devices.items()
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
device_list = []
|
|
1340
|
+
|
|
1341
|
+
if devices:
|
|
1342
|
+
device_list += [
|
|
1343
|
+
_flatten_device(device)
|
|
1344
|
+
for device in normalize_as_list(devices)
|
|
1345
|
+
]
|
|
1346
|
+
|
|
1347
|
+
if disks:
|
|
1348
|
+
device_list += [
|
|
1349
|
+
_device_entry(disk, "disk_id") if disk is not None else None
|
|
1350
|
+
for disk in normalize_as_list(disks)
|
|
1351
|
+
]
|
|
1352
|
+
|
|
1353
|
+
if volumes:
|
|
1354
|
+
device_list += [
|
|
1355
|
+
(
|
|
1356
|
+
_device_entry(volume, "volume_id")
|
|
1357
|
+
if volume is not None
|
|
1358
|
+
else None
|
|
1359
|
+
)
|
|
1360
|
+
for volume in normalize_as_list(volumes)
|
|
1361
|
+
]
|
|
1362
|
+
|
|
1363
|
+
return {
|
|
1364
|
+
device_names[i]: device for i, device in enumerate(device_list)
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
# This validation is enforced for backwards compatibility but isn't
|
|
1368
|
+
# technically needed anymore
|
|
1282
1369
|
if devices and (disks or volumes):
|
|
1283
1370
|
raise ValueError(
|
|
1284
1371
|
'You may not call config_create with "devices" and '
|
|
1285
1372
|
'either of "disks" or "volumes" specified!'
|
|
1286
1373
|
)
|
|
1287
1374
|
|
|
1288
|
-
|
|
1289
|
-
if not isinstance(disks, list):
|
|
1290
|
-
disks = [disks]
|
|
1291
|
-
if not isinstance(volumes, list):
|
|
1292
|
-
volumes = [volumes]
|
|
1293
|
-
|
|
1294
|
-
devices = []
|
|
1295
|
-
|
|
1296
|
-
for d in disks:
|
|
1297
|
-
if d is None:
|
|
1298
|
-
devices.append(None)
|
|
1299
|
-
elif isinstance(d, Disk):
|
|
1300
|
-
devices.append(d)
|
|
1301
|
-
else:
|
|
1302
|
-
devices.append(Disk(self._client, int(d), self.id))
|
|
1303
|
-
|
|
1304
|
-
for v in volumes:
|
|
1305
|
-
if v is None:
|
|
1306
|
-
devices.append(None)
|
|
1307
|
-
elif isinstance(v, Volume):
|
|
1308
|
-
devices.append(v)
|
|
1309
|
-
else:
|
|
1310
|
-
devices.append(Volume(self._client, int(v)))
|
|
1311
|
-
|
|
1312
|
-
if not devices:
|
|
1313
|
-
raise ValueError("Must include at least one disk or volume!")
|
|
1375
|
+
device_map = _build_devices()
|
|
1314
1376
|
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
pass
|
|
1318
|
-
elif isinstance(d, Disk):
|
|
1319
|
-
device_map[device_names[i]] = {"disk_id": d.id}
|
|
1320
|
-
elif isinstance(d, Volume):
|
|
1321
|
-
device_map[device_names[i]] = {"volume_id": d.id}
|
|
1322
|
-
else:
|
|
1323
|
-
raise TypeError("Disk or Volume expected!")
|
|
1377
|
+
if len(device_map) < 1:
|
|
1378
|
+
raise ValueError("Must include at least one disk or volume!")
|
|
1324
1379
|
|
|
1325
1380
|
param_interfaces = []
|
|
1326
1381
|
for interface in interfaces:
|
|
@@ -1832,8 +1887,8 @@ class Instance(Base):
|
|
|
1832
1887
|
to_linode=None,
|
|
1833
1888
|
region=None,
|
|
1834
1889
|
instance_type=None,
|
|
1835
|
-
configs=
|
|
1836
|
-
disks=
|
|
1890
|
+
configs=None,
|
|
1891
|
+
disks=None,
|
|
1837
1892
|
label=None,
|
|
1838
1893
|
group=None,
|
|
1839
1894
|
with_backups=None,
|
|
@@ -1889,7 +1944,10 @@ class Instance(Base):
|
|
|
1889
1944
|
'You may only specify one of "to_linode" and "region"'
|
|
1890
1945
|
)
|
|
1891
1946
|
|
|
1892
|
-
if
|
|
1947
|
+
configs = [] if configs is None else configs
|
|
1948
|
+
disks = [] if disks is None else disks
|
|
1949
|
+
|
|
1950
|
+
if region and not instance_type:
|
|
1893
1951
|
raise ValueError('Specifying a region requires a "service" as well')
|
|
1894
1952
|
|
|
1895
1953
|
if not isinstance(configs, list) and not isinstance(
|
|
@@ -8,6 +8,7 @@ from linode_api4.objects import (
|
|
|
8
8
|
Base,
|
|
9
9
|
DerivedBase,
|
|
10
10
|
Instance,
|
|
11
|
+
InstanceDiskEncryptionType,
|
|
11
12
|
JSONObject,
|
|
12
13
|
MappedObject,
|
|
13
14
|
Property,
|
|
@@ -422,6 +423,9 @@ class LKECluster(Base):
|
|
|
422
423
|
] = None,
|
|
423
424
|
update_strategy: Optional[str] = None,
|
|
424
425
|
label: str = None,
|
|
426
|
+
disk_encryption: Optional[
|
|
427
|
+
Union[str, InstanceDiskEncryptionType]
|
|
428
|
+
] = None,
|
|
425
429
|
**kwargs,
|
|
426
430
|
):
|
|
427
431
|
"""
|
|
@@ -443,6 +447,9 @@ class LKECluster(Base):
|
|
|
443
447
|
:param update_strategy: The strategy to use when updating this node pool.
|
|
444
448
|
NOTE: This field is specific to enterprise clusters.
|
|
445
449
|
:type update_strategy: str
|
|
450
|
+
:param disk_encryption: Local disk encryption setting for this LKE node pool.
|
|
451
|
+
One of 'enabled' or 'disabled'. Defaults to 'disabled'.
|
|
452
|
+
:type disk_encryption: str or InstanceDiskEncryptionType
|
|
446
453
|
:param kwargs: Any other arguments to pass to the API. See the API docs
|
|
447
454
|
for possible values.
|
|
448
455
|
|
|
@@ -459,6 +466,7 @@ class LKECluster(Base):
|
|
|
459
466
|
"taints": taints,
|
|
460
467
|
"k8s_version": k8s_version,
|
|
461
468
|
"update_strategy": update_strategy,
|
|
469
|
+
"disk_encryption": disk_encryption,
|
|
462
470
|
}
|
|
463
471
|
params.update(kwargs)
|
|
464
472
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
from pathlib import Path
|
|
2
2
|
from urllib import parse
|
|
3
3
|
|
|
4
4
|
from linode_api4.common import Price, RegionPrice
|
|
@@ -220,12 +220,14 @@ class NodeBalancerConfig(DerivedBase):
|
|
|
220
220
|
|
|
221
221
|
# we're disabling warnings here because these attributes are defined dynamically
|
|
222
222
|
# through linode.objects.Base, and pylint isn't privy
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
cert_path = Path(cert_file).expanduser()
|
|
224
|
+
if cert_path.is_file():
|
|
225
|
+
with open(cert_path) as f:
|
|
225
226
|
self.ssl_cert = f.read()
|
|
226
227
|
|
|
227
|
-
|
|
228
|
-
|
|
228
|
+
key_path = Path(key_file).expanduser()
|
|
229
|
+
if key_path.is_file():
|
|
230
|
+
with open(key_path) as f:
|
|
229
231
|
self.ssl_key = f.read()
|
|
230
232
|
|
|
231
233
|
|
|
@@ -125,6 +125,29 @@ class Region(Base):
|
|
|
125
125
|
|
|
126
126
|
return [RegionAvailabilityEntry.from_json(v) for v in result]
|
|
127
127
|
|
|
128
|
+
@property
|
|
129
|
+
def vpc_availability(self) -> "RegionVPCAvailability":
|
|
130
|
+
"""
|
|
131
|
+
Returns VPC availability data for this region.
|
|
132
|
+
|
|
133
|
+
NOTE: IPv6 VPCs may not currently be available to all users.
|
|
134
|
+
|
|
135
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-region-vpc-availability
|
|
136
|
+
|
|
137
|
+
:returns: VPC availability data for this region.
|
|
138
|
+
:rtype: RegionVPCAvailability
|
|
139
|
+
"""
|
|
140
|
+
result = self._client.get(
|
|
141
|
+
f"{self.api_endpoint}/vpc-availability", model=self
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
if result is None:
|
|
145
|
+
raise UnexpectedResponseError(
|
|
146
|
+
"Expected VPC availability data, got None."
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
return RegionVPCAvailability.from_json(result)
|
|
150
|
+
|
|
128
151
|
|
|
129
152
|
@dataclass
|
|
130
153
|
class RegionAvailabilityEntry(JSONObject):
|
|
@@ -137,3 +160,18 @@ class RegionAvailabilityEntry(JSONObject):
|
|
|
137
160
|
region: Optional[str] = None
|
|
138
161
|
plan: Optional[str] = None
|
|
139
162
|
available: bool = False
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
@dataclass
|
|
166
|
+
class RegionVPCAvailability(JSONObject):
|
|
167
|
+
"""
|
|
168
|
+
Represents the VPC availability data for a region.
|
|
169
|
+
|
|
170
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-regions-vpc-availability
|
|
171
|
+
|
|
172
|
+
NOTE: IPv6 VPCs may not currently be available to all users.
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
region: Optional[str] = None
|
|
176
|
+
available: bool = False
|
|
177
|
+
available_ipv6_prefix_lengths: Optional[List[int]] = None
|