File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ def create_instance(
117
117
instance .scheduling = compute_v1 .Scheduling ()
118
118
if accelerators :
119
119
instance .guest_accelerators = accelerators
120
- instance .scheduling .on_host_maintenance = compute_v1 .Scheduling .OnHostMaintenance .TERMINATE .name
120
+ instance .scheduling .on_host_maintenance = (
121
+ compute_v1 .Scheduling .OnHostMaintenance .TERMINATE .name
122
+ )
121
123
122
124
if preemptible :
123
125
# Set the preemptible setting
@@ -126,7 +128,7 @@ def create_instance(
126
128
)
127
129
instance .scheduling = compute_v1 .Scheduling ()
128
130
instance .scheduling .preemptible = True
129
-
131
+
130
132
if spot :
131
133
# Set the Spot VM setting
132
134
instance .scheduling .provisioning_model = (
Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ def test_create_template_and_list(deletable_template_name):
56
56
)
57
57
assert template .properties .disks [0 ].initialize_params .disk_size_gb == 250
58
58
assert "debian-11" in template .properties .disks [0 ].initialize_params .source_image
59
- assert template .properties .network_interfaces [0 ].name == "global/networks/default"
59
+ assert template .properties .network_interfaces [0 ].name == "nic0"
60
+ assert template .properties .network_interfaces [0 ].network .endswith (
61
+ "global/networks/default"
62
+ )
60
63
assert template .properties .machine_type == "e2-standard-4"
61
64
62
65
You can’t perform that action at this time.
0 commit comments