Skip to content

Commit 9383d9e

Browse files
Progress
1 parent 4b06a7c commit 9383d9e

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

test/unit/objects/linode_interface_test.py

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
from datetime import datetime
22
from test.unit.base import ClientBaseCase
33

4+
45
from linode_api4 import (
56
LinodeInterface,
67
LinodeInterfaceDefaultRouteOptions,
78
LinodeInterfaceOptions,
89
LinodeInterfacePublicIPv4AddressOptions,
910
LinodeInterfacePublicIPv4Options,
11+
LinodeInterfacePublicIPv6Options,
1012
LinodeInterfacePublicIPv6RangeOptions,
1113
LinodeInterfacePublicOptions,
14+
LinodeInterfaceVLANOptions,
1215
LinodeInterfaceVPCIPv4AddressOptions,
16+
LinodeInterfaceVPCIPv4Options,
1317
LinodeInterfaceVPCIPv4RangeOptions,
18+
LinodeInterfaceVPCOptions,
1419
)
1520

1621

1722
def build_interface_options_public():
1823
return LinodeInterfaceOptions(
19-
123,
24+
firewall_id=123,
2025
default_route=LinodeInterfaceDefaultRouteOptions(
2126
ipv4=True,
2227
ipv6=True,
@@ -29,6 +34,46 @@ def build_interface_options_public():
2934
)
3035
],
3136
),
37+
ipv6=LinodeInterfacePublicIPv6Options(
38+
ranges=[
39+
LinodeInterfacePublicIPv6RangeOptions(
40+
range="2600:3cO9:e001:59::/64"
41+
)
42+
]
43+
),
44+
),
45+
)
46+
47+
48+
def build_interface_options_vpc():
49+
return LinodeInterfaceOptions(
50+
firewall_id=123,
51+
default_route=LinodeInterfaceDefaultRouteOptions(
52+
ipv4=True,
53+
),
54+
vpc=LinodeInterfaceVPCOptions(
55+
subnet_id=123,
56+
ipv4=LinodeInterfaceVPCIPv4Options(
57+
addresses=[
58+
LinodeInterfaceVPCIPv4AddressOptions(
59+
address="192.168.22.3",
60+
primary=True,
61+
nat_1_1_address="any",
62+
)
63+
],
64+
ranges=[
65+
LinodeInterfaceVPCIPv4RangeOptions(range="192.168.22.16/28")
66+
],
67+
),
68+
),
69+
)
70+
71+
72+
def build_interface_options_vlan():
73+
return LinodeInterfaceOptions(
74+
firewall_id=123,
75+
vlan=LinodeInterfaceVLANOptions(
76+
vlan_label="my_vlan", ipam_address="10.0.0.1/24"
3277
),
3378
)
3479

0 commit comments

Comments
 (0)