|
1 | 1 | from datetime import datetime |
2 | 2 | from test.unit.base import ClientBaseCase |
3 | 3 |
|
4 | | -from linode_api4 import InstanceDiskEncryptionType, NetworkInterface |
| 4 | +from linode_api4 import ( |
| 5 | + ConfigInterfaceIPv6SLAAC, |
| 6 | + InstanceDiskEncryptionType, |
| 7 | + NetworkInterface, |
| 8 | +) |
5 | 9 | from linode_api4.objects import ( |
6 | 10 | Config, |
7 | 11 | ConfigInterface, |
8 | 12 | ConfigInterfaceIPv4, |
9 | 13 | ConfigInterfaceIPv6, |
10 | 14 | ConfigInterfaceIPv6Options, |
| 15 | + ConfigInterfaceIPv6Range, |
11 | 16 | ConfigInterfaceIPv6RangeOptions, |
| 17 | + ConfigInterfaceIPv6SLAAC, |
12 | 18 | ConfigInterfaceIPv6SLAACOptions, |
13 | 19 | Disk, |
14 | 20 | Image, |
@@ -507,8 +513,30 @@ def test_update_interfaces(self): |
507 | 513 | new_interfaces = [ |
508 | 514 | {"purpose": "public", "primary": True}, |
509 | 515 | ConfigInterface("vlan", label="cool-vlan"), |
| 516 | + ConfigInterface( |
| 517 | + "vpc", |
| 518 | + vpc_id=18881, |
| 519 | + subnet_id=123, |
| 520 | + ipv4=ConfigInterfaceIPv4(vpc="10.0.0.4", nat_1_1="any"), |
| 521 | + ipv6=ConfigInterfaceIPv6( |
| 522 | + slaac=[ |
| 523 | + ConfigInterfaceIPv6SLAAC( |
| 524 | + range="1234::5678/64", address="1234::5678" |
| 525 | + ) |
| 526 | + ], |
| 527 | + ranges=[ |
| 528 | + ConfigInterfaceIPv6Range(range="1234::5678/64") |
| 529 | + ], |
| 530 | + is_public=True, |
| 531 | + ), |
| 532 | + ), |
| 533 | + ] |
| 534 | + |
| 535 | + expected_body = [ |
| 536 | + new_interfaces[0], |
| 537 | + new_interfaces[1]._serialize(), |
| 538 | + new_interfaces[2]._serialize(), |
510 | 539 | ] |
511 | | - expected_body = [new_interfaces[0], new_interfaces[1]._serialize()] |
512 | 540 |
|
513 | 541 | config.interfaces = new_interfaces |
514 | 542 |
|
|
0 commit comments