Skip to content

Commit db113e7

Browse files
oops
1 parent 3ca6d03 commit db113e7

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

linode_api4/groups/linode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def instance_create(
343343
if placement_group
344344
else None
345345
),
346-
"interface_generaiton": interface_generation,
346+
"interface_generation": interface_generation,
347347
"network_helper": network_helper,
348348
}
349349

test/unit/groups/linode_test.py

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

3-
from linode_api4 import InstancePlacementGroupAssignment
3+
from linode_api4 import InstancePlacementGroupAssignment, InterfaceGeneration
44
from linode_api4.objects import ConfigInterface
55

66

@@ -96,6 +96,27 @@ def test_create_with_placement_group(self):
9696
m.call_data["placement_group"], {"id": 123, "compliant_only": True}
9797
)
9898

99+
def test_instance_create_with_interface_generation(self):
100+
"""
101+
Tests that the metadata field is populated on Linode create.
102+
"""
103+
104+
with self.mock_post("linode/instances/124") as m:
105+
self.client.linode.instance_create(
106+
"g6-nanode-1",
107+
"us-southeast",
108+
interface_generation=InterfaceGeneration.LINODE,
109+
)
110+
111+
self.assertEqual(
112+
m.call_data,
113+
{
114+
"region": "us-southeast",
115+
"type": "g6-nanode-1",
116+
"interface_generation": "linode",
117+
},
118+
)
119+
99120

100121
class TypeTest(ClientBaseCase):
101122
def test_get_types(self):

0 commit comments

Comments
 (0)