diff --git a/.github/labels.yml b/.github/labels.yml index 2a28fc81..83989042 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -2,6 +2,9 @@ - name: new-feature description: for new features in the changelog. color: 225fee +- name: project + description: for new projects in the changelog. + color: 46BAF0 - name: improvement description: for improvements in existing functionality in the changelog. color: 22ee47 diff --git a/.github/release.yml b/.github/release.yml index 8417f9fb..a2318fa6 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -3,7 +3,10 @@ changelog: labels: - ignore-for-release categories: - - title: ⚠️ Breaking Change + - title: 📋 New Project + labels: + - project + - title: ⚠️ Breaking Change labels: - breaking-change - title: 🐛 Bug Fixes @@ -18,7 +21,7 @@ changelog: - title: 🧪 Testing Improvements labels: - testing - - title: ⚙️ Repo/CI Improvements + - title: ⚙️ Repo/CI Improvements labels: - repo-ci-improvement - title: 📖 Documentation diff --git a/.github/workflows/release-cross-repo-test.yml b/.github/workflows/release-cross-repo-test.yml index 0850ed9e..8708c342 100644 --- a/.github/workflows/release-cross-repo-test.yml +++ b/.github/workflows/release-cross-repo-test.yml @@ -14,6 +14,9 @@ jobs: steps: - name: Checkout linode_api4 repository uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: 'recursive' - name: update packages run: sudo apt-get update -y @@ -26,11 +29,13 @@ jobs: with: python-version: '3.10' - - name: checkout repo - uses: actions/checkout@v3 + - name: Checkout ansible repo + uses: actions/checkout@v4 with: repository: linode/ansible_linode path: .ansible/collections/ansible_collections/linode/cloud + fetch-depth: 0 + submodules: 'recursive' - name: install dependencies run: | diff --git a/README.rst b/README.rst index bbbfeb31..1e6b310f 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ linode_api4 The official python library for the `Linode API v4`_ in python. -.. _Linode API v4: https://developers.linode.com/api/v4/ +.. _Linode API v4: https://techdocs.akamai.com/linode-api/reference/api .. image:: https://img.shields.io/github/actions/workflow/status/linode/linode_api4-python/main.yml?label=tests :target: https://img.shields.io/github/actions/workflow/status/linode/linode_api4-python/main.yml?label=tests diff --git a/docs/index.rst b/docs/index.rst index 828e7e75..1faf5dfa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,11 +2,11 @@ linode_api4 =========== This is the documentation for the official Python bindings of the Linode -API v4. For API documentation, see `developers.linode.com`_. +API v4. For API documentation, see `techdocs.akamai.com`_. This library can be used to interact with all features of the Linode API. -.. _developers.linode.com: https://developers.linode.com/api/v4 +.. _techdocs.akamai.com: https://techdocs.akamai.com/linode-api/reference/api Installation ------------ diff --git a/linode_api4/groups/account.py b/linode_api4/groups/account.py index 21540ea7..88f53ed0 100644 --- a/linode_api4/groups/account.py +++ b/linode_api4/groups/account.py @@ -34,7 +34,7 @@ def __call__(self): account = client.account() - API Documentation: https://www.linode.com/docs/api/account/#account-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account :returns: Returns the acting user's account information. :rtype: Account @@ -52,7 +52,7 @@ def events(self, *filters): """ Lists events on the current account matching the given filters. - API Documentation: https://www.linode.com/docs/api/account/#events-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-events :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -69,7 +69,7 @@ def events_mark_seen(self, event): Marks event as the last event we have seen. If event is an int, it is treated as an event_id, otherwise it should be an event object whose id will be used. - API Documentation: https://www.linode.com/docs/api/account/#event-mark-as-seen + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-event-seen :param event: The Linode event to mark as seen. :type event: Event or int @@ -85,7 +85,7 @@ def settings(self): Returns the account settings data for this acocunt. This is not a listing endpoint. - API Documentation: https://www.linode.com/docs/api/account/#account-settings-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-settings :returns: The account settings data for this account. :rtype: AccountSettings @@ -105,7 +105,7 @@ def invoices(self): """ Returns Invoices issued to this account. - API Documentation: https://www.linode.com/docs/api/account/#invoices-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-invoices :param filters: Any number of filters to apply to this query. @@ -118,7 +118,7 @@ def payments(self): """ Returns a list of Payments made on this account. - API Documentation: https://www.linode.com/docs/api/account/#payments-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-payments :returns: A list of payments made on this account. :rtype: PaginatedList of Payment @@ -129,7 +129,7 @@ def oauth_clients(self, *filters): """ Returns the OAuth Clients associated with this account. - API Documentation: https://www.linode.com/docs/api/account/#oauth-clients-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-clients :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -144,7 +144,7 @@ def oauth_client_create(self, name, redirect_uri, **kwargs): """ Creates a new OAuth client. - API Documentation: https://www.linode.com/docs/api/account/#oauth-client-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-client :param name: The name of this application. :type name: str @@ -174,7 +174,7 @@ def users(self, *filters): """ Returns a list of users on this account. - API Documentation: https://www.linode.com/docs/api/account/#users-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-users :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -189,7 +189,7 @@ def logins(self): """ Returns a collection of successful logins for all users on the account during the last 90 days. - API Documentation: https://www.linode.com/docs/api/account/#user-logins-list-all + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-logins :returns: A list of Logins on this account. :rtype: PaginatedList of Login @@ -201,7 +201,7 @@ def maintenance(self): """ Returns a collection of Maintenance objects for any entity a user has permissions to view. Cancelled Maintenance objects are not returned. - API Documentation: https://www.linode.com/docs/api/account/#user-logins-list-all + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-logins :returns: A list of Maintenance objects on this account. :rtype: List of Maintenance objects as MappedObjects @@ -217,7 +217,7 @@ def payment_methods(self): """ Returns a list of Payment Methods for this Account. - API Documentation: https://www.linode.com/docs/api/account/#payment-methods-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-payment-methods :returns: A list of Payment Methods on this account. :rtype: PaginatedList of PaymentMethod @@ -229,7 +229,7 @@ def add_payment_method(self, data, is_default, type): """ Adds a Payment Method to your Account with the option to set it as the default method. - API Documentation: https://www.linode.com/docs/api/account/#payment-method-add + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-payment-method :param data: An object representing the credit card information you have on file with Linode to make Payments against your Account. @@ -281,7 +281,7 @@ def notifications(self): """ Returns a collection of Notification objects representing important, often time-sensitive items related to your Account. - API Documentation: https://www.linode.com/docs/api/account/#notifications-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-notifications :returns: A list of Notifications on this account. :rtype: List of Notification objects as MappedObjects @@ -297,7 +297,7 @@ def linode_managed_enable(self): """ Enables Linode Managed for the entire account and sends a welcome email to the account’s associated email address. - API Documentation: https://www.linode.com/docs/api/account/#linode-managed-enable + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-enable-account-managed """ resp = self.client.post( @@ -315,7 +315,7 @@ def add_promo_code(self, promo_code): """ Adds an expiring Promo Credit to your account. - API Documentation: https://www.linode.com/docs/api/account/#promo-credit-add + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-promo-credit :param promo_code: The Promo Code. :type promo_code: str @@ -341,7 +341,7 @@ def service_transfers(self): """ Returns a collection of all created and accepted Service Transfers for this account, regardless of the user that created or accepted the transfer. - API Documentation: https://www.linode.com/docs/api/account/#service-transfers-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-service-transfers :returns: A list of Service Transfers on this account. :rtype: PaginatedList of ServiceTransfer @@ -353,7 +353,7 @@ def service_transfer_create(self, entities): """ Creates a transfer request for the specified services. - API Documentation: https://www.linode.com/docs/api/account/#service-transfer-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-service-transfer :param entities: A collection of the services to include in this transfer request, separated by type. :type entities: dict @@ -396,7 +396,7 @@ def transfer(self): """ Returns a MappedObject containing the account's transfer pool data. - API Documentation: https://www.linode.com/docs/api/account/#network-utilization-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-transfer :returns: Information about this account's transfer pool data. :rtype: MappedObject @@ -421,7 +421,7 @@ def user_create(self, email, username, restricted=True): The new user will receive an email inviting them to set up their password. This must be completed before they can log in. - API Documentation: https://www.linode.com/docs/api/account/#user-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-user :param email: The new user's email address. This is used to finish setting up their user account. @@ -459,7 +459,7 @@ def enrolled_betas(self, *filters): """ Returns a list of all Beta Programs an account is enrolled in. - API doc: https://www.linode.com/docs/api/beta-programs/#enrolled-beta-programs-list + API doc: https://techdocs.akamai.com/linode-api/reference/get-enrolled-beta-programs :returns: a list of Beta Programs. :rtype: PaginatedList of AccountBetaProgram @@ -470,7 +470,7 @@ def join_beta_program(self, beta: Union[str, BetaProgram]): """ Enrolls an account into a beta program. - API doc: https://www.linode.com/docs/api/beta-programs/#beta-program-enroll + API doc: https://techdocs.akamai.com/linode-api/reference/post-beta-program :param beta: The object or id of a beta program to join. :type beta: BetaProgram or str @@ -491,7 +491,7 @@ def availabilities(self, *filters): Returns a list of all available regions and the resource types which are available to the account. - API doc: https://www.linode.com/docs/api/account/#region-service-availability + API doc: https://techdocs.akamai.com/linode-api/reference/get-account-availability :returns: a list of region availability information. :rtype: PaginatedList of AccountAvailability diff --git a/linode_api4/groups/beta.py b/linode_api4/groups/beta.py index 1da34ee2..a44fd492 100644 --- a/linode_api4/groups/beta.py +++ b/linode_api4/groups/beta.py @@ -12,7 +12,7 @@ def betas(self, *filters): """ Returns a list of available active Beta Programs. - API Documentation: https://www.linode.com/docs/api/beta-programs/#beta-programs-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-beta-programs :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` diff --git a/linode_api4/groups/database.py b/linode_api4/groups/database.py index 8bddd47d..957c136c 100644 --- a/linode_api4/groups/database.py +++ b/linode_api4/groups/database.py @@ -31,7 +31,7 @@ def types(self, *filters): database_types = client.database.types(DatabaseType.deprecated == False) - API Documentation: https://www.linode.com/docs/api/databases/#managed-database-types-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-types :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -51,7 +51,7 @@ def engines(self, *filters): mysql_engines = client.database.engines(DatabaseEngine.engine == 'mysql') - API Documentation: https://www.linode.com/docs/api/databases/#managed-database-engines-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-engines :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -66,7 +66,7 @@ def instances(self, *filters): """ Returns a list of Managed Databases active on this account. - API Documentation: https://www.linode.com/docs/api/databases/#managed-databases-list-all + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-instances :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -81,7 +81,7 @@ def mysql_instances(self, *filters): """ Returns a list of Managed MySQL Databases active on this account. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-databases-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instances :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -112,7 +112,7 @@ def mysql_create(self, label, region, engine, ltype, **kwargs): type.id ) - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instances :param label: The name for this cluster :type label: str @@ -146,7 +146,7 @@ def postgresql_instances(self, *filters): """ Returns a list of Managed PostgreSQL Databases active on this account. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-databases-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgre-sql-instances :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -177,7 +177,7 @@ def postgresql_create(self, label, region, engine, ltype, **kwargs): type.id ) - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instances :param label: The name for this cluster :type label: str diff --git a/linode_api4/groups/domain.py b/linode_api4/groups/domain.py index c3b11146..95bd3c83 100644 --- a/linode_api4/groups/domain.py +++ b/linode_api4/groups/domain.py @@ -13,7 +13,7 @@ def __call__(self, *filters): domains = client.domains() - API Documentation: https://www.linode.com/docs/api/domains/#domains-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-domains :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -30,7 +30,7 @@ def create(self, domain, master=True, **kwargs): your registrar to Linode's nameservers so that Linode's DNS manager will correctly serve your domain. - API Documentation: https://www.linode.com/docs/api/domains/#domain-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-domain :param domain: The domain to register to Linode's DNS manager. :type domain: str diff --git a/linode_api4/groups/image.py b/linode_api4/groups/image.py index e19928d7..d22363af 100644 --- a/linode_api4/groups/image.py +++ b/linode_api4/groups/image.py @@ -18,7 +18,7 @@ def __call__(self, *filters): debian_images = client.images( Image.vendor == "debain") - API Documentation: https://www.linode.com/docs/api/images/#images-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-images :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -33,7 +33,7 @@ def create(self, disk, label=None, description=None, cloud_init=False): """ Creates a new Image from a disk you own. - API Documentation: https://www.linode.com/docs/api/images/#image-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-image :param disk: The Disk to imagize. :type disk: Disk or int @@ -82,7 +82,7 @@ def create_upload( """ Creates a new Image and returns the corresponding upload URL. - API Documentation: https://www.linode.com/docs/api/images/#image-upload + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-upload-image :param label: The label of the Image to create. :type label: str @@ -119,7 +119,7 @@ def upload( """ Creates and uploads a new image. - API Documentation: https://www.linode.com/docs/api/images/#image-upload + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-upload-image :param label: The label of the Image to create. :type label: str diff --git a/linode_api4/groups/linode.py b/linode_api4/groups/linode.py index 68126d20..da3ba501 100644 --- a/linode_api4/groups/linode.py +++ b/linode_api4/groups/linode.py @@ -42,7 +42,7 @@ def types(self, *filters): standard_types = client.linode.types(Type.class == "standard") - API documentation: https://www.linode.com/docs/api/linode-types/#types-list + API documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-types :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -60,7 +60,7 @@ def instances(self, *filters): prod_linodes = client.linode.instances(Instance.group == "prod") - API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-instances :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -80,7 +80,7 @@ def stackscripts(self, *filters, **kwargs): my_stackscripts = client.linode.stackscripts(mine_only=True) - API Documentation: https://www.linode.com/docs/api/stackscripts/#stackscripts-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-stack-scripts :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -117,7 +117,7 @@ def kernels(self, *filters): Returns a list of available :any:`Kernels`. Kernels are used when creating or updating :any:`LinodeConfigs,LinodeConfig>`. - API Documentation: https://www.linode.com/docs/api/linode-instances/#kernels-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-kernels :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -226,7 +226,7 @@ def instance_create( successfully until disks and configs are created, or it is otherwise configured. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-linode-instance :param ltype: The Instance Type we are creating :type ltype: str or Type @@ -400,7 +400,7 @@ def stackscript_create( """ Creates a new :any:`StackScript` on your account. - API Documentation: https://www.linode.com/docs/api/stackscripts/#stackscript-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-add-stack-script :param label: The label for this StackScript. :type label: str diff --git a/linode_api4/groups/lke.py b/linode_api4/groups/lke.py index 0e278593..175a730c 100644 --- a/linode_api4/groups/lke.py +++ b/linode_api4/groups/lke.py @@ -29,7 +29,7 @@ def versions(self, *filters): Returns a :any:`PaginatedList` of :any:`KubeVersion` objects that can be used when creating an LKE Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-versions-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-versions :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -45,7 +45,7 @@ def clusters(self, *filters): Returns a :any:`PaginagtedList` of :any:`LKECluster` objects that belong to this account. - https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-clusters-list + https://techdocs.akamai.com/linode-api/reference/get-lke-clusters :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -87,7 +87,7 @@ def cluster_create( kube_version ) - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lke-cluster :param region: The Region to create this LKE Cluster in. :type region: Region or str diff --git a/linode_api4/groups/longview.py b/linode_api4/groups/longview.py index 8caf3996..3f2b292e 100644 --- a/linode_api4/groups/longview.py +++ b/linode_api4/groups/longview.py @@ -17,7 +17,7 @@ def clients(self, *filters): Requests and returns a paginated list of LongviewClients on your account. - API Documentation: https://www.linode.com/docs/api/longview/#longview-clients-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-longview-clients :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -32,7 +32,7 @@ def client_create(self, label=None): """ Creates a new LongviewClient, optionally with a given label. - API Documentation: https://www.linode.com/docs/api/longview/#longview-client-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-longview-client :param label: The label for the new client. If None, a default label based on the new client's ID will be used. @@ -58,7 +58,7 @@ def subscriptions(self, *filters): """ Requests and returns a paginated list of LongviewSubscriptions available - API Documentation: https://www.linode.com/docs/api/longview/#longview-subscriptions-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-longview-subscriptions :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` diff --git a/linode_api4/groups/networking.py b/linode_api4/groups/networking.py index 60643542..7ba6919e 100644 --- a/linode_api4/groups/networking.py +++ b/linode_api4/groups/networking.py @@ -21,7 +21,7 @@ def firewalls(self, *filters): """ Retrieves the Firewalls your user has access to. - API Documentation: https://www.linode.com/docs/api/networking/#firewalls-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-firewalls :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -37,7 +37,7 @@ def firewall_create(self, label, rules, **kwargs): Creates a new Firewall, either in the given Region or attached to the given Instance. - API Documentation: https://www.linode.com/docs/api/networking/#firewall-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-firewalls :param label: The label for the new Firewall. :type label: str @@ -74,7 +74,7 @@ def firewall_create(self, label, rules, **kwargs): firewall = client.networking.firewall_create('my-firewall', rules) - .. _Firewalls Documentation: https://www.linode.com/docs/api/networking/#firewall-create__request-body-schema + .. _Firewalls Documentation: https://techdocs.akamai.com/linode-api/reference/post-firewalls """ params = { @@ -97,7 +97,7 @@ def ips(self, *filters): """ Returns a list of IP addresses on this account, excluding private addresses. - API Documentation: https://www.linode.com/docs/api/networking/#ip-addresses-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ips :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -112,7 +112,7 @@ def ipv6_ranges(self, *filters): """ Returns a list of IPv6 ranges on this account. - API Documentation: https://www.linode.com/docs/api/networking/#ipv6-ranges-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ipv6-ranges :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -127,7 +127,7 @@ def ipv6_pools(self, *filters): """ Returns a list of IPv6 pools on this account. - API Documentation: https://www.linode.com/docs/api/networking/#ipv6-pools-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ipv6-pools :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -145,7 +145,7 @@ def vlans(self, *filters): Returns a list of VLANs on your account. - API Documentation: https://www.linode.com/docs/api/networking/#vlans-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vlans :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -184,7 +184,7 @@ def ips_assign(self, region, *assignments): linode1.invalidate() linode2.invalidate() - API Documentation: https://www.linode.com/docs/api/networking/#linodes-assign-ipv4s + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-assign-ipv4s :param region: The Region in which the assignments should take place. All Instances and IPAddresses involved in the assignment @@ -216,7 +216,7 @@ def ip_allocate(self, linode, public=True): Allocates an IP to a Instance you own. Additional IPs must be requested by opening a support ticket first. - API Documentation: https://www.linode.com/docs/api/networking/#ip-address-allocate + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-allocate-ip :param linode: The Instance to allocate the new IP for. :type linode: Instance or int @@ -249,7 +249,7 @@ def ips_share(self, linode, *ips): :any:`Instance`. This will enable the provided Instance to bring up the shared IP Addresses even though it does not own them. - API Documentation: https://www.linode.com/docs/api/networking/#ipv4-sharing-configure + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-share-ipv4s :param linode: The Instance to share the IPAddresses with. This Instance will be able to bring up the given addresses. @@ -289,7 +289,7 @@ def ip_addresses_share(self, ips, linode): primary Linode becomes unresponsive. This means that requests to the primary Linode’s IP address can be automatically rerouted to secondary Linodes at the configured shared IP addresses. - API Documentation: https://www.linode.com/docs/api/networking/#ip-addresses-share + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-share-ips :param linode: The id of the Instance or the Instance to share the IPAddresses with. This Instance will be able to bring up the given addresses. diff --git a/linode_api4/groups/nodebalancer.py b/linode_api4/groups/nodebalancer.py index 1430ad6a..50068f8e 100644 --- a/linode_api4/groups/nodebalancer.py +++ b/linode_api4/groups/nodebalancer.py @@ -13,7 +13,7 @@ def __call__(self, *filters): nodebalancers = client.nodebalancers() - API Documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancers-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancers :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -28,7 +28,7 @@ def create(self, region, **kwargs): """ Creates a new NodeBalancer in the given Region. - API Documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancer-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-node-balancer :param region: The Region in which to create the NodeBalancer. :type region: Region or str diff --git a/linode_api4/groups/object_storage.py b/linode_api4/groups/object_storage.py index c42805ec..f531932e 100644 --- a/linode_api4/groups/object_storage.py +++ b/linode_api4/groups/object_storage.py @@ -38,7 +38,7 @@ def clusters(self, *filters): us_east_clusters = client.object_storage.clusters(ObjectStorageCluster.region == "us-east") - API Documentation: https://www.linode.com/docs/api/object-storage/#clusters-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-clusters :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -54,7 +54,7 @@ def keys(self, *filters): Returns a list of Object Storage Keys active on this account. These keys allow third-party applications to interact directly with Linode Object Storage. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-keys-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-keys :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -105,7 +105,7 @@ def keys_create( bucket_access=client.object_storage.bucket_access("us-east-1", "example2", "read_only"), ) - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-key-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-object-storage-keys :param label: The label for this keypair, for identification only. :type label: str @@ -220,7 +220,7 @@ def buckets_in_region(self, region: str, *filters): This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-buckets-in-cluster-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-bucketin-cluster :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -245,7 +245,7 @@ def cancel(self): cancelled, you will no longer receive the transfer for or be billed for Object Storage, and all keys will be invalidated. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-cancel + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-cancel-object-storage """ self.client.post("/object-storage/cancel", data={}) return True @@ -256,7 +256,7 @@ def transfer(self): in bytes, for the current month’s billing cycle. Object Storage adds 1 terabyte of outbound data transfer to your data transfer pool. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-transfer-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-transfer :returns: The amount of outbound data transfer used by your account’s Object Storage buckets, in bytes, for the current month’s billing cycle. @@ -278,7 +278,7 @@ def buckets(self, *filters): This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-buckets-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-buckets :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -309,7 +309,7 @@ def bucket_create( This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-object-storage-bucket :param acl: The Access Control Level of the bucket using a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly. @@ -401,7 +401,7 @@ def object_url_create( This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-object-url-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-object-storage-object-url :param cluster_or_region_id: The ID of the cluster or region this bucket exists in. :type cluster_or_region_id: str diff --git a/linode_api4/groups/placement.py b/linode_api4/groups/placement.py index 90456fd1..e5697034 100644 --- a/linode_api4/groups/placement.py +++ b/linode_api4/groups/placement.py @@ -2,7 +2,11 @@ from linode_api4.errors import UnexpectedResponseError from linode_api4.groups import Group -from linode_api4.objects.placement import PlacementGroup +from linode_api4.objects.placement import ( + PlacementGroup, + PlacementGroupPolicy, + PlacementGroupType, +) from linode_api4.objects.region import Region @@ -31,8 +35,8 @@ def group_create( self, label: str, region: Union[Region, str], - affinity_type: str, - is_strict: bool = False, + placement_group_type: PlacementGroupType, + placement_group_policy: PlacementGroupPolicy, **kwargs, ) -> PlacementGroup: """ @@ -44,10 +48,10 @@ def group_create( :type label: str :param region: The region where the placement group will be created. Can be either a Region object or a string representing the region ID. :type region: Union[Region, str] - :param affinity_type: The affinity type of the placement group. - :type affinity_type: PlacementGroupAffinityType - :param is_strict: Whether the placement group is strict (defaults to False). - :type is_strict: bool + :param placement_group_type: The type of the placement group. + :type placement_group_type: PlacementGroupType + :param placement_group_policy: The policy for assignments to this placement group. + :type placement_group_policy: PlacementGroupPolicy :returns: The new Placement Group. :rtype: PlacementGroup @@ -55,8 +59,8 @@ def group_create( params = { "label": label, "region": region.id if isinstance(region, Region) else region, - "affinity_type": affinity_type, - "is_strict": is_strict, + "placement_group_type": placement_group_type, + "placement_group_policy": placement_group_policy, } params.update(kwargs) diff --git a/linode_api4/groups/polling.py b/linode_api4/groups/polling.py index 4141b78b..7dff2d3d 100644 --- a/linode_api4/groups/polling.py +++ b/linode_api4/groups/polling.py @@ -19,10 +19,10 @@ def event_poller_create( Creates a new instance of the EventPoller class. :param entity_type: The type of the entity to poll for events on. - Valid values for this field can be found here: https://www.linode.com/docs/api/account/#events-list__responses + Valid values for this field can be found here: https://techdocs.akamai.com/linode-api/reference/get-events :type entity_type: str :param action: The action that caused the Event to poll for. - Valid values for this field can be found here: https://www.linode.com/docs/api/account/#events-list__responses + Valid values for this field can be found here: https://techdocs.akamai.com/linode-api/reference/get-events :type action: str :param entity_id: The ID of the entity to poll for. :type entity_id: int @@ -51,7 +51,7 @@ def wait_for_entity_free( Waits for all events relevant events to not be scheduled or in-progress. :param entity_type: The type of the entity to poll for events on. - Valid values for this field can be found here: https://www.linode.com/docs/api/account/#events-list__responses + Valid values for this field can be found here: https://techdocs.akamai.com/linode-api/reference/get-events :type entity_type: str :param entity_id: The ID of the entity to poll for. :type entity_id: int diff --git a/linode_api4/groups/profile.py b/linode_api4/groups/profile.py index 8618ed3f..4c49a2b5 100644 --- a/linode_api4/groups/profile.py +++ b/linode_api4/groups/profile.py @@ -28,7 +28,7 @@ def __call__(self): profile = client.profile() - API Documentation: https://www.linode.com/docs/api/profile/#profile-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile :returns: The acting user's profile. :rtype: Profile @@ -47,7 +47,7 @@ def trusted_devices(self): """ Returns the Trusted Devices on your profile. - API Documentation: https://www.linode.com/docs/api/profile/#trusted-devices-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-devices :returns: A list of Trusted Devices for this profile. :rtype: PaginatedList of TrustedDevice @@ -69,7 +69,7 @@ def security_questions(self): """ Returns a collection of security questions and their responses, if any, for your User Profile. - API Documentation: https://www.linode.com/docs/api/profile/#security-questions-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-security-questions """ result = self.client.get( @@ -120,7 +120,7 @@ def phone_number_delete(self): """ Delete the verified phone number for the User making this request. - API Documentation: https://www.linode.com/docs/api/profile/#phone-number-delete + API Documentation: https://techdocs.akamai.com/linode-api/reference/delete-profile-phone-number :returns: Returns True if the operation was successful. :rtype: bool @@ -143,7 +143,7 @@ def phone_number_verify(self, otp_code): Verify a phone number by confirming the one-time code received via SMS message after accessing the Phone Verification Code Send (POST /profile/phone-number) command. - API Documentation: https://www.linode.com/docs/api/profile/#phone-number-verify + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-profile-phone-number-verify :param otp_code: The one-time code received via SMS message after accessing the Phone Verification Code Send :type otp_code: str @@ -175,7 +175,7 @@ def phone_number_verification_code_send(self, iso_code, phone_number): """ Send a one-time verification code via SMS message to the submitted phone number. - API Documentation: https://www.linode.com/docs/api/profile/#phone-number-verification-code-send + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-profile-phone-number :param iso_code: The two-letter ISO 3166 country code associated with the phone number. :type iso_code: str @@ -213,7 +213,7 @@ def logins(self): """ Returns the logins on your profile. - API Documentation: https://www.linode.com/docs/api/profile/#logins-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile-logins :returns: A list of logins for this profile. :rtype: PaginatedList of ProfileLogin @@ -224,7 +224,7 @@ def tokens(self, *filters): """ Returns the Person Access Tokens active for this user. - API Documentation: https://www.linode.com/docs/api/profile/#personal-access-tokens-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-personal-access-tokens :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -239,7 +239,7 @@ def token_create(self, label=None, expiry=None, scopes=None, **kwargs): """ Creates and returns a new Personal Access Token. - API Documentation: https://www.linode.com/docs/api/profile/#personal-access-token-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-personal-access-token :param label: The label of the new Personal Access Token. :type label: str @@ -275,7 +275,7 @@ def apps(self, *filters): """ Returns the Authorized Applications for this user - API Documentation: https://www.linode.com/docs/api/profile/#authorized-apps-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile-apps :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -290,7 +290,7 @@ def ssh_keys(self, *filters): """ Returns the SSH Public Keys uploaded to your profile. - API Documentation: https://www.linode.com/docs/api/profile/#ssh-keys-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ssh-keys :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -306,7 +306,7 @@ def ssh_key_upload(self, key, label): Uploads a new SSH Public Key to your profile This key can be used in later Linode deployments. - API Documentation: https://www.linode.com/docs/api/profile/#ssh-key-add + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-add-ssh-key :param key: The ssh key, or a path to the ssh key. If a path is provided, the file at the path must exist and be readable or an exception diff --git a/linode_api4/groups/region.py b/linode_api4/groups/region.py index 9ddc8fb6..baf8697e 100644 --- a/linode_api4/groups/region.py +++ b/linode_api4/groups/region.py @@ -13,7 +13,7 @@ def __call__(self, *filters): region = client.regions() - API Documentation: https://www.linode.com/docs/api/regions/#regions-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-regions :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -30,7 +30,7 @@ def availability(self, *filters): Returns the availability of Linode plans within a Region. - API Documentation: https://www.linode.com/docs/api/regions/#regions-availability-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-regions-availability :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` diff --git a/linode_api4/groups/support.py b/linode_api4/groups/support.py index 565128b2..ccc0b154 100644 --- a/linode_api4/groups/support.py +++ b/linode_api4/groups/support.py @@ -23,7 +23,7 @@ def tickets(self, *filters): """ Returns a list of support tickets on this account. - API Documentation: https://www.linode.com/docs/api/support/#support-tickets-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-tickets :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -46,7 +46,7 @@ def ticket_open( """ Opens a support ticket on this account. - API Documentation: https://www.linode.com/docs/api/support/#support-ticket-open + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-ticket :param summary: The summary or title for this support ticket. :type summary: str diff --git a/linode_api4/groups/tag.py b/linode_api4/groups/tag.py index ebf73315..5948b513 100644 --- a/linode_api4/groups/tag.py +++ b/linode_api4/groups/tag.py @@ -14,7 +14,7 @@ def __call__(self, *filters): tags = client.tags() - API Documentation: https://www.linode.com/docs/api/domains/#domain-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-domain :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -37,7 +37,7 @@ def create( """ Creates a new Tag and optionally applies it to the given entities. - API Documentation: https://www.linode.com/docs/api/tags/#tags-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-tags :param label: The label for the new Tag :type label: str diff --git a/linode_api4/groups/volume.py b/linode_api4/groups/volume.py index b27ebf8b..edbfdfbf 100644 --- a/linode_api4/groups/volume.py +++ b/linode_api4/groups/volume.py @@ -13,7 +13,7 @@ def __call__(self, *filters): volumes = client.volumes() - API Documentation: https://www.linode.com/docs/api/volumes/#volumes-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-volumes :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -29,7 +29,7 @@ def create(self, label, region=None, linode=None, size=20, **kwargs): Creates a new Block Storage Volume, either in the given Region or attached to the given Instance. - API Documentation: https://www.linode.com/docs/api/volumes/#volumes-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-volumes :param label: The label for the new Volume. :type label: str diff --git a/linode_api4/objects/account.py b/linode_api4/objects/account.py index 8c5ad098..31e3cf33 100644 --- a/linode_api4/objects/account.py +++ b/linode_api4/objects/account.py @@ -26,7 +26,7 @@ class Account(Base): """ The contact and billing information related to your Account. - API Documentation: https://www.linode.com/docs/api/account/#account-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account """ api_endpoint = "/account" @@ -93,7 +93,7 @@ class ServiceTransfer(Base): """ A transfer request for transferring a service between Linode accounts. - API Documentation: https://www.linode.com/docs/api/account/#service-transfer-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-service-transfer """ api_endpoint = "/account/service-transfers/{token}" @@ -112,7 +112,7 @@ def service_transfer_accept(self): """ Accept a Service Transfer for the provided token to receive the services included in the transfer to your account. - API Documentation: https://www.linode.com/docs/api/account/#service-transfer-accept + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-accept-service-transfer """ resp = self._client.post( @@ -131,7 +131,7 @@ class PaymentMethod(Base): """ A payment method to be used on this Linode account. - API Documentation: https://www.linode.com/docs/api/account/#payment-method-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-payment-method """ api_endpoint = "/account/payment-methods/{id}" @@ -147,7 +147,7 @@ def payment_method_make_default(self): """ Make this Payment Method the default method for automatically processing payments. - API Documentation: https://www.linode.com/docs/api/account/#payment-method-make-default + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-make-payment-method-default """ resp = self._client.post( @@ -166,7 +166,7 @@ class Login(Base): """ A login entry for this account. - API Documentation: https://www.linode.com/docs/api/account/#login-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-login """ api_endpoint = "/account/logins/{id}" @@ -184,7 +184,7 @@ class AccountSettings(Base): """ Information related to your Account settings. - API Documentation: https://www.linode.com/docs/api/account/#account-settings-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-account-settings """ api_endpoint = "/account/settings" @@ -205,7 +205,7 @@ class Event(Base): """ An event object representing an event that took place on this account. - API Documentation: https://www.linode.com/docs/api/account/#event-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-event """ api_endpoint = "/account/events/{id}" @@ -310,7 +310,7 @@ def mark_read(self): """ Marks a single Event as read. - API Documentation: https://www.linode.com/docs/api/account/#event-mark-as-read + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-event-read """ self._client.post("{}/read".format(Event.api_endpoint), model=self) @@ -319,7 +319,7 @@ def mark_seen(self): """ Marks a single Event as seen. - API Documentation: https://www.linode.com/docs/api/account/#event-mark-as-seen + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-event-seen """ self._client.post("{}/seen".format(Event.api_endpoint), model=self) @@ -329,7 +329,7 @@ class InvoiceItem(DerivedBase): """ An individual invoice item under an :any:`Invoice` object. - API Documentation: https://www.linode.com/docs/api/account/#invoice-items-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-invoice-items """ api_endpoint = "/account/invoices/{invoice_id}/items" @@ -364,7 +364,7 @@ class Invoice(Base): """ A single invoice on this Linode account. - API Documentation: https://www.linode.com/docs/api/account/#invoice-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-invoice """ api_endpoint = "/account/invoices/{id}" @@ -385,7 +385,7 @@ class OAuthClient(Base): """ An OAuthClient object that can be used to authenticate apps with this account. - API Documentation: https://www.linode.com/docs/api/account/#oauth-client-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-client """ api_endpoint = "/account/oauth-clients/{id}" @@ -404,7 +404,7 @@ def reset_secret(self): """ Resets the client secret for this client. - API Documentation: https://www.linode.com/docs/api/account/#oauth-client-secret-reset + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-reset-client-secret """ result = self._client.post( "{}/reset_secret".format(OAuthClient.api_endpoint), model=self @@ -424,7 +424,7 @@ def thumbnail(self, dump_to=None): If dump_to is given, attempts to write the image to a file at the given location. - API Documentation: https://www.linode.com/docs/api/account/#oauth-client-thumbnail-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-client-thumbnail """ headers = {"Authorization": "token {}".format(self._client.token)} @@ -452,7 +452,7 @@ def set_thumbnail(self, thumbnail): uploads it as a png. Otherwise, assumes thumbnail is a path to the thumbnail and reads it in as bytes before uploading. - API Documentation: https://www.linode.com/docs/api/account/#oauth-client-thumbnail-update + API Documentation: https://techdocs.akamai.com/linode-api/reference/put-client-thumbnail """ headers = { "Authorization": "token {}".format(self._client.token), @@ -487,7 +487,7 @@ class Payment(Base): """ An object representing a single payment on the current Linode Account. - API Documentation: https://www.linode.com/docs/api/account/#payment-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-payment """ api_endpoint = "/account/payments/{id}" @@ -503,7 +503,7 @@ class User(Base): """ An object representing a single user on this account. - API Documentation: https://www.linode.com/docs/api/account/#user-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-user """ api_endpoint = "/account/users/{id}" @@ -525,7 +525,7 @@ def grants(self): will result in an ApiError. This is smart, and will only fetch from the api once unless the object is invalidated. - API Documentation: https://www.linode.com/docs/api/account/#users-grants-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-user-grants :returns: The grants for this user. :rtype: linode.objects.account.UserGrants @@ -624,7 +624,7 @@ class UserGrants: a Base-like model (such as a unique, ID-based endpoint at which to access it), however it has some similarities so that its usage is familiar. - API Documentation: https://www.linode.com/docs/api/account/#users-grants-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-user-grants """ api_endpoint = "/account/users/{username}/grants" @@ -650,7 +650,7 @@ def save(self): """ Applies the grants to the parent user. - API Documentation: https://www.linode.com/docs/api/account/#users-grants-update + API Documentation: https://techdocs.akamai.com/linode-api/reference/put-user-grants """ req = { @@ -680,7 +680,7 @@ class AccountBetaProgram(Base): """ The details and enrollment information of a Beta program that an account is enrolled in. - API Documentation: https://www.linode.com/docs/api/beta-programs/#enrolled-beta-program-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-enrolled-beta-program """ api_endpoint = "/account/betas/{id}" @@ -700,7 +700,7 @@ class AccountAvailability(Base): Contains information about the resources available for a region under the current account. - API doc: https://www.linode.com/docs/api/account/#region-service-availability + API doc: https://techdocs.akamai.com/linode-api/reference/get-account-availability """ api_endpoint = "/account/availability/{region}" diff --git a/linode_api4/objects/beta.py b/linode_api4/objects/beta.py index 42a3eef8..c957aa58 100644 --- a/linode_api4/objects/beta.py +++ b/linode_api4/objects/beta.py @@ -6,7 +6,7 @@ class BetaProgram(Base): Beta program is a new product or service that's not generally available to all customers. User with permissions can enroll into a beta program and access the functionalities. - API Documentation: https://www.linode.com/docs/api/beta-programs/#beta-program-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-beta-program """ api_endpoint = "/betas/{id}" diff --git a/linode_api4/objects/database.py b/linode_api4/objects/database.py index f7111575..6a028722 100644 --- a/linode_api4/objects/database.py +++ b/linode_api4/objects/database.py @@ -5,7 +5,7 @@ class DatabaseType(Base): """ The type of a managed database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-database-type-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-type """ api_endpoint = "/databases/types/{id}" @@ -40,7 +40,7 @@ class DatabaseEngine(Base): - MySQL - PostgreSQL - API Documentation: https://www.linode.com/docs/api/databases/#managed-database-engine-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-engine """ api_endpoint = "/databases/engines/{id}" @@ -88,8 +88,8 @@ def restore(self): API Documentation: - - MySQL: https://www.linode.com/docs/api/databases/#managed-mysql-database-backup-restore - - PostgreSQL: https://www.linode.com/docs/api/databases/#managed-postgresql-database-backup-restore + - MySQL: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instance-backup-restore + - PostgreSQL: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instance-backup-restore """ return self._client.post( @@ -101,7 +101,7 @@ class MySQLDatabaseBackup(DatabaseBackup): """ A backup for an accessible Managed MySQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-backup-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance-backup """ api_endpoint = "/databases/mysql/instances/{database_id}/backups/{id}" @@ -111,7 +111,7 @@ class PostgreSQLDatabaseBackup(DatabaseBackup): """ A backup for an accessible Managed PostgreSQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-backup-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgresql-instance-backup """ api_endpoint = "/databases/postgresql/instances/{database_id}/backups/{id}" @@ -121,7 +121,7 @@ class MySQLDatabase(Base): """ An accessible Managed MySQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance """ api_endpoint = "/databases/mysql/instances/{id}" @@ -153,7 +153,7 @@ def credentials(self): Display the root username and password for an accessible Managed MySQL Database. The Database must have an active status to perform this command. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-credentials-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance-credentials :returns: MappedObject containing credntials for this DB :rtype: MappedObject @@ -172,7 +172,7 @@ def ssl(self): """ Display the SSL CA certificate for an accessible Managed MySQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-ssl-certificate-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-mysql-instance-ssl :returns: MappedObject containing SSL CA certificate for this DB :rtype: MappedObject @@ -190,7 +190,7 @@ def credentials_reset(self): """ Reset the root password for a Managed MySQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-credentials-reset + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instance-credentials-reset :returns: Response from the API call to reset credentials :rtype: dict @@ -207,7 +207,7 @@ def patch(self): """ Apply security patches and updates to the underlying operating system of the Managed MySQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-patch + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instance-patch :returns: Response from the API call to apply security patches :rtype: dict @@ -223,7 +223,7 @@ def backup_create(self, label, **kwargs): """ Creates a snapshot backup of a Managed MySQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-mysql-database-backup-snapshot-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-mysql-instance-backup """ params = { @@ -254,7 +254,7 @@ class PostgreSQLDatabase(Base): """ An accessible Managed PostgreSQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgre-sql-instance """ api_endpoint = "/databases/postgresql/instances/{id}" @@ -287,7 +287,7 @@ def credentials(self): Display the root username and password for an accessible Managed PostgreSQL Database. The Database must have an active status to perform this command. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-credentials-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgre-sql-instance-credentials :returns: MappedObject containing credntials for this DB :rtype: MappedObject @@ -307,7 +307,7 @@ def ssl(self): """ Display the SSL CA certificate for an accessible Managed PostgreSQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-ssl-certificate-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-databases-postgresql-instance-ssl :returns: MappedObject containing SSL CA certificate for this DB :rtype: MappedObject @@ -325,7 +325,7 @@ def credentials_reset(self): """ Reset the root password for a Managed PostgreSQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-credentials-reset + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instance-credentials-reset :returns: Response from the API call to reset credentials :rtype: dict @@ -342,7 +342,7 @@ def patch(self): """ Apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-patch + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instance-patch :returns: Response from the API call to apply security patches :rtype: dict @@ -358,7 +358,7 @@ def backup_create(self, label, **kwargs): """ Creates a snapshot backup of a Managed PostgreSQL Database. - API Documentation: https://www.linode.com/docs/api/databases/#managed-postgresql-database-backup-snapshot-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-databases-postgre-sql-instance-backup """ params = { diff --git a/linode_api4/objects/domain.py b/linode_api4/objects/domain.py index aeca7d83..8ce7a5ee 100644 --- a/linode_api4/objects/domain.py +++ b/linode_api4/objects/domain.py @@ -6,7 +6,7 @@ class DomainRecord(DerivedBase): """ A single record on a Domain. - API Documentation: https://www.linode.com/docs/api/domains/#domain-record-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-domain-record """ api_endpoint = "/domains/{domain_id}/records/{id}" @@ -37,7 +37,7 @@ class Domain(Base): Linode is not a registrar, and in order for this Domain record to work you must own the domain and point your registrar at Linode’s nameservers. - API Documentation: https://www.linode.com/docs/api/domains/#domain-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-domain """ api_endpoint = "/domains/{id}" @@ -64,7 +64,7 @@ def record_create(self, record_type, **kwargs): Adds a new Domain Record to the zonefile this Domain represents. Each domain can have up to 12,000 active records. - API Documentation: https://www.linode.com/docs/api/domains/#domain-record-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-domain-record :param record_type: The type of Record this is in the DNS system. Can be one of: A, AAAA, NS, MX, CNAME, TXT, SRV, PTR, CAA. @@ -101,7 +101,7 @@ def zone_file_view(self): """ Returns the zone file for the last rendered zone for the specified domain. - API Documentation: https://www.linode.com/docs/api/domains/#domain-zone-file-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-domain-zone :returns: The zone file for the last rendered zone for the specified domain in the form of a list of the lines of the zone file. @@ -118,7 +118,7 @@ def clone(self, domain: str): """ Clones a Domain and all associated DNS records from a Domain that is registered in Linode’s DNS manager. - API Documentation: https://www.linode.com/docs/api/domains/#domain-clone + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-clone-domain :param domain: The new domain for the clone. Domain labels cannot be longer than 63 characters and must conform to RFC1035. Domains must be @@ -143,7 +143,7 @@ def domain_import(self, domain, remote_nameserver): - 2600:3c00::5e = 2600:3c00::5f - API Documentation: https://www.linode.com/docs/api/domains/#domain-import + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-import-domain :param domain: The domain to import. :type: domain: str diff --git a/linode_api4/objects/image.py b/linode_api4/objects/image.py index a919d25e..2317dd20 100644 --- a/linode_api4/objects/image.py +++ b/linode_api4/objects/image.py @@ -5,7 +5,7 @@ class Image(Base): """ An Image is something a Linode Instance or Disk can be deployed from. - API Documentation: https://www.linode.com/docs/api/images/#image-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-image """ api_endpoint = "/images/{id}" diff --git a/linode_api4/objects/linode.py b/linode_api4/objects/linode.py index 7b3ace39..0e43f156 100644 --- a/linode_api4/objects/linode.py +++ b/linode_api4/objects/linode.py @@ -45,7 +45,7 @@ class Backup(DerivedBase): """ A Backup of a Linode Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#backup-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-backup """ api_endpoint = "/linode/instances/{linode_id}/backups/{id}" @@ -73,7 +73,7 @@ def restore_to(self, linode, **kwargs): """ Restores a Linode’s Backup to the specified Linode. - API Documentation: https://www.linode.com/docs/api/linode-instances/#backup-restore + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-restore-backup :param linode: The id of the Instance or the Instance to share the IPAddresses with. This Instance will be able to bring up the given addresses. @@ -111,7 +111,7 @@ class Disk(DerivedBase): """ A Disk for the storage space on a Compute Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-disk """ api_endpoint = "/linode/instances/{linode_id}/disks/{id}" @@ -135,7 +135,7 @@ def duplicate(self): Copies a disk, byte-for-byte, into a new Disk belonging to the same Linode. The Linode must have enough storage space available to accept a new Disk of the same size as this one or this operation will fail. - API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-clone + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-clone-linode-disk :returns: A Disk object representing the cloned Disk :rtype: Disk @@ -154,7 +154,7 @@ def reset_root_password(self, root_password=None): """ Resets the password of a Disk you have permission to read_write. - API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-root-password-reset + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-reset-disk-password :param root_password: The new root password for the OS installed on this Disk. The password must meet the complexity strength validation requirements for a strong password. @@ -182,7 +182,7 @@ def resize(self, new_size): fit on the new disk size. You may need to resize the filesystem on the disk first before performing this action. - API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-resize + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-resize-disk :param new_size: The intended new size of the disk, in MB :type new_size: int @@ -222,7 +222,7 @@ class Kernel(Base): to compile the kernel from source than to download it from your package manager. For more information on custom compiled kernels, review our guides for Debian, Ubuntu, and CentOS. - API Documentation: https://www.linode.com/docs/api/linode-instances/#kernel-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-kernel """ api_endpoint = "/linode/kernels/{id}" @@ -246,7 +246,7 @@ class Type(Base): """ Linode Plan type to specify the resources available to a Linode Instance. - API Documentation: https://www.linode.com/docs/api/linode-types/#type-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-type """ api_endpoint = "/linode/types/{id}" @@ -430,7 +430,7 @@ class Config(DerivedBase): """ A Configuration Profile for a Linode Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#configuration-profile-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-config """ api_endpoint = "/linode/instances/{linode_id}/configs/{id}" @@ -650,7 +650,7 @@ class Instance(Base): """ A Linode Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-instance """ api_endpoint = "/linode/instances/{id}" @@ -686,7 +686,7 @@ def ips(self): The ips related collection is not normalized like the others, so we have to make an ad-hoc object to return for its response - API Documentation: https://www.linode.com/docs/api/linode-instances/#networking-information-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-ips :returns: A List of the ips of the Linode Instance. :rtype: List[IPAddress] @@ -767,7 +767,7 @@ def available_backups(self): """ The backups response contains what backups are available to be restored. - API Documentation: https://www.linode.com/docs/api/linode-instances/#backups-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-backups :returns: A List of the available backups for the Linode Instance. :rtype: List[Backup] @@ -825,7 +825,7 @@ def reset_instance_root_password(self, root_password=None): """ Resets the root password for this Linode. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-root-password-reset + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-reset-linode-password :param root_password: The root user’s password on this Linode. Linode passwords must meet a password strength score requirement that is calculated internally @@ -849,7 +849,7 @@ def transfer_year_month(self, year, month): """ Get per-linode transfer for specified month - API Documentation: https://www.linode.com/docs/api/linode-instances/#network-transfer-view-yearmonth + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-transfer-by-year-month :param year: Numeric value representing the year to look up. :type: year: int @@ -877,7 +877,7 @@ def transfer(self): """ Get per-linode transfer - API Documentation: https://www.linode.com/docs/api/linode-instances/#network-transfer-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-transfer :returns: The network transfer statistics for the current month. :rtype: MappedObject @@ -967,7 +967,7 @@ def boot(self, config=None): (because the Linode was never booted or the last booted config was deleted) an error will be returned. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-boot + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-boot-linode-instance :param config: The Linode Config ID to boot into. :type: config: int @@ -992,7 +992,7 @@ def shutdown(self): are currently running or queued, those actions must be completed first before you can initiate a shutdown. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-shut-down + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-shutdown-linode-instance :returns: True if the operation was successful. :rtype: bool @@ -1011,7 +1011,7 @@ def reboot(self): Reboots a Linode you have permission to modify. If any actions are currently running or queued, those actions must be completed first before you can initiate a reboot. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-reboot + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-reboot-linode-instance :returns: True if the operation was successful. :rtype: bool @@ -1043,7 +1043,7 @@ def resize( - The Linode must not have more disk allocation than the new Type allows. - In that situation, you must first delete or resize the disk to be smaller. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-resize + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-resize-linode-instance :param new_type: The Linode Type or the id representing it. :type: new_type: Type or int @@ -1112,7 +1112,7 @@ def config_create( """ Creates a Linode Config with the given attributes. - API Documentation: https://www.linode.com/docs/api/linode-instances/#configuration-profile-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-add-linode-config :param kernel: The kernel to boot with. :param label: The config label @@ -1227,7 +1227,7 @@ def disk_create( """ Creates a new Disk for this Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#disk-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-add-linode-disk :param size: The size of the disk, in MB :param label: The label of the disk. If not given, a default label will be generated. @@ -1312,7 +1312,7 @@ def enable_backups(self): For more information on Instance's Backups service and pricing, see our Backups Page: https://www.linode.com/backups - API Documentation: https://www.linode.com/docs/api/linode-instances/#backups-enable + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-enable-backups :returns: True if the operation was successful. :rtype: bool @@ -1329,7 +1329,7 @@ def cancel_backups(self): including any snapshots that have been taken. This cannot be undone, but Backups can be re-enabled at a later date. - API Documentation: https://www.linode.com/docs/api/linode-instances/#backups-cancel + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-cancel-backups :returns: True if the operation was successful. :rtype: bool @@ -1347,7 +1347,7 @@ def snapshot(self, label=None): Important: If you already have a snapshot of this Linode, this is a destructive action. The previous snapshot will be deleted. - API Documentation: https://www.linode.com/docs/api/linode-instances/#snapshot-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-snapshot :param label: The label for the new snapshot. :type: label: str @@ -1381,7 +1381,7 @@ def ip_allocate(self, public=False): before you can add one. You may only have, at most, one private IP per Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#ipv4-address-allocate + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-add-linode-ip :param public: If the new IP should be public or private. Defaults to private. @@ -1422,7 +1422,7 @@ def rebuild( a new :any:`Image` to it. This can be used to reset an existing Instance or to install an Image on an empty Instance. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-rebuild + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-rebuild-linode-instance :param image: The Image to deploy to this Instance :type image: str or Image @@ -1487,7 +1487,7 @@ def rescue(self, *disks): Note that “sdh” is reserved and unavailable during rescue. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-boot-into-rescue-mode + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-rescue-linode-instance :param disks: Devices that are either Disks or Volumes :type: disks: dict @@ -1527,7 +1527,7 @@ def mutate(self, allow_auto_disk_resize=True): """ Upgrades this Instance to the latest generation type - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-upgrade + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-mutate-linode-instance :param allow_auto_disk_resize: Automatically resize disks when resizing a Linode. When resizing down to a smaller plan your Linode’s @@ -1559,7 +1559,7 @@ def initiate_migration( Initiates a pending migration that is already scheduled for this Linode Instance - API Documentation: https://www.linode.com/docs/api/linode-instances/#dc-migrationpending-host-migration-initiate + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-migrate-linode-instance :param region: The region to which the Linode will be migrated. Must be a valid region slug. A list of regions can be viewed by using the GET /regions endpoint. A cross data @@ -1604,7 +1604,7 @@ def firewalls(self): """ View Firewall information for Firewalls associated with this Linode. - API Documentation: https://www.linode.com/docs/api/linode-instances/#firewalls-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-firewalls :returns: A List of Firewalls of the Linode Instance. :rtype: List[Firewall] @@ -1626,7 +1626,7 @@ def nodebalancers(self): """ View a list of NodeBalancers that are assigned to this Linode and readable by the requesting User. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-nodebalancers-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-node-balancers :returns: A List of Nodebalancers of the Linode Instance. :rtype: List[Nodebalancer] @@ -1648,7 +1648,7 @@ def volumes(self): """ View Block Storage Volumes attached to this Linode. - API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes-volumes-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-volumes :returns: A List of Volumes of the Linode Instance. :rtype: List[Volume] @@ -1683,7 +1683,7 @@ def clone( """ Clones this linode into a new linode or into a new linode in the given region - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-clone + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-clone-linode-instance :param to_linode: If an existing Linode is the target for the clone, the ID of that Linode. The existing Linode must have enough resources to accept the clone. @@ -1777,7 +1777,7 @@ def stats(self): """ Returns the JSON stats for this Instance - API Documentation: https://www.linode.com/docs/api/linode-instances/#linode-statistics-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-stats :returns: The JSON stats for this Instance :rtype: dict @@ -1807,7 +1807,7 @@ def stats_for(self, dt): """ Returns stats for the month containing the given datetime - API Documentation: https://www.linode.com/docs/api/linode-instances/#statistics-view-yearmonth + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-stats-by-year-month :param dt: A Datetime for which to return statistics :type: dt: Datetime @@ -1851,7 +1851,7 @@ class StackScript(Base): A script allowing users to reproduce specific software configurations when deploying Compute Instances, with more user control than static system images. - API Documentation: https://www.linode.com/docs/api/stackscripts/#stackscript-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-stack-script """ api_endpoint = "/linode/stackscripts/{id}" diff --git a/linode_api4/objects/lke.py b/linode_api4/objects/lke.py index 14f7f28d..14de05f4 100644 --- a/linode_api4/objects/lke.py +++ b/linode_api4/objects/lke.py @@ -19,7 +19,7 @@ class KubeVersion(Base): """ A KubeVersion is a version of Kubernetes that can be deployed on LKE. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-version-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-version """ api_endpoint = "/lke/versions/{id}" @@ -120,7 +120,7 @@ class LKENodePool(DerivedBase): An LKE Node Pool describes a pool of Linode Instances that exist within an LKE Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-pool-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-node-pool """ api_endpoint = "/lke/clusters/{cluster_id}/pools/{id}" @@ -164,7 +164,7 @@ def recycle(self): Completing this operation may take several minutes. This operation will cause all local data on Linode Instances in this pool to be lost. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-pool-recycle + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lke-cluster-pool-recycle """ self._client.post( "{}/recycle".format(LKENodePool.api_endpoint), model=self @@ -176,7 +176,7 @@ class LKECluster(Base): """ An LKE Cluster is a single k8s cluster deployed via Linode Kubernetes Engine. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-cluster """ api_endpoint = "/lke/clusters/{id}" @@ -213,7 +213,7 @@ def api_endpoints(self): """ A list of API Endpoints for this Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-api-endpoints-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-cluster-api-endpoints :returns: A list of MappedObjects of the API Endpoints :rtype: List[MappedObject] @@ -251,7 +251,7 @@ def kubeconfig(self): It may take a few minutes for a config to be ready when creating a new cluster; during that time this request may fail. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubeconfig-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-cluster-kubeconfig :returns: The Kubeconfig file for this Cluster. :rtype: str @@ -291,7 +291,7 @@ def node_pool_create(self, node_type, node_count, **kwargs): """ Creates a new :any:`LKENodePool` for this cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-pool-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lke-cluster-pools :param node_type: The type of nodes to create in this pool. :type node_type: :any:`Type` or str @@ -325,7 +325,7 @@ def cluster_dashboard_url_view(self): """ Get a Kubernetes Dashboard access URL for this Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-dashboard-url-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-cluster-dashboard :returns: The Kubernetes Dashboard access URL for this Cluster. :rtype: str @@ -341,7 +341,7 @@ def kubeconfig_delete(self): """ Delete and regenerate the Kubeconfig file for a Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubeconfig-delete + API Documentation: https://techdocs.akamai.com/linode-api/reference/delete-lke-cluster-kubeconfig """ self._client.delete( @@ -352,7 +352,7 @@ def node_view(self, nodeId): """ Get a specific Node by ID. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-lke-cluster-node :param nodeId: ID of the Node to look up. :type nodeId: str @@ -374,7 +374,7 @@ def node_delete(self, nodeId): """ Delete a specific Node from a Node Pool. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-delete + API Documentation: https://techdocs.akamai.com/linode-api/reference/delete-lke-cluster-node :param nodeId: ID of the Node to delete. :type nodeId: str @@ -391,7 +391,7 @@ def node_recycle(self, nodeId): """ Recycle a specific Node from an LKE cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#node-recycle + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lke-cluster-node-recycle :param nodeId: ID of the Node to recycle. :type nodeId: str @@ -408,7 +408,7 @@ def cluster_nodes_recycle(self): """ Recycles all nodes in all pools of a designated Kubernetes Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#cluster-nodes-recycle + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lke-cluster-recycle """ self._client.post( @@ -419,7 +419,7 @@ def cluster_regenerate(self): """ Regenerate the Kubeconfig file and/or the service account token for a Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#kubernetes-cluster-regenerate + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lke-cluster-regenerate """ self._client.post( @@ -430,7 +430,7 @@ def service_token_delete(self): """ Delete and regenerate the service account token for a Cluster. - API Documentation: https://www.linode.com/docs/api/linode-kubernetes-engine-lke/#service-token-delete + API Documentation: https://techdocs.akamai.com/linode-api/reference/delete-lke-service-token """ self._client.delete( diff --git a/linode_api4/objects/longview.py b/linode_api4/objects/longview.py index 9d883693..7a1ed56d 100644 --- a/linode_api4/objects/longview.py +++ b/linode_api4/objects/longview.py @@ -5,7 +5,7 @@ class LongviewClient(Base): """ A Longview Client that is accessible for use. Longview is Linode’s system data graphing service. - API Documentation: https://www.linode.com/docs/api/longview/#longview-client-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-longview-client """ api_endpoint = "/longview/clients/{id}" @@ -25,7 +25,7 @@ class LongviewSubscription(Base): """ Contains the Longview Plan details for a specific subscription id. - API Documentation: https://www.linode.com/docs/api/longview/#longview-subscription-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-longview-subscription """ api_endpoint = "/longview/subscriptions/{id}" @@ -42,7 +42,7 @@ class LongviewPlan(Base): """ The current Longview Plan an account is using. - API Documentation: https://www.linode.com/docs/api/longview/#longview-plan-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-longview-plan """ api_endpoint = "/longview/plan" diff --git a/linode_api4/objects/networking.py b/linode_api4/objects/networking.py index dac29536..99396109 100644 --- a/linode_api4/objects/networking.py +++ b/linode_api4/objects/networking.py @@ -23,7 +23,7 @@ class IPv6Range(Base): """ An instance of a Linode IPv6 Range. - API Documentation: https://www.linode.com/docs/api/networking/#ipv6-range-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ipv6-range """ api_endpoint = "/networking/ipv6/ranges/{range}" @@ -68,7 +68,7 @@ class IPAddress(Base): # Re-populate all attributes with new information from the API ip.invalidate() - API Documentation: https://www.linode.com/docs/api/networking/#ip-address-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ip """ api_endpoint = "/networking/ips/{address}" @@ -144,7 +144,7 @@ class VLAN(Base): VLANs provide a mechanism for secure communication between two or more Linodes that are assigned to the same VLAN. VLANs are implicitly created during Instance or Instance Config creation. - API Documentation: https://www.linode.com/docs/api/networking/#vlans-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vlans """ api_endpoint = "/networking/vlans/{label}" @@ -162,7 +162,7 @@ class FirewallDevice(DerivedBase): """ An object representing the assignment between a Linode Firewall and another Linode resource. - API Documentation: https://www.linode.com/docs/api/networking/#firewall-device-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-firewall-device """ api_endpoint = "/networking/firewalls/{firewall_id}/devices/{id}" @@ -183,7 +183,7 @@ class Firewall(Base): An instance of a Linode Cloud Firewall. - API Documentation: https://www.linode.com/docs/api/networking/#firewall-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-firewall """ api_endpoint = "/networking/firewalls/{id}" @@ -203,7 +203,7 @@ def update_rules(self, rules): """ Sets the JSON rules for this Firewall. - API Documentation: https://www.linode.com/docs/api/networking/#firewall-rules-update__request-samples + API Documentation: https://techdocs.akamai.com/linode-api/reference/put-firewall-rules :param rules: The rules to apply to this Firewall. :type rules: dict @@ -217,7 +217,7 @@ def get_rules(self): """ Gets the JSON rules for this Firewall. - API Documentation: https://www.linode.com/docs/api/networking/#firewall-rules-update__request-samples + API Documentation: https://techdocs.akamai.com/linode-api/reference/put-firewall-rules :returns: The rules that this Firewall is currently configured with. :rtype: dict @@ -230,7 +230,7 @@ def device_create(self, id, type="linode", **kwargs): """ Creates and attaches a device to this Firewall - API Documentation: https://www.linode.com/docs/api/networking/#firewall-device-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-firewall-device :param id: The ID of the entity to create a device for. :type id: int diff --git a/linode_api4/objects/nodebalancer.py b/linode_api4/objects/nodebalancer.py index c6f161ac..2aeb6180 100644 --- a/linode_api4/objects/nodebalancer.py +++ b/linode_api4/objects/nodebalancer.py @@ -16,7 +16,7 @@ class NodeBalancerNode(DerivedBase): """ The information about a single Node, a backend for this NodeBalancer’s configured port. - API documentation: https://www.linode.com/docs/api/nodebalancers/#node-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancer-node """ api_endpoint = ( @@ -61,7 +61,7 @@ class NodeBalancerConfig(DerivedBase): """ The configuration information for a single port of this NodeBalancer. - API documentation: https://www.linode.com/docs/api/nodebalancers/#config-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancer-config """ api_endpoint = "/nodebalancers/{nodebalancer_id}/configs/{id}" @@ -100,7 +100,7 @@ def nodes(self): Returns a paginated list of NodeBalancer nodes associated with this Config. These are the backends that will be sent traffic for this port. - API documentation: https://www.linode.com/docs/api/nodebalancers/#nodes-list + API documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancer-config-nodes :returns: A paginated list of NodeBalancer nodes. :rtype: PaginatedList of NodeBalancerNode @@ -127,7 +127,7 @@ def node_create(self, label, address, **kwargs): NodeBalancer Config. Nodes are routed requests on the configured port based on their status. - API documentation: https://www.linode.com/docs/api/nodebalancers/#node-create + API documentation: https://techdocs.akamai.com/linode-api/reference/post-node-balancer-node :param address: The private IP Address where this backend can be reached. This must be a private IP address. @@ -200,7 +200,7 @@ class NodeBalancer(Base): """ A single NodeBalancer you can access. - API documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancer-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancer """ api_endpoint = "/nodebalancers/{id}" @@ -227,7 +227,7 @@ def config_create(self, **kwargs): on a new port. You will need to add NodeBalancer Nodes to the new Config before it can actually serve requests. - API documentation: https://www.linode.com/docs/api/nodebalancers/#config-create + API documentation: https://techdocs.akamai.com/linode-api/reference/post-node-balancer-config :returns: The config that created successfully. :rtype: NodeBalancerConfig @@ -254,7 +254,7 @@ def config_rebuild(self, config_id, nodes, **kwargs): Rebuilds a NodeBalancer Config and its Nodes that you have permission to modify. Use this command to update a NodeBalancer’s Config and Nodes with a single request. - API documentation: https://www.linode.com/docs/api/nodebalancers/#config-rebuild + API documentation: https://techdocs.akamai.com/linode-api/reference/post-rebuild-node-balancer-config :param config_id: The ID of the Config to access. :type config_id: int @@ -289,7 +289,7 @@ def statistics(self): """ Returns detailed statistics about the requested NodeBalancer. - API documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancer-statistics-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancer-stats :returns: The requested stats. :rtype: MappedObject diff --git a/linode_api4/objects/object_storage.py b/linode_api4/objects/object_storage.py index 2cbcf59b..f4ddfe9b 100644 --- a/linode_api4/objects/object_storage.py +++ b/linode_api4/objects/object_storage.py @@ -32,7 +32,7 @@ class ObjectStorageBucket(DerivedBase): """ A bucket where objects are stored in. - API documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-bucket """ api_endpoint = "/object-storage/buckets/{region}/{label}" @@ -89,7 +89,7 @@ def access_modify( and/or setting canned ACLs. For more fine-grained control of both systems, please use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-access-modify + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-object-storage-bucket-access :param acl: The Access Control Level of the bucket using a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly. @@ -130,7 +130,7 @@ def access_update( and/or setting canned ACLs. For more fine-grained control of both systems, please use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-access-update + API Documentation: https://techdocs.akamai.com/linode-api/reference/put-storage-bucket-access :param acl: The Access Control Level of the bucket using a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly. @@ -165,7 +165,7 @@ def ssl_cert_delete(self): Deletes this Object Storage bucket’s user uploaded TLS/SSL certificate and private key. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-tlsssl-cert-delete + API Documentation: https://techdocs.akamai.com/linode-api/reference/delete-object-storage-ssl :returns: True if the TLS/SSL certificate and private key in the bucket were successfully deleted. :rtype: bool @@ -189,7 +189,7 @@ def ssl_cert(self): if this bucket has a corresponding TLS/SSL certificate that was uploaded by an Account user. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-tlsssl-cert-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-ssl :returns: A result object which has a bool field indicating if this Bucket has a corresponding TLS/SSL certificate that was uploaded by an Account user. @@ -217,7 +217,7 @@ def ssl_cert_upload(self, certificate, private_key): To replace an expired certificate, delete your current certificate and upload a new one. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-tlsssl-cert-upload + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-object-storage-ssl :param certificate: Your Base64 encoded and PEM formatted SSL certificate. Line breaks must be represented as “\n” in the string @@ -267,7 +267,7 @@ def contents( This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-bucket-contents-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-bucket-content :param marker: The “marker” for this request, which can be used to paginate through large buckets. Its value should be the value of the @@ -326,7 +326,7 @@ def object_acl_config(self, name=None): This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-object-acl-config-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-bucket-acl :param name: The name of the object for which to retrieve its Access Control List (ACL). Use the Object Storage Bucket Contents List endpoint @@ -363,7 +363,7 @@ def object_acl_config_update(self, acl: ObjectStorageACL, name): This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-object-acl-config-update + API Documentation: https://techdocs.akamai.com/linode-api/reference/put-object-storage-bucket-acl :param acl: The Access Control Level of the bucket, as a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly. @@ -439,7 +439,7 @@ class ObjectStorageCluster(Base): A cluster where Object Storage is available. - API documentation: https://www.linode.com/docs/api/object-storage/#cluster-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-cluster """ api_endpoint = "/object-storage/clusters/{id}" @@ -466,7 +466,7 @@ def buckets_in_cluster(self, *filters): This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly. - API Documentation: https://www.linode.com/docs/api/object-storage/#object-storage-buckets-in-cluster-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-bucketin-cluster :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -489,7 +489,7 @@ class ObjectStorageKeys(Base): """ A keypair that allows third-party applications to access Linode Object Storage. - API documentation: https://www.linode.com/docs/api/object-storage/#object-storage-key-view + API documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-key """ api_endpoint = "/object-storage/keys/{id}" diff --git a/linode_api4/objects/placement.py b/linode_api4/objects/placement.py index eb5808ee..616c9061 100644 --- a/linode_api4/objects/placement.py +++ b/linode_api4/objects/placement.py @@ -7,15 +7,23 @@ from linode_api4.objects.serializable import JSONObject, StrEnum -class PlacementGroupAffinityType(StrEnum): +class PlacementGroupType(StrEnum): """ - An enum class that represents the available affinity policies for Linodes - in a Placement Group. + An enum class that represents the available types of a Placement Group. """ anti_affinity_local = "anti_affinity:local" +class PlacementGroupPolicy(StrEnum): + """ + An enum class that represents the policy for Linode assignments to a Placement Group. + """ + + strict = "strict" + flexible = "flexible" + + @dataclass class PlacementGroupMember(JSONObject): """ @@ -42,9 +50,9 @@ class PlacementGroup(Base): "id": Property(identifier=True), "label": Property(mutable=True), "region": Property(slug_relationship=Region), - "affinity_type": Property(), + "placement_group_type": Property(), + "placement_group_policy": Property(), "is_compliant": Property(), - "is_strict": Property(), "members": Property(json_object=PlacementGroupMember), } diff --git a/linode_api4/objects/profile.py b/linode_api4/objects/profile.py index 1b9be830..c37015e8 100644 --- a/linode_api4/objects/profile.py +++ b/linode_api4/objects/profile.py @@ -6,7 +6,7 @@ class AuthorizedApp(Base): """ An application with authorized access to an account. - API Documentation: https://www.linode.com/docs/api/profile/#authorized-app-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile-app """ api_endpoint = "/profile/apps/{id}" @@ -26,7 +26,7 @@ class PersonalAccessToken(Base): """ A Person Access Token associated with a Profile. - API Documentation: https://www.linode.com/docs/api/profile/#personal-access-token-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-personal-access-token """ api_endpoint = "/profile/tokens/{id}" @@ -60,7 +60,7 @@ class Profile(Base): """ A Profile containing information about the current User. - API Documentation: https://www.linode.com/docs/api/profile/#profile-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile """ api_endpoint = "/profile" @@ -88,7 +88,7 @@ def enable_tfa(self): Enables TFA for the token's user. This requies a follow-up request to confirm TFA. Returns the TFA secret that needs to be confirmed. - API Documentation: https://www.linode.com/docs/api/profile/#two-factor-secret-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-tfa-enable :returns: The TFA secret :rtype: str @@ -101,7 +101,7 @@ def confirm_tfa(self, code): """ Confirms TFA for an account. Needs a TFA code generated by enable_tfa - API Documentation: https://www.linode.com/docs/api/profile/#two-factor-authentication-confirmenable + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-tfa-confirm :param code: The Two Factor code you generated with your Two Factor secret. These codes are time-based, so be sure it is current. @@ -120,7 +120,7 @@ def disable_tfa(self): """ Turns off TFA for this user's account. - API Documentation: https://www.linode.com/docs/api/profile/#two-factor-authentication-disable + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-tfa-disable :returns: Returns true if operation was successful :rtype: bool @@ -134,7 +134,7 @@ def grants(self): """ Returns grants for the current user - API Documentation: https://www.linode.com/docs/api/profile/#grants-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile-grants :returns: The grants for the current user :rtype: UserGrants @@ -190,7 +190,7 @@ class SSHKey(Base): """ An SSH Public Key uploaded to your profile for use in Linode Instance deployments. - API Documentation: https://www.linode.com/docs/api/profile/#ssh-key-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ssh-key """ api_endpoint = "/profile/sshkeys/{id}" @@ -207,7 +207,7 @@ class TrustedDevice(Base): """ A Trusted Device for a User. - API Documentation: https://www.linode.com/docs/api/profile/#trusted-device-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-trusted-device """ api_endpoint = "/profile/devices/{id}" @@ -226,7 +226,7 @@ class ProfileLogin(Base): """ A Login object displaying information about a successful account login from this user. - API Documentation: https://www.linode.com/docs/api/profile/#login-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-profile-login """ api_endpoint = "profile/logins/{id}" diff --git a/linode_api4/objects/region.py b/linode_api4/objects/region.py index 9356da52..6d8178ef 100644 --- a/linode_api4/objects/region.py +++ b/linode_api4/objects/region.py @@ -20,7 +20,7 @@ class Region(Base): """ A Region. Regions correspond to individual data centers, each located in a different geographical area. - API Documentation: https://www.linode.com/docs/api/regions/#region-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-region """ api_endpoint = "/regions/{id}" @@ -56,7 +56,7 @@ class RegionAvailabilityEntry(JSONObject): """ Represents the availability of a Linode type within a region. - API Documentation: https://www.linode.com/docs/api/regions/#region-availability-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-region-availability """ region: str = None diff --git a/linode_api4/objects/support.py b/linode_api4/objects/support.py index 78d1d86d..f835b3f3 100644 --- a/linode_api4/objects/support.py +++ b/linode_api4/objects/support.py @@ -19,7 +19,7 @@ class TicketReply(DerivedBase): """ A reply to a Support Ticket. - API Documentation: https://www.linode.com/docs/api/support/#replies-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ticket-replies """ api_endpoint = "/support/tickets/{ticket_id}/replies" @@ -40,7 +40,7 @@ class SupportTicket(Base): """ An objected representing a Linode Support Ticket. - API Documentation: https://www.linode.com/docs/api/support/#replies-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-ticket-replies """ api_endpoint = "/support/tickets/{id}" @@ -117,7 +117,7 @@ def post_reply(self, description): """ Adds a reply to an existing Support Ticket. - API Documentation: https://www.linode.com/docs/api/support/#reply-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-ticket-reply :param description: The content of this Support Ticket Reply. :type description: str @@ -146,7 +146,7 @@ def upload_attachment(self, attachment: Union[Path, str]): """ Uploads an attachment to an existing Support Ticket. - API Documentation: https://www.linode.com/docs/api/support/#support-ticket-attachment-create + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-ticket-attachment :param attachment: A path to the file to upload as an attachment. :type attachment: str @@ -187,7 +187,7 @@ def support_ticket_close(self): """ Closes a Support Ticket. - API Documentation: https://www.linode.com/docs/api/support/#support-ticket-close + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-close-ticket """ self._client.post("{}/close".format(self.api_endpoint), model=self) diff --git a/linode_api4/objects/tag.py b/linode_api4/objects/tag.py index 856f0d75..4f2e7b1c 100644 --- a/linode_api4/objects/tag.py +++ b/linode_api4/objects/tag.py @@ -21,7 +21,7 @@ class Tag(Base): A User-defined labels attached to objects in your Account, such as Linodes. Used for specifying and grouping attributes of objects that are relevant to the User. - API Documentation: https://www.linode.com/docs/api/tags/#tags-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-tags """ api_endpoint = "/tags/{label}" @@ -64,7 +64,7 @@ def objects(self): Returns a list of objects with this Tag. This list may contain any taggable object type. - API Documentation: https://www.linode.com/docs/api/tags/#tagged-objects-list + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-tagged-objects :returns: Objects with this Tag :rtype: PaginatedList of objects with this Tag diff --git a/linode_api4/objects/volume.py b/linode_api4/objects/volume.py index 365ceb2d..6b126cc7 100644 --- a/linode_api4/objects/volume.py +++ b/linode_api4/objects/volume.py @@ -7,7 +7,7 @@ class Volume(Base): A single Block Storage Volume. Block Storage Volumes are persistent storage devices that can be attached to a Compute Instance and used to store any type of data. - API Documentation: https://www.linode.com/docs/api/volumes/#volume-view + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-volume """ api_endpoint = "/volumes/{id}" @@ -31,7 +31,7 @@ def attach(self, to_linode, config=None): """ Attaches this Volume to the given Linode. - API Documentation: https://www.linode.com/docs/api/volumes/#volume-attach + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-attach-volume :param to_linode: The ID or object of the Linode to attach the volume to. :type to_linode: Union[Instance, int] @@ -70,7 +70,7 @@ def detach(self): """ Detaches this Volume if it is attached - API Documentation: https://www.linode.com/docs/api/volumes/#volume-detach + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-detach-volume :returns: Returns true if operation was successful :rtype: bool @@ -83,7 +83,7 @@ def resize(self, size): """ Resizes this Volume - API Documentation: https://www.linode.com/docs/api/volumes/#volume-resize + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-resize-volume :param size: The Volume’s size, in GiB. :type size: int @@ -105,7 +105,7 @@ def clone(self, label): """ Clones this volume to a new volume in the same region with the given label - API Documentation: https://www.linode.com/docs/api/volumes/#volume-clone + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-clone-volume :param label: The label for the new volume. :type label: str diff --git a/pyproject.toml b/pyproject.toml index ea96865c..6720a965 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "linode_api4" -authors = [{ name = "Linode", email = "developers@linode.com" }] +authors = [{ name = "Linode", email = "devs@linode.com" }] description = "The official Python SDK for Linode API v4" readme = "README.rst" requires-python = ">=3.8" diff --git a/test/fixtures/linode_instances.json b/test/fixtures/linode_instances.json index 130d4428..38a3cf91 100644 --- a/test/fixtures/linode_instances.json +++ b/test/fixtures/linode_instances.json @@ -46,8 +46,8 @@ "placement_group": { "id": 123, "label": "test", - "affinity_type": "anti_affinity:local", - "is_strict": true + "placement_group_type": "anti_affinity:local", + "placement_group_policy": "strict" } }, { diff --git a/test/fixtures/placement_groups.json b/test/fixtures/placement_groups.json index f518e838..758fc852 100644 --- a/test/fixtures/placement_groups.json +++ b/test/fixtures/placement_groups.json @@ -4,8 +4,8 @@ "id": 123, "label": "test", "region": "eu-west", - "affinity_type": "anti_affinity:local", - "is_strict": true, + "placement_group_type": "anti_affinity:local", + "placement_group_policy": "strict", "is_compliant": true, "members": [ { diff --git a/test/fixtures/placement_groups_123.json b/test/fixtures/placement_groups_123.json index 5262bebe..453e9fd5 100644 --- a/test/fixtures/placement_groups_123.json +++ b/test/fixtures/placement_groups_123.json @@ -2,8 +2,8 @@ "id": 123, "label": "test", "region": "eu-west", - "affinity_type": "anti_affinity:local", - "is_strict": true, + "placement_group_type": "anti_affinity:local", + "placement_group_policy": "strict", "is_compliant": true, "members": [ { diff --git a/test/integration/conftest.py b/test/integration/conftest.py index 3638bd57..9ef80e90 100644 --- a/test/integration/conftest.py +++ b/test/integration/conftest.py @@ -8,7 +8,7 @@ import requests from requests.exceptions import ConnectionError, RequestException -from linode_api4 import ApiError, PlacementGroupAffinityType +from linode_api4 import ApiError, PlacementGroupPolicy, PlacementGroupType from linode_api4.linode_client import LinodeClient from linode_api4.objects import Region @@ -465,7 +465,8 @@ def create_placement_group(test_linode_client): pg = client.placement.group_create( "pythonsdk-" + timestamp, get_region(test_linode_client, {"Placement Group"}), - PlacementGroupAffinityType.anti_affinity_local, + PlacementGroupType.anti_affinity_local, + PlacementGroupPolicy.flexible, ) yield pg diff --git a/test/unit/objects/linode_test.py b/test/unit/objects/linode_test.py index e24f1107..700e5d0d 100644 --- a/test/unit/objects/linode_test.py +++ b/test/unit/objects/linode_test.py @@ -509,7 +509,7 @@ def test_get_placement_group(self): assert pg.id == 123 assert pg.label == "test" - assert pg.affinity_type == "anti_affinity:local" + assert pg.placement_group_type == "anti_affinity:local" # Invalidate the instance and try again # This makes sure the implicit refresh/cache logic works @@ -520,7 +520,7 @@ def test_get_placement_group(self): assert pg.id == 123 assert pg.label == "test" - assert pg.affinity_type == "anti_affinity:local" + assert pg.placement_group_type == "anti_affinity:local" def test_create_with_placement_group(self): """ diff --git a/test/unit/objects/placement_test.py b/test/unit/objects/placement_test.py index f3809d89..71d17164 100644 --- a/test/unit/objects/placement_test.py +++ b/test/unit/objects/placement_test.py @@ -1,9 +1,10 @@ from test.unit.base import ClientBaseCase +from linode_api4 import PlacementGroupPolicy from linode_api4.objects import ( PlacementGroup, - PlacementGroupAffinityType, PlacementGroupMember, + PlacementGroupType, ) @@ -42,8 +43,8 @@ def test_create_pg(self): pg = self.client.placement.group_create( "test", "eu-west", - PlacementGroupAffinityType.anti_affinity_local, - is_strict=True, + PlacementGroupType.anti_affinity_local, + PlacementGroupPolicy.strict, ) assert m.call_url == "/placement/groups" @@ -53,10 +54,10 @@ def test_create_pg(self): { "label": "test", "region": "eu-west", - "affinity_type": str( - PlacementGroupAffinityType.anti_affinity_local + "placement_group_type": str( + PlacementGroupType.anti_affinity_local ), - "is_strict": True, + "placement_group_policy": PlacementGroupPolicy.strict, }, ) @@ -109,8 +110,8 @@ def validate_pg_123(self, pg: PlacementGroup): assert pg.id == 123 assert pg.label == "test" assert pg.region.id == "eu-west" - assert pg.affinity_type == "anti_affinity:local" - assert pg.is_strict + assert pg.placement_group_type == "anti_affinity:local" + assert pg.placement_group_policy == "strict" assert pg.is_compliant assert pg.members[0] == PlacementGroupMember( linode_id=123, is_compliant=True