From 591e97dad5cf5a6ea8211f34c7d8135aaaf947f6 Mon Sep 17 00:00:00 2001 From: eb3095 <45504889+eb3095@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:23:12 -0400 Subject: Allow Vultr to set MTU and use as-is configs (#1037) Add MTU, accept-ra, routes, options and a direct way to provide intact cloud configs for networking opposed to relying on configurations that may need changed often. --- cloudinit/sources/DataSourceVultr.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cloudinit/sources/DataSourceVultr.py') diff --git a/cloudinit/sources/DataSourceVultr.py b/cloudinit/sources/DataSourceVultr.py index 92765c72..68e1ff0b 100644 --- a/cloudinit/sources/DataSourceVultr.py +++ b/cloudinit/sources/DataSourceVultr.py @@ -67,7 +67,12 @@ class DataSourceVultr(sources.DataSource): # Process metadata def get_datasource_data(self, md): # Generate network config - self.netcfg = vultr.generate_network_config(md['interfaces']) + if "cloud_interfaces" in md: + # In the future we will just drop pre-configured + # network configs into the array. They need names though. + self.netcfg = vultr.add_interface_names(md['cloud_interfaces']) + else: + self.netcfg = vultr.generate_network_config(md['interfaces']) # Grab vendordata self.vendordata_raw = md['vendor-data'] -- cgit v1.2.3