Skip to content
Merged
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
2 changes: 1 addition & 1 deletion lib/binarylane/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Account:
"""
Attributes:
email (str): The email address registered for this account.
email_verified (bool): Whether this account has been verified. Un-verified accounts are subject to some
email_verified (bool): Whether this account has been verified. Unverified accounts are subject to some
restrictions.
two_factor_authentication_enabled (bool): Whether this account has enabled app-based two factor authentication.
status (AccountStatus): The status of this account.
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
1 change: 1 addition & 0 deletions lib/binarylane/models/advanced_server_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class AdvancedServerFeatures:
| pc_i440fx_5point0 | PC i440FX 5.0 |
| pc_i440fx_5point1 | PC i440FX 5.1 |
| pc_i440fx_7point2 | PC i440FX 7.2 |
| pc_i440fx_7point2point1 | PC i440FX 7.2.1 |
| pc_i440fx_8point2 | PC i440FX 8.2 |

"""
Expand Down
1 change: 1 addition & 0 deletions lib/binarylane/models/change_advanced_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ChangeAdvancedFeatures:
| pc_i440fx_5point0 | PC i440FX 5.0 |
| pc_i440fx_5point1 | PC i440FX 5.1 |
| pc_i440fx_7point2 | PC i440FX 7.2 |
| pc_i440fx_7point2point1 | PC i440FX 7.2.1 |
| pc_i440fx_8point2 | PC i440FX 8.2 |

automatic_machine_type (Union[Unset, None, bool]): Set to true to use best available machine type. If this is
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
11 changes: 10 additions & 1 deletion lib/binarylane/models/create_server_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class CreateServerRequest:
left null if the Image does not support UserData, see DistributionInfo.Features for more information.
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.
will be disabled. Disabling port blocking is only available to verified 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
8 changes: 8 additions & 0 deletions lib/binarylane/models/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class Networks:
recent_ddos (bool): If this is true this server has been the target of a recent DDOS attack. An email will have
been sent to your email address when the DDOS was detected (and if it has ended, when it ended) with more
details.
mac_address (str): The MAC address of this server's primary network interface. Customers may need this for ARP
entries, DHCP reservations on a VPC, or MAC-based licensing.
separate_private_network_interface (Union[Unset, None, bool]): Whether a separate private network interface is
provided for the server's VPC traffic.
source_and_destination_check (Union[Unset, None, bool]): If enabled, this server is only able to send and
Expand All @@ -32,6 +34,7 @@ class Networks:
v6: List[Network]
port_blocking: bool
recent_ddos: bool
mac_address: str
separate_private_network_interface: Union[Unset, None, bool] = UNSET
source_and_destination_check: Union[Unset, None, bool] = UNSET
ipv6_reverse_nameservers: Union[Unset, None, List[str]] = UNSET
Expand All @@ -52,6 +55,7 @@ def to_dict(self) -> Dict[str, Any]:

port_blocking = self.port_blocking
recent_ddos = self.recent_ddos
mac_address = self.mac_address
separate_private_network_interface = self.separate_private_network_interface
source_and_destination_check = self.source_and_destination_check
ipv6_reverse_nameservers: Union[Unset, None, List[str]] = UNSET
Expand All @@ -69,6 +73,7 @@ def to_dict(self) -> Dict[str, Any]:
"v6": v6,
"port_blocking": port_blocking,
"recent_ddos": recent_ddos,
"mac_address": mac_address,
}
)
if separate_private_network_interface is not UNSET:
Expand Down Expand Up @@ -101,6 +106,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:

recent_ddos = d.pop("recent_ddos")

mac_address = d.pop("mac_address")

separate_private_network_interface = d.pop("separate_private_network_interface", UNSET)

source_and_destination_check = d.pop("source_and_destination_check", UNSET)
Expand All @@ -112,6 +119,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
v6=v6,
port_blocking=port_blocking,
recent_ddos=recent_ddos,
mac_address=mac_address,
separate_private_network_interface=separate_private_network_interface,
source_and_destination_check=source_and_destination_check,
ipv6_reverse_nameservers=ipv6_reverse_nameservers,
Expand Down
Loading
Loading