Skip to content

Commit 9bb25ce

Browse files
authored
chore: update API to v0.34.0 (#78)
1 parent 3f02c32 commit 9bb25ce

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

lib/binarylane/models/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Account:
1818
email (str): The email address registered for this account.
1919
email_verified (bool): Whether this account has been verified. Un-verified accounts are subject to some
2020
restrictions.
21-
two_factor_authentication_enabled (bool): Whether this account has enabled two factor authentication.
21+
two_factor_authentication_enabled (bool): Whether this account has enabled app-based two factor authentication.
2222
status (AccountStatus): The status of this account.
2323
2424
| Value | Description |

lib/binarylane/models/create_server_request.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class CreateServerRequest:
2424
Options.daily_backups will override this value if provided. Setting this to false has no effect.
2525
ipv6 (Union[Unset, None, bool]): If true this will enable IPv6 for this server.
2626
vpc_id (Union[Unset, None, int]): Leave null to use default (public) network for the selected region.
27+
vpc_ipv4_address (Union[Unset, None, str]): If provided this will be the Ipv4 address for the server's private
28+
VPC network adapter. If this is null an unused Ipv4 address will be assigned. This field is only valid when
29+
VpcId is provided.
2730
ssh_keys (Union[Unset, None, List[Union[int, str]]]): This may be either the SSH keys Ids or fingerprints. If
2831
this is null or not provided any SSH keys that have been marked as default will be deployed (if the operating
2932
system supports SSH keys). Submit an empty array to disable deployment of default keys.
@@ -46,6 +49,7 @@ class CreateServerRequest:
4649
backups: Union[Unset, None, bool] = UNSET
4750
ipv6: Union[Unset, None, bool] = UNSET
4851
vpc_id: Union[Unset, None, int] = UNSET
52+
vpc_ipv4_address: Union[Unset, None, str] = UNSET
4953
ssh_keys: Union[Unset, None, List[Union[int, str]]] = UNSET
5054
options: Union[Unset, None, SizeOptionsRequest] = UNSET
5155
licenses: Union[Unset, None, List[License]] = UNSET
@@ -65,6 +69,7 @@ def to_dict(self) -> Dict[str, Any]:
6569
backups = self.backups
6670
ipv6 = self.ipv6
6771
vpc_id = self.vpc_id
72+
vpc_ipv4_address = self.vpc_ipv4_address
6873
ssh_keys: Union[Unset, None, List[Union[int, str]]] = UNSET
6974
if not isinstance(self.ssh_keys, Unset):
7075
if self.ssh_keys is None:
@@ -114,6 +119,8 @@ def to_dict(self) -> Dict[str, Any]:
114119
field_dict["ipv6"] = ipv6
115120
if vpc_id is not UNSET:
116121
field_dict["vpc_id"] = vpc_id
122+
if vpc_ipv4_address is not UNSET:
123+
field_dict["vpc_ipv4_address"] = vpc_ipv4_address
117124
if ssh_keys is not UNSET:
118125
field_dict["ssh_keys"] = ssh_keys
119126
if options is not UNSET:
@@ -149,6 +156,8 @@ def _parse_image(data: object) -> Union[int, str]:
149156

150157
vpc_id = d.pop("vpc_id", UNSET)
151158

159+
vpc_ipv4_address = d.pop("vpc_ipv4_address", UNSET)
160+
152161
ssh_keys = []
153162
_ssh_keys = d.pop("ssh_keys", UNSET)
154163
for ssh_keys_item_data in _ssh_keys or []:
@@ -190,6 +199,7 @@ def _parse_ssh_keys_item(data: object) -> Union[int, str]:
190199
backups=backups,
191200
ipv6=ipv6,
192201
vpc_id=vpc_id,
202+
vpc_ipv4_address=vpc_ipv4_address,
193203
ssh_keys=ssh_keys,
194204
options=options,
195205
licenses=licenses,

src/binarylane/console/commands/api/post_v2_servers.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@ def lookup_vpc_id(ref: str) -> Union[None, int]:
111111
)
112112
)
113113

114+
json_body.add(
115+
PrimitiveAttribute(
116+
"vpc_ipv4_address",
117+
Union[Unset, None, str],
118+
required=False,
119+
option_name="vpc-ipv4-address",
120+
description="""If provided this will be the Ipv4 address for the server's private VPC network adapter. If this is null an unused Ipv4 address will be assigned. This field is only valid when VpcId is provided.""",
121+
)
122+
)
123+
114124
json_body.add(
115125
PrimitiveAttribute(
116126
"ssh_keys",

0 commit comments

Comments
 (0)