From f0ab1e64852d50f4fe0de84e0bca0ee8bb516a9f Mon Sep 17 00:00:00 2001 From: PengpengSun <40026211+PengpengSun@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:49:37 +0800 Subject: VMware: add network-config support in ovf-env.xml (#947) Details: 1. Support guest set network config through guestinfo.ovfEnv using OVF 2. 'network-config' Property is optional 3. 'network-config' Property's value has to be base64 encoded Added unittests and updated ovf-env.xml example --- doc/sources/ovf/example/ovf-env.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/sources/ovf') diff --git a/doc/sources/ovf/example/ovf-env.xml b/doc/sources/ovf/example/ovf-env.xml index 13e8f104..4ef4ee63 100644 --- a/doc/sources/ovf/example/ovf-env.xml +++ b/doc/sources/ovf/example/ovf-env.xml @@ -41,6 +41,14 @@ --> + + -- cgit v1.2.3 From a0a68a24c34ee268962e7a3c3844c59ab4036bf9 Mon Sep 17 00:00:00 2001 From: Thomas Weißschuh Date: Tue, 19 Oct 2021 02:09:40 +0200 Subject: VMware: read network-config from ISO (#1066) There is no reason for the ISO missing this functionality. As discussed in https://github.com/canonical/cloud-init/pull/947/files#r707338489 --- cloudinit/sources/DataSourceOVF.py | 3 +-- doc/sources/ovf/example/ovf-env.xml | 2 +- tests/unittests/test_datasource/test_ovf.py | 10 ++++++++-- tools/.github-cla-signers | 1 + 4 files changed, 11 insertions(+), 5 deletions(-) (limited to 'doc/sources/ovf') diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py index 08a205f1..5257a534 100644 --- a/cloudinit/sources/DataSourceOVF.py +++ b/cloudinit/sources/DataSourceOVF.py @@ -360,8 +360,7 @@ class DataSourceOVF(sources.DataSource): if contents: break if contents: - read_network = ('com.vmware.guestInfo' == name) - (md, ud, cfg) = read_ovf_environment(contents, read_network) + (md, ud, cfg) = read_ovf_environment(contents, True) self.environment = contents if 'network-config' in md and md['network-config']: self._network_config = md['network-config'] diff --git a/doc/sources/ovf/example/ovf-env.xml b/doc/sources/ovf/example/ovf-env.xml index 4ef4ee63..e5f4e262 100644 --- a/doc/sources/ovf/example/ovf-env.xml +++ b/doc/sources/ovf/example/ovf-env.xml @@ -42,7 +42,7 @@