<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/tests, branch 20.1</title>
<subtitle> (mirror of https://github.com/marekm72/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=20.1</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=20.1'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/'/>
<updated>2020-01-29T21:55:39+00:00</updated>
<entry>
<title>Replace mock library with unittest.mock (#186)</title>
<updated>2020-01-29T21:55:39+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-29T21:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=5f8f85bb38cc972d3d2c705a1ec73db3f690f323'/>
<id>urn:sha1:5f8f85bb38cc972d3d2c705a1ec73db3f690f323</id>
<content type='text'>
* cloudinit: replace "import mock" with "from unittest import mock"

* test-requirements.txt: drop mock

Co-authored-by: Chad Smith &lt;chad.smith@canonical.com&gt;
</content>
</entry>
<entry>
<title>Drop most of the remaining use of six (#179)</title>
<updated>2020-01-21T23:02:42+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-21T23:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=bb71a9d08d25193836eda91c328760305285574e'/>
<id>urn:sha1:bb71a9d08d25193836eda91c328760305285574e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>util: move uptime's else branch into its own boottime function (#53)</title>
<updated>2020-01-10T04:06:06+00:00</updated>
<author>
<name>Igor Galić</name>
<email>me+git@igalic.co</email>
</author>
<published>2020-01-10T04:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=c911afbfe5a38823971e9cdbd4d1848c6e5c16de'/>
<id>urn:sha1:c911afbfe5a38823971e9cdbd4d1848c6e5c16de</id>
<content type='text'>
Also fix bugs:
- pass binary instead of string to sysctlbyname(), and
- unpack the "return value" in a struct, rather than in single integer.

LP: #1853160

Co-Authored-By: Ryan Harper &lt;ryan.harper@canonical.com&gt;</content>
</entry>
<entry>
<title>Make tests work with Python 3.8 (#139)</title>
<updated>2020-01-08T14:18:48+00:00</updated>
<author>
<name>Conrad Hoffmann</name>
<email>1226676+bitfehler@users.noreply.github.com</email>
</author>
<published>2020-01-08T14:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=c5a7d7979c036f6dc6823f429c6b6820f7f74241'/>
<id>urn:sha1:c5a7d7979c036f6dc6823f429c6b6820f7f74241</id>
<content type='text'>
* Make DistroChecker test work with Python 3.8

In Python 3.8, `platform.linux_distribution` has been removed. This was
anticipated, and the cloud-init code uses its own
`util.get_linux_distro` instead, which works fine w/o
`platform.linux_distribution`. However, these tests still try to mock
the platform function, which fails if it doesn't exist (Python 3.8).
Instead, mock the new function here, as this is a test for code that
depends on it rather than the function itself.

* Make GetLinuxDistro tests work with Python 3.8

In Python 3.8, `platform.dist` was removed, so allow mock to create the
function by setting `create=True`.

* Make linter happy in Python 3.8

Suppress E1101(no-member) as this function was removed.
</content>
</entry>
<entry>
<title>Fix linting failure in test_url_helper (#83)</title>
<updated>2019-12-03T21:45:14+00:00</updated>
<author>
<name>Eric Lafontaine</name>
<email>eric.lafontaine@bell.ca</email>
</author>
<published>2019-12-03T21:45:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=c4735dd37c89f12569093e5d18e13493cae1ee0b'/>
<id>urn:sha1:c4735dd37c89f12569093e5d18e13493cae1ee0b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>url_helper: read_file_or_url should pass headers param into readurl (#66)</title>
<updated>2019-12-02T23:24:18+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2019-12-02T23:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=f69d33a723b805fec3ee70c3a6127c8cadcb02d8'/>
<id>urn:sha1:f69d33a723b805fec3ee70c3a6127c8cadcb02d8</id>
<content type='text'>
Headers param was accidentally omitted and no longer passed through to
readurl due to a previous commit.

To avoid this omission of params in the future, drop positional param
definitions from read_file_or_url and pass all kwargs through to readurl
when we are not operating on a file.

In util:read_seeded, correct the case where invalid positional param
file_retries was being passed into read_file_or_url.

Also drop duplicated file:// prefix addition from read_seeded because
read_file_or_url does that work anyway.

LP: #1854084</content>
</entry>
<entry>
<title>FreeBSD: fix for get_linux_distro() and lru_cache (#59)</title>
<updated>2019-11-25T22:10:50+00:00</updated>
<author>
<name>Igor Galić</name>
<email>me+github@igalic.co</email>
</author>
<published>2019-11-25T22:10:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=2a135c4a421af47f5bd511e89e385a72f62bde33'/>
<id>urn:sha1:2a135c4a421af47f5bd511e89e385a72f62bde33</id>
<content type='text'>
Since `is_FreeBSD()` is used a lot, which uses `system_info()`, which uses `get_linux_distro()` we add caching, by decorating the following functions with `@lru_cache`:

- get_architecture()
- _lsb_release()
- is_FreeBSD
- get_linux_distro
- system_info()
- _get_cmdline()

Since [functools](https://docs.python.org/3/library/functools.html) only exists in Python 3, only python 3 will benefit from this improvement. For python 2, our shim is just a pass-thru. Too bad, but, also… https://pythonclock.org/

The main motivation here was, at first, to cache more, following the style of _lsb_release.
That is now consolidated under this very same roof.

LP: #1815030</content>
</entry>
<entry>
<title>util: json.dumps on python 2.7 will handle UnicodeDecodeError on binary</title>
<updated>2019-09-27T20:46:00+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2019-09-27T20:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=067516d7bc917e4921b9f1424b7a64e92cae0ad2'/>
<id>urn:sha1:067516d7bc917e4921b9f1424b7a64e92cae0ad2</id>
<content type='text'>
Since python 2.7 doesn't handle UnicodeDecodeErrors with the default
handler

LP: #1801364
</content>
</entry>
<entry>
<title>net,Oracle: Add support for netfailover detection</title>
<updated>2019-09-09T21:13:01+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2019-09-09T21:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=fa47d527a03a00319936323f0a857fbecafceaf7'/>
<id>urn:sha1:fa47d527a03a00319936323f0a857fbecafceaf7</id>
<content type='text'>
Add support for detecting netfailover[1] device 3-tuple in networking
layer.  In the Oracle datasource ensure that if a provided network
config, either fallback or provided config includes a netfailover master
to remove any MAC address value as this can break under 3-netdev
as the other two devices have the same MAC.

1. https://www.kernel.org/doc/html/latest/networking/net_failover.html
</content>
</entry>
<entry>
<title>ubuntu-drivers: call db_x_loadtemplatefile to accept NVIDIA EULA</title>
<updated>2019-08-22T17:09:22+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2019-08-22T17:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=e6383719c1adccf20b5c21cfba1c5a2462d663a2'/>
<id>urn:sha1:e6383719c1adccf20b5c21cfba1c5a2462d663a2</id>
<content type='text'>
Emit a script allowing cloud-init to set linux/nvidia/latelink
debconf selection to true. This avoids having to call
debconf-set-selections and allows cloud-init to pre-confgure
linux-restricted-modules to link NVIDIA drivers to the running kernel.

Cloud-init loads this debconf template and sets the value to true in the
debconf database by sourcing debconf's /usr/share/debconf/confmodule and
uses db_x_loadtemplatefile to register cloud-init's setting for
linux/nvidia/latelink.

LP: #1840080
</content>
</entry>
</feed>
