|
1 | 1 | import base64 |
2 | 2 | import os |
3 | 3 | from collections.abc import Iterable |
4 | | -from typing import Any, Dict, Optional, Union |
| 4 | +from typing import Any, Dict, List, Optional, Union |
5 | 5 |
|
6 | 6 | from linode_api4.common import load_and_validate_keys |
7 | 7 | from linode_api4.errors import UnexpectedResponseError |
|
13 | 13 | InstanceDiskEncryptionType, |
14 | 14 | InterfaceGeneration, |
15 | 15 | Kernel, |
| 16 | + LinodeInterface, |
| 17 | + NetworkInterface, |
16 | 18 | PlacementGroup, |
17 | 19 | StackScript, |
18 | 20 | Type, |
@@ -154,6 +156,9 @@ def instance_create( |
154 | 156 | int, |
155 | 157 | ] |
156 | 158 | ] = None, |
| 159 | + interfaces: Optional[ |
| 160 | + List[Union[LinodeInterface, NetworkInterface, Dict[str, Any]],] |
| 161 | + ] = None, |
157 | 162 | interface_generation: Optional[Union[InterfaceGeneration, str]] = None, |
158 | 163 | network_helper: Optional[bool] = None, |
159 | 164 | **kwargs, |
@@ -299,6 +304,8 @@ def instance_create( |
299 | 304 | :type interfaces: list[ConfigInterface] or list[dict[str, Any]] |
300 | 305 | :param placement_group: A Placement Group to create this Linode under. |
301 | 306 | :type placement_group: Union[InstancePlacementGroupAssignment, PlacementGroup, Dict[str, Any], int] |
| 307 | + :param interfaces: The interfaces to create this Linode with. |
| 308 | + :type interfaces: List of LinodeInterface, NetworkInterface (deprecated), or Dict[str, Any] |
302 | 309 | :param interface_generation: The generation of network interfaces this Linode uses. |
303 | 310 | :type interface_generation: InterfaceGeneration or str |
304 | 311 | :param network_helper: Whether this instance should have Network Helper enabled. |
@@ -343,6 +350,7 @@ def instance_create( |
343 | 350 | if placement_group |
344 | 351 | else None |
345 | 352 | ), |
| 353 | + "interfaces": interfaces, |
346 | 354 | "interface_generation": interface_generation, |
347 | 355 | "network_helper": network_helper, |
348 | 356 | } |
|
0 commit comments