<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/cmd/tests, branch equuleus</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=equuleus</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=equuleus'/>
<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>jinja: provide and document jinja-safe key aliases in instance-data (SC-622) (#1123)</title>
<updated>2021-12-03T04:25:43+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2021-12-03T04:25:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0fe96a44cde48cc688afe75beb8fd126c8892b8c'/>
<id>urn:sha1:0fe96a44cde48cc688afe75beb8fd126c8892b8c</id>
<content type='text'>
Allow #cloud-config and cloud-init query to use underscore-delimited
"jinja-safe" key aliases for any instance-data.json keys
containing jinja operator characters.

This provides a means to use Jinja's dot-notation instead of square brackets
and quoting to reference "unsafe" obtain attribute names.

Support for these aliased keys is available to both #cloud-config user-data and
`cloud-init query`.

For example #cloud-config alias access can look like:
  {{ ds.config.user_network_config }}

  - instead of -

  {{ ds.config["user.network-config"] }}</content>
</entry>
<entry>
<title>Allow disabling of network activation (SC-307) (#1048)</title>
<updated>2021-10-07T16:27:36+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-10-07T16:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9c147e8341e287366790e60658f646cdcc59bef2'/>
<id>urn:sha1:9c147e8341e287366790e60658f646cdcc59bef2</id>
<content type='text'>
In #919 (81299de), we refactored some of the code used to bring up
networks across distros. Previously, the call to bring up network
interfaces during 'init' stage unintentionally resulted in a no-op
such that network interfaces were NEVER brought up by cloud-init, even
if new network interfaces were found after crawling the metadata.

The code was altered to bring up these discovered network interfaces.
On ubuntu, this results in a 'netplan apply' call during 'init' stage
for any ubuntu-based distro on a datasource that has a NETWORK
dependency. On GCE, this additional 'netplan apply' conflicts with the
google-guest-agent service, resulting in an instance that can no
be connected to.

This commit adds a 'disable_network_activation' option that can be
enabled in /etc/cloud.cfg to disable the activation of network
interfaces in 'init' stage.

LP: #1938299</content>
</entry>
<entry>
<title>- Detect a Python version change and clear the cache (#857)</title>
<updated>2021-07-01T16:35:40+00:00</updated>
<author>
<name>Robert Schweikert</name>
<email>rjschwei@suse.com</email>
</author>
<published>2021-07-01T16:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=78e89b03ecb29e7df3181b1219a0b5f44b9d7532'/>
<id>urn:sha1:78e89b03ecb29e7df3181b1219a0b5f44b9d7532</id>
<content type='text'>
summary: Clear cache when a Python version change is detected

When a distribution gets updated it is possible that the Python version
changes. Python makes no guarantee that pickle is consistent across
versions as such we need to purge the cache and start over.

Co-authored-by: James Falcon &lt;therealfalcon@gmail.com&gt;</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>query: do not handle non-decodable non-gzipped content (#543)</title>
<updated>2020-08-24T16:13:52+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2020-08-24T16:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=c0450c02b25fe037c702e9bb145fbbaa28a165b1'/>
<id>urn:sha1:c0450c02b25fe037c702e9bb145fbbaa28a165b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cmd: cloud-init query to handle compressed userdata (#516)</title>
<updated>2020-08-20T21:51:35+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2020-08-20T21:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=747723a42c98fa13080ea31127e289e7b826046f'/>
<id>urn:sha1:747723a42c98fa13080ea31127e289e7b826046f</id>
<content type='text'>
cloud-init query tries to directly load and decode
raw user-data from /var/lib/cloud/instance/user-data.txt.

This results in UnicodeDecodeErrors on some platforms which
provide compressed content.

Avoid UnicodeDecoderErrors when parsing compressed user-data at
/var/lib/cloud/instance/user-data.txt.

LP: #1889938</content>
</entry>
<entry>
<title>test: fix all flake8 E241 (#403)</title>
<updated>2020-06-02T15:24:29+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-02T15:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=5f7825e22241423322dbe628de1b00289cf34114'/>
<id>urn:sha1:5f7825e22241423322dbe628de1b00289cf34114</id>
<content type='text'>
Remove extra spaces after a ','</content>
</entry>
<entry>
<title>CiTestCase: stop using and remove sys_exit helper (#283)</title>
<updated>2020-03-31T20:32:40+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-03-31T20:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b698b349c827f30fa60de55e2469a21ae4342669'/>
<id>urn:sha1:b698b349c827f30fa60de55e2469a21ae4342669</id>
<content type='text'>
This shim was required to support Python 2.6, so we no longer need it.</content>
</entry>
<entry>
<title>cloudinit/tests: remove unneeded with_logs configuration (#263)</title>
<updated>2020-03-19T16:01:15+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-03-19T16:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=ade47866aa2f81ab0f3baabbb1fc1e484abdb741'/>
<id>urn:sha1:ade47866aa2f81ab0f3baabbb1fc1e484abdb741</id>
<content type='text'>
These classes don't use `self.logs` anywhere in their body, so we can
remove the `with_logs = True` setting from them.

These instances were found using astpath[0], with the following
invocation:

  astpath "//Name[@id='with_logs' and not(ancestor::ClassDef//Attribute[@attr='logs'])]"

[0] https://github.com/hchasestevens/astpath</content>
</entry>
</feed>
