Skip to content

Commit

Permalink
Merge pull request #442 from linode/dev
Browse files Browse the repository at this point in the history
v5.19.0
  • Loading branch information
jriddle-linode authored Jul 24, 2024
2 parents 58d2ba9 + 06f72c1 commit bc9f123
Show file tree
Hide file tree
Showing 55 changed files with 509 additions and 310 deletions.
3 changes: 3 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,7 +21,7 @@ changelog:
- title: 🧪 Testing Improvements
labels:
- testing
- title: ⚙️ Repo/CI Improvements
- title: ⚙️ Repo/CI Improvements
labels:
- repo-ci-improvement
- title: 📖 Documentation
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release-cross-repo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
46 changes: 23 additions & 23 deletions linode_api4/groups/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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
Expand Down Expand Up @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linode_api4/groups/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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</linode_api4/objects/filtering>`
Expand Down
14 changes: 7 additions & 7 deletions linode_api4/groups/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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</linode_api4/objects/filtering>`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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</linode_api4/objects/filtering>`
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions linode_api4/groups/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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
Expand Down
Loading

0 comments on commit bc9f123

Please sign in to comment.