From ebf5cdd3779d0c58f72b08267c5d277b5baccf81 Mon Sep 17 00:00:00 2001 From: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:27:36 -0400 Subject: [PATCH] doc: Replace outdated API documentation TODOs with URLs (#447) * Replace outdated documentation TODOs * Apply to child accounts --- linode_api4/groups/account.py | 2 +- linode_api4/groups/placement.py | 2 +- linode_api4/groups/vpc.py | 6 +++--- linode_api4/objects/account.py | 6 +++--- linode_api4/objects/linode.py | 14 +++++++------- linode_api4/objects/placement.py | 4 +--- linode_api4/objects/vpc.py | 8 ++++---- 7 files changed, 20 insertions(+), 22 deletions(-) diff --git a/linode_api4/groups/account.py b/linode_api4/groups/account.py index 88f53ed09..c2c69c624 100644 --- a/linode_api4/groups/account.py +++ b/linode_api4/groups/account.py @@ -504,7 +504,7 @@ def child_accounts(self, *filters): NOTE: Parent/Child related features may not be generally available. - API doc: TBD + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-child-accounts :returns: a list of all child accounts. :rtype: PaginatedList of ChildAccount diff --git a/linode_api4/groups/placement.py b/linode_api4/groups/placement.py index e56970346..b1fa0f32b 100644 --- a/linode_api4/groups/placement.py +++ b/linode_api4/groups/placement.py @@ -20,7 +20,7 @@ def groups(self, *filters): groups = client.placement.groups(PlacementGroup.label == "test") - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-placement-groups :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` diff --git a/linode_api4/groups/vpc.py b/linode_api4/groups/vpc.py index f3f4f27b6..fa8066cea 100644 --- a/linode_api4/groups/vpc.py +++ b/linode_api4/groups/vpc.py @@ -16,7 +16,7 @@ def __call__(self, *filters) -> PaginatedList: vpcs = client.vpcs() - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vpcs :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` @@ -38,7 +38,7 @@ def create( """ Creates a new VPC under your Linode account. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-vpc :param label: The label of the newly created VPC. :type label: str @@ -90,7 +90,7 @@ def ips(self, *filters) -> PaginatedList: vpc_ips = client.vpcs.ips() - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vpcs-ips :param filters: Any number of filters to apply to this query. See :doc:`Filtering Collections` diff --git a/linode_api4/objects/account.py b/linode_api4/objects/account.py index 31e3cf33d..9365a9127 100644 --- a/linode_api4/objects/account.py +++ b/linode_api4/objects/account.py @@ -62,7 +62,7 @@ class ChildAccount(Account): NOTE: Parent/Child related features may not be generally available. - API Documentation: TBD + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-child-account """ api_endpoint = "/account/child-accounts/{euuid}" @@ -70,9 +70,9 @@ class ChildAccount(Account): def create_token(self, **kwargs): """ - Create a ephemeral token for accessing the child account. + Create an ephemeral token for accessing the child account. - API Documentation: TBD + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-child-account-token """ resp = self._client.post( "{}/token".format(self.api_endpoint), diff --git a/linode_api4/objects/linode.py b/linode_api4/objects/linode.py index 0e43f1567..39564200f 100644 --- a/linode_api4/objects/linode.py +++ b/linode_api4/objects/linode.py @@ -294,7 +294,7 @@ class NetworkInterface(DerivedBase): NOTE: This class cannot be used for the `interfaces` attribute on Config POST and PUT requests. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-config-interface """ api_endpoint = ( @@ -369,7 +369,7 @@ class ConfigInterface(JSONObject): If you would like to access a config interface directly, consider using :any:`NetworkInterface`. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-config-interface """ purpose: str = "public" @@ -462,7 +462,7 @@ def network_interfaces(self): This differs from the `interfaces` field as each NetworkInterface object is treated as its own API object. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-config-interfaces """ return [ @@ -523,7 +523,7 @@ def interface_create_public(self, primary=False) -> NetworkInterface: """ Creates a public interface for this Configuration Profile. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-linode-config-interface :param primary: Whether this interface is a primary interface. :type primary: bool @@ -540,7 +540,7 @@ def interface_create_vlan( """ Creates a VLAN interface for this Configuration Profile. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-linode-config-interface :param label: The label of the VLAN to associate this interface with. :type label: str @@ -569,7 +569,7 @@ def interface_create_vpc( """ Creates a VPC interface for this Configuration Profile. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-linode-config-interface :param subnet: The VPC subnet to associate this interface with. :type subnet: int or VPCSubnet @@ -605,7 +605,7 @@ def interface_reorder(self, interfaces: List[Union[int, NetworkInterface]]): """ Change the order of the interfaces for this Configuration Profile. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-linode-config-interfaces :param interfaces: A list of interfaces in the desired order. :type interfaces: List of str or NetworkInterface diff --git a/linode_api4/objects/placement.py b/linode_api4/objects/placement.py index 616c9061f..aa894af33 100644 --- a/linode_api4/objects/placement.py +++ b/linode_api4/objects/placement.py @@ -41,7 +41,7 @@ class PlacementGroup(Base): A VM Placement Group, defining the affinity policy for Linodes created in a region. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-placement-group """ api_endpoint = "/placement/groups/{id}" @@ -66,8 +66,6 @@ def assign( :param linodes: A list of Linodes to assign to the Placement Group. :type linodes: List[Union[Instance, int]] - :param compliant_only: TODO - :type compliant_only: bool """ params = { "linodes": [ diff --git a/linode_api4/objects/vpc.py b/linode_api4/objects/vpc.py index e44eebcdc..456bdcfbc 100644 --- a/linode_api4/objects/vpc.py +++ b/linode_api4/objects/vpc.py @@ -23,7 +23,7 @@ class VPCSubnet(DerivedBase): """ An instance of a VPC subnet. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vpc-subnet """ api_endpoint = "/vpcs/{vpc_id}/subnets/{id}" @@ -44,7 +44,7 @@ class VPC(Base): """ An instance of a VPC. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vpc """ api_endpoint = "/vpcs/{id}" @@ -68,7 +68,7 @@ def subnet_create( """ Creates a new Subnet object under this VPC. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/post-vpc-subnet :param label: The label of this subnet. :type label: str @@ -104,7 +104,7 @@ def ips(self) -> PaginatedList: """ Get all the IP addresses under this VPC. - API Documentation: TODO + API Documentation: https://techdocs.akamai.com/linode-api/reference/get-vpc-ips :returns: A list of VPCIPAddresses the acting user can access. :rtype: PaginatedList of VPCIPAddress