<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/test_datasource/test_common.py, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-12-03T20:11:46+00:00</updated>
<entry>
<title>Reorganize unit test locations under tests/unittests (#1126)</title>
<updated>2021-12-03T20:11:46+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2021-12-03T20:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51'/>
<id>urn:sha1:039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51</id>
<content type='text'>
This attempts to standardize unit test file location under test/unittests/
such that any source file located at cloudinit/path/to/file.py may have a
corresponding unit test file at test/unittests/path/to/test_file.py.

Noteworthy Comments:
====================
Four different duplicate test files existed:
test_{gpg,util,cc_mounts,cc_resolv_conf}.py
Each of these duplicate file pairs has been merged together. This is a
break in git history for these files.

The test suite appears to have a dependency on test order. Changing test
order causes some tests to fail. This should be rectified, but for now
some tests have been modified in
tests/unittests/config/test_set_passwords.py.

A helper class name starts with "Test" which causes pytest to try
executing it as a test case, which then throws warnings "due to Class
having __init__()".  Silence by changing the name of the class.

# helpers.py is imported in many test files, import paths change
cloudinit/tests/helpers.py -&gt; tests/unittests/helpers.py

# Move directories:
cloudinit/distros/tests -&gt; tests/unittests/distros
cloudinit/cmd/devel/tests -&gt; tests/unittests/cmd/devel
cloudinit/cmd/tests -&gt; tests/unittests/cmd/
cloudinit/sources/helpers/tests -&gt; tests/unittests/sources/helpers
cloudinit/sources/tests -&gt; tests/unittests/sources
cloudinit/net/tests -&gt; tests/unittests/net
cloudinit/config/tests -&gt; tests/unittests/config
cloudinit/analyze/tests/ -&gt; tests/unittests/analyze/

# Standardize tests already in tests/unittests/
test_datasource -&gt; sources
test_distros -&gt; distros
test_vmware -&gt; sources/vmware
test_handler -&gt; config        # this contains cloudconfig module tests
test_runs -&gt; runs</content>
</entry>
<entry>
<title>Move GCE metadata fetch to init-local (SC-502) (#1122)</title>
<updated>2021-12-02T14:51:26+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-02T14:51:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=cf38c2cbc5875813fbb9858f45e5b95789b7ffea'/>
<id>urn:sha1:cf38c2cbc5875813fbb9858f45e5b95789b7ffea</id>
<content type='text'>
GCE currently fetches metadata after network has come up. There's no
reason we can't fetch at init-local time, so update GCE to fetch at
init-local time to be more performant and consistent with other
datasources.</content>
</entry>
<entry>
<title>Add LXD datasource (#1040)</title>
<updated>2021-11-01T20:43:05+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2021-11-01T20:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=773765346ba543987aa64a1119fa760f0b1cbb6f'/>
<id>urn:sha1:773765346ba543987aa64a1119fa760f0b1cbb6f</id>
<content type='text'>
Add DataSourceLXD which knows how to talk to the dev-lxd socket to
obtain all instance metadata API:
https://linuxcontainers.org/lxd/docs/master/dev-lxd.

This first branch is to deliver feature parity with the existing
NoCloud datasource which is currently used to intialize LXC instances
on first boot.

Introduce a SocketConnectionPool and LXDSocketAdapter to support
performing HTTP GETs on the following routes which are surfaced by the
LXD host to all containers:
http://unix.socket/1.0/meta-data
http://unix.socket/1.0/config/user.user-data
http://unix.socket/1.0/config/user.network-config
http://unix.socket/1.0/config/user.vendor-data
These 4 routes minimally replace the static content provided in the
following nocloud-net seed files:
/var/lib/cloud/nocloud-net/{meta-data,vendor-data,user-data,network-config}

The intent of this commit is to set a foundation for LXD socket
communication that will allow us to build network hot-plug features
by eventually consuming LXD's websocket upgrade route 1.0/events to
react to network, meta-data and user-data config changes over time.

In the event that no custom network-config is provided, default to the
same network-config definition provided by LXD to the NoCloud
network-config seed file.

Supplemental features above NoCloud datasource:
surface all custom instance data config keys via cloud-init query ds
which aids in discoverability of features/tags/labels as well as
conditional #cloud-config jinja templates operations based on custom
config options.
TBD: better cloud-init query support for dot-delimited keys</content>
</entry>
<entry>
<title>Datasource for VMware (#953)</title>
<updated>2021-08-10T02:24:07+00:00</updated>
<author>
<name>Andrew Kutz</name>
<email>101085+akutz@users.noreply.github.com</email>
</author>
<published>2021-08-10T02:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=8b4a9bc7b81e61943af873bad92e2133f8275b0b'/>
<id>urn:sha1:8b4a9bc7b81e61943af873bad92e2133f8275b0b</id>
<content type='text'>
This patch finally introduces the Cloud-Init Datasource for VMware
GuestInfo as a part of cloud-init proper. This datasource has existed
since 2018, and rapidly became the de facto datasource for developers
working with Packer, Terraform, for projects like kube-image-builder,
and the de jure datasource for Photon OS.

The major change to the datasource from its previous incarnation is
the name. Now named DatasourceVMware, this new version of the
datasource will allow multiple transport types in addition to
GuestInfo keys.

This datasource includes several unique features developed to address
real-world situations:

  * Support for reading any key (metadata, userdata, vendordata) both
    from the guestinfo table when running on a VM in vSphere as well as
    from an environment variable when running inside of a container,
    useful for rapid dev/test.

  * Allows booting with DHCP while still providing full participation
    in Cloud-Init instance data and Jinja queries. The netifaces library
    provides the ability to inspect the network after it is online,
    and the runtime network configuration is then merged into the
    existing metadata and persisted to disk.

  * Advertises the local_ipv4 and local_ipv6 addresses via guestinfo
    as well. This is useful as Guest Tools is not always able to
    identify what would be considered the local address.

The primary author and current steward of this datasource spoke at
Cloud-Init Con 2020 where there was interest in contributing this datasource
to the Cloud-Init codebase.

The datasource currently lives in its own GitHub repository at
https://github.com/vmware/cloud-init-vmware-guestinfo. Once the datasource
is merged into Cloud-Init, the old repository will be deprecated.</content>
</entry>
<entry>
<title>Add Vultr support (#827)</title>
<updated>2021-04-13T18:15:34+00:00</updated>
<author>
<name>David Dymko</name>
<email>dymkod@gmail.com</email>
</author>
<published>2021-04-13T18:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0ae0b1d4336acdcab12bd49e9bddb46922fb19c7'/>
<id>urn:sha1:0ae0b1d4336acdcab12bd49e9bddb46922fb19c7</id>
<content type='text'>
This PR adds in support so that cloud-init can run on instances 
deployed on Vultr cloud. This was originally brought up in #628.

Co-authored-by: Eric Benner &lt;ebenner@vultr.com&gt;
</content>
</entry>
<entry>
<title>Datasource for UpCloud (#743)</title>
<updated>2021-02-08T15:24:36+00:00</updated>
<author>
<name>Antti Myyrä</name>
<email>antti.myyra@gmail.com</email>
</author>
<published>2021-02-08T15:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0497c7b1f752c7011006b36f9c07ac141c0bb3c2'/>
<id>urn:sha1:0497c7b1f752c7011006b36f9c07ac141c0bb3c2</id>
<content type='text'>
New datasource utilizing UpCloud metadata API, including relevant unit
tests and documentation.</content>
</entry>
<entry>
<title>tests: Add tests for value of dsname in datasources</title>
<updated>2019-12-18T14:53:49+00:00</updated>
<author>
<name>Adam Dobrawy</name>
<email>naczelnik@jawnosc.tk</email>
</author>
<published>2019-12-17T16:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=e03c71aed91cbcbfb37cfadbf63b21a2d7e61a52'/>
<id>urn:sha1:e03c71aed91cbcbfb37cfadbf63b21a2d7e61a52</id>
<content type='text'>
</content>
</entry>
<entry>
<title>New data source for the Exoscale.com cloud platform</title>
<updated>2019-08-08T17:09:57+00:00</updated>
<author>
<name>Chris Glass</name>
<email>christopher.glass@exoscale.ch</email>
</author>
<published>2019-08-08T17:09:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4dfed67d0e82970f8717d0b524c593962698ca4f'/>
<id>urn:sha1:4dfed67d0e82970f8717d0b524c593962698ca4f</id>
<content type='text'>
- dsidentify switches to the new Exoscale datasource on matching DMI name
- New Exoscale datasource added

Signed-off-by: Mathieu Corbin &lt;mathieu.corbin@exoscale.ch&gt;
</content>
</entry>
<entry>
<title>stages: allow data sources to override network config source order</title>
<updated>2019-07-23T22:07:11+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>daniel.watkins@canonical.com</email>
</author>
<published>2019-07-23T22:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1dbede64dc645b090b4047a105143b5d5090d214'/>
<id>urn:sha1:1dbede64dc645b090b4047a105143b5d5090d214</id>
<content type='text'>
Currently, if a platform provides any network configuration via the
"cmdline" method (i.e. network-data=... on the kernel command line,
ip=... on the kernel command line, or iBFT config via /run/net-*.conf),
the value of the data source's network_config property is completely
ignored.

This means that on platforms that use iSCSI boot (such as Oracle Compute
Infrastructure), there is no way for the data source to configure any
network interfaces other than those that have already been configured by
the initramfs.

This change allows data sources to specify the order in which network
configuration sources are considered.  Data sources that opt to use this
mechanism will be expected to consume the command line network data and
integrate it themselves.

(The generic merging of network configuration sources was considered,
but we concluded that the single use case we have presently (a) didn't
warrant the increased complexity, and (b) didn't give us a broad enough
view to be sure that our generic implementation would be sufficiently
generic.  This change in no way precludes a merging strategy in future.)
</content>
</entry>
<entry>
<title>Add datasource Oracle Compute Infrastructure (OCI).</title>
<updated>2018-08-17T20:25:31+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-08-17T20:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=aaffd59431fe05932a66016db941fe197c4e7620'/>
<id>urn:sha1:aaffd59431fe05932a66016db941fe197c4e7620</id>
<content type='text'>
This adds a Oracle specific datasource that functions with OCI.
It is a simplified version of the OpenStack metadata server
with support for vendor-data.

It does not support the OCI-C (classic) platform.

Also here is a move of BrokenMetadata to common 'sources'
as this was the third occurrence of that class.
</content>
</entry>
</feed>
