@@ -52,3 +52,71 @@ def assert_linode_124_interface_123(iface: LinodeInterface):
5252
5353 assert iface .public .ipv6 .slaac [0 ].address == "2600:3cO9::ff:feab:cdef"
5454 assert iface .public .ipv6 .slaac [0 ].prefix == 64
55+
56+ @staticmethod
57+ def assert_linode_124_interface_456 (iface : LinodeInterface ):
58+ assert iface .id == 456
59+
60+ assert isinstance (iface .created , datetime )
61+ assert isinstance (iface .updated , datetime )
62+
63+ assert iface .default_route .ipv4
64+ assert not iface .default_route .ipv6
65+
66+ assert iface .mac_address == "22:00:AB:CD:EF:01"
67+ assert iface .version == 1
68+
69+ assert iface .vlan is None
70+ assert iface .public is None
71+
72+ # vpc assertions
73+ assert iface .vpc .vpc_id == 123456
74+ assert iface .vpc .subnet_id == 789
75+
76+ assert iface .vpc .ipv4 .addresses [0 ].address == "192.168.22.3"
77+ assert iface .vpc .ipv4 .addresses [0 ].primary
78+
79+ assert iface .vpc .ipv4 .ranges [0 ].range == "192.168.22.16/28"
80+ assert iface .vpc .ipv4 .ranges [1 ].range == "192.168.22.32/28"
81+
82+ @staticmethod
83+ def assert_linode_124_interface_789 (iface : LinodeInterface ):
84+ assert iface .id == 123
85+
86+ assert isinstance (iface .created , datetime )
87+ assert isinstance (iface .updated , datetime )
88+
89+ assert iface .default_route .ipv4
90+ assert iface .default_route .ipv6
91+
92+ assert iface .mac_address == "22:00:AB:CD:EF:01"
93+ assert iface .version == 1
94+
95+ assert iface .vlan is None
96+ assert iface .vpc is None
97+
98+ # public.ipv4 assertions
99+ assert iface .public .ipv4 .addresses [0 ].address == "172.30.0.50"
100+ assert iface .public .ipv4 .addresses [0 ].primary
101+
102+ assert iface .public .ipv4 .shared [0 ].address == "172.30.0.51"
103+ assert iface .public .ipv4 .shared [0 ].linode_id == 125
104+
105+ # public.ipv6 assertions
106+ assert iface .public .ipv6 .ranges [0 ].range == "2600:3cO9:e001:59::/64"
107+ assert (
108+ iface .public .ipv6 .ranges [0 ].route_target
109+ == "2600:3cO9::ff:feab:cdef"
110+ )
111+
112+ assert iface .public .ipv6 .ranges [1 ].range == "2600:3cO9:e001:5a::/64"
113+ assert (
114+ iface .public .ipv6 .ranges [1 ].route_target
115+ == "2600:3cO9::ff:feab:cdef"
116+ )
117+
118+ assert iface .public .ipv6 .shared [0 ].range == "2600:3cO9:e001:2a::/64"
119+ assert iface .public .ipv6 .shared [0 ].route_target is None
120+
121+ assert iface .public .ipv6 .slaac [0 ].address == "2600:3cO9::ff:feab:cdef"
122+ assert iface .public .ipv6 .slaac [0 ].prefix == 64
0 commit comments