<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/test_datasource/test_openstack.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>tox: bump the pinned flake8 and pylint version (#1029)</title>
<updated>2021-09-21T20:28:30+00:00</updated>
<author>
<name>Paride Legovini</name>
<email>paride.legovini@canonical.com</email>
</author>
<published>2021-09-21T20:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=089a307db1fc572461eea1589f1876132c058311'/>
<id>urn:sha1:089a307db1fc572461eea1589f1876132c058311</id>
<content type='text'>
tox: bump the pinned flake8 and pylint version

* pylint: fix W1406 (redundant-u-string-prefix)

The u prefix for strings is no longer necessary in Python &gt;=3.0.

* pylint: disable W1514 (unspecified-encoding)
    
From https://www.python.org/dev/peps/pep-0597/ (Python 3.10):
    
The new warning stems form https://www.python.org/dev/peps/pep-0597,
which says:
    
  Developers using macOS or Linux may forget that the default encoding
  is not always UTF-8. [...] Even Python experts may assume that the
  default encoding is UTF-8. This creates bugs that only happen on Windows.
    
The warning could be fixed by always specifying encoding='utf-8',
however we should be careful to not break environments which are not
utf-8 (or explicitly state that only utf-8 is supported). Let's silence
the warning for now.

* _quick_read_instance_id: cover the case where load_yaml() returns None

Spotted by pylint:
 - E1135 (unsupported-membership-test)
 - E1136 (unsubscriptable-object)

LP: #1944414</content>
</entry>
<entry>
<title>openstack: read the dynamic metadata group vendor_data2.json (#777)</title>
<updated>2021-02-05T16:11:14+00:00</updated>
<author>
<name>Andrew Bogott</name>
<email>Andrewbogott@gmail.com</email>
</author>
<published>2021-02-05T16:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3cebe0df1e002bd85c8aa78e89f0ca507c17195a'/>
<id>urn:sha1:3cebe0df1e002bd85c8aa78e89f0ca507c17195a</id>
<content type='text'>
Add support for openstack's dynamic vendor data, which appears under openstack/latest/vendor_data2.json

This adds vendor_data2 to all pathways; it should be a no-op for non-OpenStack providers.

LP: #1841104</content>
</entry>
<entry>
<title>cloudinit: move dmi functions out of util (#622)</title>
<updated>2020-11-02T20:41:11+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2020-11-02T20:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0af1ff1eaf593c325b4f53181a572110eb016c50'/>
<id>urn:sha1:0af1ff1eaf593c325b4f53181a572110eb016c50</id>
<content type='text'>
This just separates the reading of dmi values into its own file.

Some things of note:
 * left import of util in dmi.py only for 'is_container'
   It'd be good if is_container was not in util.
 * just the use of 'util.is_x86' to dmi.py
 * open() is used directly rather than load_file.</content>
</entry>
<entry>
<title>openstack: consider product_name as valid chassis tag (#580)</title>
<updated>2020-10-15T19:39:09+00:00</updated>
<author>
<name>Adrian Vladu</name>
<email>avladu@cloudbasesolutions.com</email>
</author>
<published>2020-10-15T19:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d76d6e6749315634efe0494501270740e8fef206'/>
<id>urn:sha1:d76d6e6749315634efe0494501270740e8fef206</id>
<content type='text'>
Consider valid product names as valid chassis asset tags when detecting
OpenStack platform before crawling for OpenStack metadata.

As `ds-identify` tool uses product name as valid chassis asset tags,
let's replicate the behaviour in the OpenStack platform detection too.

This change should be backwards compatible and a temporary fix for the
current limitations on the OpenStack platform detection.

LP: #1895976</content>
</entry>
<entry>
<title>printing the error stream of the dhclient process before killing it (#369)</title>
<updated>2020-06-19T13:38:05+00:00</updated>
<author>
<name>Moustafa Moustafa</name>
<email>momousta@microsoft.com</email>
</author>
<published>2020-06-19T13:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d083a0315faf67c00acdecdc3f95c700edf6ba06'/>
<id>urn:sha1:d083a0315faf67c00acdecdc3f95c700edf6ba06</id>
<content type='text'>
This introduces a way to log the dhclient error stream, and uses it for the Azure datasource (where we have a specific requirement for this data to be logged).</content>
</entry>
<entry>
<title>Identify SAP Converged Cloud as OpenStack</title>
<updated>2020-03-26T21:15:37+00:00</updated>
<author>
<name>Silvio Knizek</name>
<email>killermoehre@gmx.net</email>
</author>
<published>2020-03-26T21:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=7f9f33dbb08bacaa49244e857847400ad8a67ad4'/>
<id>urn:sha1:7f9f33dbb08bacaa49244e857847400ad8a67ad4</id>
<content type='text'>
add SAP Converged Cloud as cloud provider</content>
</entry>
<entry>
<title>cloudinit: replace "from six import X" imports (except in util.py) (#183)</title>
<updated>2020-01-31T15:15:31+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-31T15:15:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1bb1896ec900622e02c1ffb59db4d3f2df4a964d'/>
<id>urn:sha1:1bb1896ec900622e02c1ffb59db4d3f2df4a964d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>OpenStack: support reading of newer versions of metdata.</title>
<updated>2018-09-13T18:44:20+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-09-13T18:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4361e0e42a34ebf9f49dde2356b7261715cf0cd5'/>
<id>urn:sha1:4361e0e42a34ebf9f49dde2356b7261715cf0cd5</id>
<content type='text'>
Mark as supported for reading some newer versions of openstack metadata:
 2016-06-30 : Newton one
 2016-10-06 : Newton two
 2017-02-22 : Ocata
 2018-08-27 : Rocky
</content>
</entry>
<entry>
<title>OpenStack: fix bug causing 'latest' version to be used from network.</title>
<updated>2018-09-12T18:44:19+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-09-12T18:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=c75c582ed1824dc3ff39cefdbddccfc2924b868c'/>
<id>urn:sha1:c75c582ed1824dc3ff39cefdbddccfc2924b868c</id>
<content type='text'>
Cloud-init was reading a list of versions from the OpenStack metadata
service (http://169.254.169.254/openstack/) and attempt to select the
newest known supported version.  The problem was that the list
of versions was not being decoded, so we were comparing a list of
bytes (found versions) to a list of strings (known versions).

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