Skip to content

Commit

Permalink
doc: Replace outdated API documentation TODOs with URLs (#447)
Browse files Browse the repository at this point in the history
* Replace outdated documentation TODOs

* Apply to child accounts
  • Loading branch information
lgarber-akamai authored Aug 6, 2024
1 parent 72e6de4 commit ebf5cdd
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion linode_api4/groups/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linode_api4/groups/placement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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</linode_api4/objects/filtering>`
Expand Down
6 changes: 3 additions & 3 deletions linode_api4/groups/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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</linode_api4/objects/filtering>`
Expand All @@ -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
Expand Down Expand Up @@ -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</linode_api4/objects/filtering>`
Expand Down
6 changes: 3 additions & 3 deletions linode_api4/objects/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ 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}"
id_attribute = "euuid"

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),
Expand Down
14 changes: 7 additions & 7 deletions linode_api4/objects/linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 [
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions linode_api4/objects/placement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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": [
Expand Down
8 changes: 4 additions & 4 deletions linode_api4/objects/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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}"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ebf5cdd

Please sign in to comment.