From 3d66e36f4dbf9274fa96b310c8bdd30ee8095e8e Mon Sep 17 00:00:00 2001 From: Nathan O'Sullivan Date: Tue, 14 Apr 2026 11:07:47 +1000 Subject: [PATCH] chore: update API to v0.36.0 --- .../reverse_names/post_v2_reverse_names_ipv6.py | 3 +++ ...ost_v_2_servers_server_id_actions_add_disk.py | 4 ++++ ...2_servers_server_id_actions_change_network.py | 16 ++++++++-------- ..._v_2_servers_server_id_actions_delete_disk.py | 4 ++++ lib/binarylane/models/action.py | 14 ++++++++++++++ lib/binarylane/models/change_network.py | 4 ++-- .../models/change_size_options_request.py | 2 +- lib/binarylane/models/create_server_request.py | 9 +++++++++ lib/binarylane/models/invoice.py | 12 +++++++++++- lib/binarylane/models/size_options.py | 3 ++- lib/binarylane/models/size_options_request.py | 2 +- .../console/commands/api/get_v2_actions.py | 2 ++ .../commands/api/get_v2_customers_my_invoices.py | 3 ++- ...ustomers_my_unpaid_payment_failed_invoices.py | 3 ++- .../api/get_v2_servers_server_id_actions.py | 2 ++ .../commands/api/post_v2_reverse_names_ipv6.py | 1 + .../console/commands/api/post_v2_servers.py | 12 +++++++++++- ...2_servers_server_id_actions_change_network.py | 2 +- .../post_v_2_servers_server_id_actions_resize.py | 2 +- 19 files changed, 81 insertions(+), 19 deletions(-) diff --git a/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py b/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py index 980976d5..73827989 100644 --- a/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py +++ b/lib/binarylane/api/reverse_names/post_v2_reverse_names_ipv6.py @@ -43,6 +43,9 @@ def _parse_response( response_200 = ActionResponse.from_dict(response.json()) return response_200 + if response.status_code == HTTPStatus.NO_CONTENT: + response_204 = cast(Any, None) + return response_204 if response.status_code == HTTPStatus.BAD_REQUEST: response_400 = ValidationProblemDetails.from_dict(response.json()) diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py index 1b1883bd..3098d70e 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_add_disk.py @@ -86,6 +86,7 @@ def sync_detailed( This is used to add an additional disk in unallocated storage space. This does not alter the total disk space available to your server: to add additional disk space for your server use the 'Resize' action. + **This action may require the server to be rebooted.** Args: @@ -125,6 +126,7 @@ def sync( This is used to add an additional disk in unallocated storage space. This does not alter the total disk space available to your server: to add additional disk space for your server use the 'Resize' action. + **This action may require the server to be rebooted.** Args: @@ -157,6 +159,7 @@ async def asyncio_detailed( This is used to add an additional disk in unallocated storage space. This does not alter the total disk space available to your server: to add additional disk space for your server use the 'Resize' action. + **This action may require the server to be rebooted.** Args: @@ -194,6 +197,7 @@ async def asyncio( This is used to add an additional disk in unallocated storage space. This does not alter the total disk space available to your server: to add additional disk space for your server use the 'Resize' action. + **This action may require the server to be rebooted.** Args: diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py index afe65c3e..15b528fb 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_change_network.py @@ -83,8 +83,8 @@ def sync_detailed( ) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: """Move a Server to an Existing Network - This is used to move a server either to an already defined virtual private cloud, or the default - public network in the server's region. + This is used to move a server either to an already defined virtual private cloud, or the public + network for the server's region. Args: server_id (int): The ID of the server on which the action should be performed. @@ -120,8 +120,8 @@ def sync( ) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: """Move a Server to an Existing Network - This is used to move a server either to an already defined virtual private cloud, or the default - public network in the server's region. + This is used to move a server either to an already defined virtual private cloud, or the public + network for the server's region. Args: server_id (int): The ID of the server on which the action should be performed. @@ -150,8 +150,8 @@ async def asyncio_detailed( ) -> Response[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: """Move a Server to an Existing Network - This is used to move a server either to an already defined virtual private cloud, or the default - public network in the server's region. + This is used to move a server either to an already defined virtual private cloud, or the public + network for the server's region. Args: server_id (int): The ID of the server on which the action should be performed. @@ -185,8 +185,8 @@ async def asyncio( ) -> Optional[Union[ActionResponse, Any, ProblemDetails, ValidationProblemDetails]]: """Move a Server to an Existing Network - This is used to move a server either to an already defined virtual private cloud, or the default - public network in the server's region. + This is used to move a server either to an already defined virtual private cloud, or the public + network for the server's region. Args: server_id (int): The ID of the server on which the action should be performed. diff --git a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py index 606d8cf1..4afb55fa 100644 --- a/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py +++ b/lib/binarylane/api/server_actions/post_v_2_servers_server_id_actions_delete_disk.py @@ -85,6 +85,7 @@ def sync_detailed( This is used to delete a disk added using the 'AddDisk' action. **NB: This is a destructive operation and no further confirmation will be requested.** + **This action may require the server to be rebooted.** Args: @@ -123,6 +124,7 @@ def sync( This is used to delete a disk added using the 'AddDisk' action. **NB: This is a destructive operation and no further confirmation will be requested.** + **This action may require the server to be rebooted.** Args: @@ -154,6 +156,7 @@ async def asyncio_detailed( This is used to delete a disk added using the 'AddDisk' action. **NB: This is a destructive operation and no further confirmation will be requested.** + **This action may require the server to be rebooted.** Args: @@ -190,6 +193,7 @@ async def asyncio( This is used to delete a disk added using the 'AddDisk' action. **NB: This is a destructive operation and no further confirmation will be requested.** + **This action may require the server to be rebooted.** Args: diff --git a/lib/binarylane/models/action.py b/lib/binarylane/models/action.py index 5b589201..c46192d2 100644 --- a/lib/binarylane/models/action.py +++ b/lib/binarylane/models/action.py @@ -30,6 +30,8 @@ class Action: type (str): The type of this action. started_at (datetime.datetime): The timestamp in ISO8601 format of when processing of this action started. + title (str): A short display name for the action. + reason (str): A user-friendly explanation of what is happening. progress (ActionProgress): Information about the current progress of the action. Some actions are divided into 'steps' and this may also contain information about the current and completed steps. completed_at (Union[Unset, None, datetime.datetime]): The timestamp in ISO8601 format of when processing of this @@ -60,6 +62,8 @@ class Action: status: ActionStatus type: str started_at: datetime.datetime + title: str + reason: str progress: ActionProgress completed_at: Union[Unset, None, datetime.datetime] = UNSET resource_type: Union[Unset, None, ResourceType] = UNSET @@ -78,6 +82,8 @@ def to_dict(self) -> Dict[str, Any]: type = self.type started_at = self.started_at.isoformat() + title = self.title + reason = self.reason progress = self.progress.to_dict() completed_at: Union[Unset, None, str] = UNSET @@ -110,6 +116,8 @@ def to_dict(self) -> Dict[str, Any]: "status": status, "type": type, "started_at": started_at, + "title": title, + "reason": reason, "progress": progress, } ) @@ -143,6 +151,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: started_at = isoparse(d.pop("started_at")) + title = d.pop("title") + + reason = d.pop("reason") + progress = ActionProgress.from_dict(d.pop("progress")) _completed_at = d.pop("completed_at", UNSET) @@ -194,6 +206,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: status=status, type=type, started_at=started_at, + title=title, + reason=reason, progress=progress, completed_at=completed_at, resource_type=resource_type, diff --git a/lib/binarylane/models/change_network.py b/lib/binarylane/models/change_network.py index dcc26238..b98459aa 100644 --- a/lib/binarylane/models/change_network.py +++ b/lib/binarylane/models/change_network.py @@ -16,8 +16,8 @@ class ChangeNetwork: Attributes: type (ChangeNetworkType): - vpc_id (Union[Unset, None, int]): If this is null the server will be moved into the default public network for - the server's region. + vpc_id (Union[Unset, None, int]): If this is null the server will be moved into the public network for the + server's region. """ type: ChangeNetworkType diff --git a/lib/binarylane/models/change_size_options_request.py b/lib/binarylane/models/change_size_options_request.py index ba45e209..f195eaab 100644 --- a/lib/binarylane/models/change_size_options_request.py +++ b/lib/binarylane/models/change_size_options_request.py @@ -49,7 +49,7 @@ class ChangeSizeOptionsRequest: Leave null to accept the default for the size if this is a new server or a resize to a different base size, or to keep the current value if this a resize with the same base size but different options. - Valid values (when converted to GB by multiplying the value provided by 1024): + Valid values (when converted to GB by multiplying the value provided by 1000): - must be a multiple of 5GB - > 30GB must be a multiple of 10 - > 200GB must be a multiple of 100 diff --git a/lib/binarylane/models/create_server_request.py b/lib/binarylane/models/create_server_request.py index d462f489..43955028 100644 --- a/lib/binarylane/models/create_server_request.py +++ b/lib/binarylane/models/create_server_request.py @@ -38,6 +38,8 @@ class CreateServerRequest: port_blocking (Union[Unset, None, bool]): Port blocking of outgoing connections for email, SSH and Remote Desktop (TCP ports 22, 25, and 3389) is enabled by default for all new servers. If this is false port blocking will be disabled. Disabling port blocking is only available to reviewed accounts. + separate_private_network_interface (Union[Unset, None, bool]): If true this will enable a separate private + network interface for the server. This is only available for servers in a VPC. password (Union[Unset, None, str]): If this is provided the default remote user account's password will be set to this value. If this is null a random password will be generated and emailed to the account email address. """ @@ -55,6 +57,7 @@ class CreateServerRequest: licenses: Union[Unset, None, List[License]] = UNSET user_data: Union[Unset, None, str] = UNSET port_blocking: Union[Unset, None, bool] = UNSET + separate_private_network_interface: Union[Unset, None, bool] = UNSET password: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -100,6 +103,7 @@ def to_dict(self) -> Dict[str, Any]: user_data = self.user_data port_blocking = self.port_blocking + separate_private_network_interface = self.separate_private_network_interface password = self.password field_dict: Dict[str, Any] = {} @@ -131,6 +135,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["user_data"] = user_data if port_blocking is not UNSET: field_dict["port_blocking"] = port_blocking + if separate_private_network_interface is not UNSET: + field_dict["separate_private_network_interface"] = separate_private_network_interface if password is not UNSET: field_dict["password"] = password @@ -189,6 +195,8 @@ def _parse_ssh_keys_item(data: object) -> Union[int, str]: port_blocking = d.pop("port_blocking", UNSET) + separate_private_network_interface = d.pop("separate_private_network_interface", UNSET) + password = d.pop("password", UNSET) create_server_request = cls( @@ -205,6 +213,7 @@ def _parse_ssh_keys_item(data: object) -> Union[int, str]: licenses=licenses, user_data=user_data, port_blocking=port_blocking, + separate_private_network_interface=separate_private_network_interface, password=password, ) diff --git a/lib/binarylane/models/invoice.py b/lib/binarylane/models/invoice.py index 05e0cd48..99248e18 100644 --- a/lib/binarylane/models/invoice.py +++ b/lib/binarylane/models/invoice.py @@ -32,7 +32,10 @@ class Invoice: this may identify the service, otherwise it will be the account reference. payment_failure_count (Union[Unset, None, int]): If this is included it indicates the number of failed attempts at processing payment for this invoice that have occurred. - invoice_download_url (Union[Unset, None, str]): The download URL for the rendered version of the invoice. + invoice_download_url (Union[Unset, None, str]): The download URL for the PDF version of the invoice. This URL + expires 24 hours after it is generated. + invoice_view_url (Union[Unset, None, str]): The URL for the HTML rendered version of the invoice. This URL + expires 24 hours after it is generated. """ invoice_id: int @@ -49,6 +52,7 @@ class Invoice: reference: Union[Unset, None, str] = UNSET payment_failure_count: Union[Unset, None, int] = UNSET invoice_download_url: Union[Unset, None, str] = UNSET + invoice_view_url: Union[Unset, None, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -75,6 +79,7 @@ def to_dict(self) -> Dict[str, Any]: reference = self.reference payment_failure_count = self.payment_failure_count invoice_download_url = self.invoice_download_url + invoice_view_url = self.invoice_view_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -99,6 +104,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["payment_failure_count"] = payment_failure_count if invoice_download_url is not UNSET: field_dict["invoice_download_url"] = invoice_download_url + if invoice_view_url is not UNSET: + field_dict["invoice_view_url"] = invoice_view_url return field_dict @@ -138,6 +145,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: invoice_download_url = d.pop("invoice_download_url", UNSET) + invoice_view_url = d.pop("invoice_view_url", UNSET) + invoice = cls( invoice_id=invoice_id, invoice_number=invoice_number, @@ -153,6 +162,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: reference=reference, payment_failure_count=payment_failure_count, invoice_download_url=invoice_download_url, + invoice_view_url=invoice_view_url, ) invoice.additional_properties = d diff --git a/lib/binarylane/models/size_options.py b/lib/binarylane/models/size_options.py index 0944174d..a1819288 100644 --- a/lib/binarylane/models/size_options.py +++ b/lib/binarylane/models/size_options.py @@ -21,7 +21,8 @@ class SizeOptions: disk_cost_per_additional_gigabyte (float): The additional cost per GB per month for additional storage space. memory_max (int): The maximum memory in MB permitted on this size. memory_cost_per_additional_megabyte (float): The additional cost per MB per month for additional memory. - transfer_max (float): The maximum transfer in TB permitted for this size. + transfer_max (float): The maximum transfer in TB permitted for this size. If this is the same as Size.Transfer + no additional transfer is supported. transfer_cost_per_additional_gigabyte (float): The additional cost per GB per month for additional included transfer. ipv4_addresses_max (int): The maximum number of IPv4 addresses permitted on this size. diff --git a/lib/binarylane/models/size_options_request.py b/lib/binarylane/models/size_options_request.py index 73fd8eef..1c66b626 100644 --- a/lib/binarylane/models/size_options_request.py +++ b/lib/binarylane/models/size_options_request.py @@ -49,7 +49,7 @@ class SizeOptionsRequest: Leave null to accept the default for the size if this is a new server or a resize to a different base size, or to keep the current value if this a resize with the same base size but different options. - Valid values (when converted to GB by multiplying the value provided by 1024): + Valid values (when converted to GB by multiplying the value provided by 1000): - must be a multiple of 5GB - > 30GB must be a multiple of 10 - > 200GB must be a multiple of 100 diff --git a/src/binarylane/console/commands/api/get_v2_actions.py b/src/binarylane/console/commands/api/get_v2_actions.py index ccb4166e..1706270a 100644 --- a/src/binarylane/console/commands/api/get_v2_actions.py +++ b/src/binarylane/console/commands/api/get_v2_actions.py @@ -51,6 +51,8 @@ def fields(self) -> Dict[str, str]: """, "type": """The type of this action.""", "started_at": """The timestamp in ISO8601 format of when processing of this action started.""", + "title": """A short display name for the action.""", + "reason": """A user-friendly explanation of what is happening.""", "progress": """Information about the current progress of the action. Some actions are divided into 'steps' and this may also contain information about the current and completed steps.""", "completed_at": """The timestamp in ISO8601 format of when processing of this action completed. If this value is null the action is currently in progress.""", "resource_type": """The resource type (if any) associated with this action. diff --git a/src/binarylane/console/commands/api/get_v2_customers_my_invoices.py b/src/binarylane/console/commands/api/get_v2_customers_my_invoices.py index 74a63f6a..e48f8f3b 100644 --- a/src/binarylane/console/commands/api/get_v2_customers_my_invoices.py +++ b/src/binarylane/console/commands/api/get_v2_customers_my_invoices.py @@ -55,7 +55,8 @@ def fields(self) -> Dict[str, str]: "invoice_items": """The individual items that make up invoice.""", "reference": """The reference for this invoice. If this invoice is for a single service this may identify the service, otherwise it will be the account reference.""", "payment_failure_count": """If this is included it indicates the number of failed attempts at processing payment for this invoice that have occurred.""", - "invoice_download_url": """The download URL for the rendered version of the invoice.""", + "invoice_download_url": """The download URL for the PDF version of the invoice. This URL expires 24 hours after it is generated.""", + "invoice_view_url": """The URL for the HTML rendered version of the invoice. This URL expires 24 hours after it is generated.""", } @property diff --git a/src/binarylane/console/commands/api/get_v2_customers_my_unpaid_payment_failed_invoices.py b/src/binarylane/console/commands/api/get_v2_customers_my_unpaid_payment_failed_invoices.py index 135c50fc..872cbf60 100644 --- a/src/binarylane/console/commands/api/get_v2_customers_my_unpaid_payment_failed_invoices.py +++ b/src/binarylane/console/commands/api/get_v2_customers_my_unpaid_payment_failed_invoices.py @@ -54,7 +54,8 @@ def fields(self) -> Dict[str, str]: "invoice_items": """The individual items that make up invoice.""", "reference": """The reference for this invoice. If this invoice is for a single service this may identify the service, otherwise it will be the account reference.""", "payment_failure_count": """If this is included it indicates the number of failed attempts at processing payment for this invoice that have occurred.""", - "invoice_download_url": """The download URL for the rendered version of the invoice.""", + "invoice_download_url": """The download URL for the PDF version of the invoice. This URL expires 24 hours after it is generated.""", + "invoice_view_url": """The URL for the HTML rendered version of the invoice. This URL expires 24 hours after it is generated.""", } @property diff --git a/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py b/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py index 168bb136..87beb300 100644 --- a/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py +++ b/src/binarylane/console/commands/api/get_v2_servers_server_id_actions.py @@ -56,6 +56,8 @@ def fields(self) -> Dict[str, str]: """, "type": """The type of this action.""", "started_at": """The timestamp in ISO8601 format of when processing of this action started.""", + "title": """A short display name for the action.""", + "reason": """A user-friendly explanation of what is happening.""", "progress": """Information about the current progress of the action. Some actions are divided into 'steps' and this may also contain information about the current and completed steps.""", "completed_at": """The timestamp in ISO8601 format of when processing of this action completed. If this value is null the action is currently in progress.""", "resource_type": """The resource type (if any) associated with this action. diff --git a/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py b/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py index ee11eff0..60ac3bda 100644 --- a/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py +++ b/src/binarylane/console/commands/api/post_v2_reverse_names_ipv6.py @@ -57,6 +57,7 @@ def request( assert isinstance(request, CommandRequest) # HTTPStatus.OK: ActionResponse + # HTTPStatus.NO_CONTENT: Any # HTTPStatus.BAD_REQUEST: ValidationProblemDetails # HTTPStatus.NOT_FOUND: ProblemDetails # HTTPStatus.UNAUTHORIZED: Any diff --git a/src/binarylane/console/commands/api/post_v2_servers.py b/src/binarylane/console/commands/api/post_v2_servers.py index ea8d6281..19676196 100644 --- a/src/binarylane/console/commands/api/post_v2_servers.py +++ b/src/binarylane/console/commands/api/post_v2_servers.py @@ -236,7 +236,7 @@ def lookup_vpc_id(ref: str) -> Union[None, int]: If specified this is the absolute value, not just the additional transfer above what is included in the size. Leave null to accept the default for the size if this is a new server or a resize to a different base size, or to keep the current value if this a resize with the same base size but different options. -Valid values (when converted to GB by multiplying the value provided by 1024): +Valid values (when converted to GB by multiplying the value provided by 1000): - must be a multiple of 5GB - > 30GB must be a multiple of 10 - > 200GB must be a multiple of 100 @@ -294,6 +294,16 @@ def lookup_vpc_id(ref: str) -> Union[None, int]: ) ) + json_body.add( + PrimitiveAttribute( + "separate_private_network_interface", + Union[Unset, None, bool], + required=False, + option_name="separate-private-network-interface", + description="""If true this will enable a separate private network interface for the server. This is only available for servers in a VPC.""", + ) + ) + json_body.add( PrimitiveAttribute( "password", diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py index 6f0a4e37..138ca149 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_change_network.py @@ -73,7 +73,7 @@ def lookup_vpc_id(ref: str) -> Union[None, int]: required=False, option_name=("vpc", "vpc-id"), metavar="vpc", - description="""If this is null the server will be moved into the default public network for the server's region.""", + description="""If this is null the server will be moved into the public network for the server's region.""", lookup=lookup_vpc_id, ) ) diff --git a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py index 30b57bce..6648d1ef 100644 --- a/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py +++ b/src/binarylane/console/commands/api/post_v_2_servers_server_id_actions_resize.py @@ -186,7 +186,7 @@ def lookup_server_id(ref: str) -> Union[None, int]: If specified this is the absolute value, not just the additional transfer above what is included in the size. Leave null to accept the default for the size if this is a new server or a resize to a different base size, or to keep the current value if this a resize with the same base size but different options. -Valid values (when converted to GB by multiplying the value provided by 1024): +Valid values (when converted to GB by multiplying the value provided by 1000): - must be a multiple of 5GB - > 30GB must be a multiple of 10 - > 200GB must be a multiple of 100