Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions lib/binarylane/models/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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,
}
)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions lib/binarylane/models/change_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/binarylane/models/change_size_options_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions lib/binarylane/models/create_server_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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)

Expand Down Expand Up @@ -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] = {}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand All @@ -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,
)

Expand Down
12 changes: 11 additions & 1 deletion lib/binarylane/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]:
Expand All @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/binarylane/models/size_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/binarylane/models/size_options_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/binarylane/console/commands/api/get_v2_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion src/binarylane/console/commands/api/post_v2_servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down
Loading
Loading