Skip to content

Commit d3e2dd7

Browse files
p3rf Teamcopybara-github
authored andcommitted
Add --gce_extra_network_interface_options flag to customize --network-interface when creating GCE VMs
PiperOrigin-RevId: 853736860
1 parent 87ae78c commit d3e2dd7

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

CHANGES.next.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,3 +636,4 @@
636636
- Updated the CONTRIBUTING.md guide with steps to minimize merging & review
637637
friction for new PRs.
638638
- Support gs:// URLs in --ycsb_tar_url.
639+
- Add `--gce_extra_network_interface_options` flag.

perfkitbenchmarker/providers/gcp/flags.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
'subnet, given in CDR notation. Not used unless '
107107
'--gce_subnet_region is given.',
108108
)
109+
GCE_EXTRA_NETWORK_INTERFACE_OPTIONS = flags.DEFINE_list(
110+
'gce_extra_network_interface_options',
111+
[],
112+
'Additional options to pass to --network-interface when creating a VM. '
113+
'This flag can be specified multiple times.',
114+
)
109115
GCE_AVAILABILITY_DOMAIN_COUNT = flags.DEFINE_integer(
110116
'gce_availability_domain_count',
111117
0,

perfkitbenchmarker/providers/gcp/gce_virtual_machine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ def _GenerateCreateCommand(self, ssh_keys_path):
744744
]
745745
+ gce_nic_queue_count_arg
746746
+ no_address_arg
747+
+ gcp_flags.GCE_EXTRA_NETWORK_INTERFACE_OPTIONS.value
747748
),
748749
]
749750

0 commit comments

Comments
 (0)