<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/test_handler, branch 20.3</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=20.3</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=20.3'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2020-08-19T23:18:25+00:00</updated>
<entry>
<title>Add Alpine Linux support. (#535)</title>
<updated>2020-08-19T23:18:25+00:00</updated>
<author>
<name>dermotbradley</name>
<email>dermot_bradley@yahoo.com</email>
</author>
<published>2020-08-19T23:18:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=79a8ce7e714ae1686c10bff77612eab0f6eccc95'/>
<id>urn:sha1:79a8ce7e714ae1686c10bff77612eab0f6eccc95</id>
<content type='text'>
Add new module cc_apk_configure for creating Alpine /etc/apk/repositories file.
Modify cc_ca_certs, cc_ntp, cc_power_state_change, and cc_resolv_conf for Alpine.
Add Alpine template files for Chrony and Busybox NTP support.
Add Alpine template file for /etc/hosts.

</content>
</entry>
<entry>
<title>Detect kernel version before swap file creation (#428)</title>
<updated>2020-08-18T21:12:02+00:00</updated>
<author>
<name>Eduardo Otubo</name>
<email>otubo@redhat.com</email>
</author>
<published>2020-08-18T21:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b749548a9eb43b34cce64f8688107645411abc8c'/>
<id>urn:sha1:b749548a9eb43b34cce64f8688107645411abc8c</id>
<content type='text'>
According to man page `man 8 swapon', "Preallocated swap files are
supported on XFS since Linux 4.18". This patch checks for kernel version
before attepting to create swapfile, using dd for XFS only on kernel
versions &lt;= 4.18 or btrfs.

Add new func util.kernel_version which returns a tuple of ints (major, minor)

Signed-off-by: Eduardo Otubo otubo@redhat.com</content>
</entry>
<entry>
<title>cc_ca_certs.py: fix blank line problem when removing CAs and adding new one (#483)</title>
<updated>2020-07-15T20:24:43+00:00</updated>
<author>
<name>dermotbradley</name>
<email>dermot_bradley@yahoo.com</email>
</author>
<published>2020-07-15T20:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=c0d239c7eadeae9c9e0b4e692b49e79c8ffcafd2'/>
<id>urn:sha1:c0d239c7eadeae9c9e0b4e692b49e79c8ffcafd2</id>
<content type='text'>
Problem: When cc_ca_certs configuration has both "remove-defaults: true"
and also specifies one, or more, new trusted CAs to add then the resultant
/etc/ca-certificates.conf file's 1st line is blank. As noted in comments
in the existing cc_ca_certs.py code blank lines in this file cause problems.

Fix: Before adding the cloud-init CA filename to this file first check the
size of the file - if is is empty (as all existing CAs have been deleted)
then write only the cloud-init CA filename to the file rather than appending
it to the file.</content>
</entry>
<entry>
<title>cc_mounts: handle missing fstab (#484)</title>
<updated>2020-07-10T13:08:44+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2020-07-10T13:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3d06abc2e0017436dadbf9c26fefa9f95368db9a'/>
<id>urn:sha1:3d06abc2e0017436dadbf9c26fefa9f95368db9a</id>
<content type='text'>
Do not fail if /etc/fstab is not present.  Some images, like container
rootfs may not include this file by default.

LP: #1886531</content>
</entry>
<entry>
<title>Disable ec2 mirror for non aws instances (#390)</title>
<updated>2020-06-30T22:25:26+00:00</updated>
<author>
<name>lucasmoura</name>
<email>lucas.moura@canonical.com</email>
</author>
<published>2020-06-30T22:25:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3fcdacc8995d6908858aceaf1da7ee5ff090fc04'/>
<id>urn:sha1:3fcdacc8995d6908858aceaf1da7ee5ff090fc04</id>
<content type='text'>
For versions before 20.2, we allowed the use of ec2 mirrors if the datasource availability_zone matches one of the ec2 regions. We are now updating that behavior to allow allow the use of ec2 mirrors on ec2 instances or if the user directly passes an an ec2 mirror url through #cloud-config apt directives.

LP: #1456277</content>
</entry>
<entry>
<title>Add schema for cc_chef module (#375)</title>
<updated>2020-06-29T16:21:04+00:00</updated>
<author>
<name>lucasmoura</name>
<email>lucas.moura@canonical.com</email>
</author>
<published>2020-06-29T16:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b0eba6a4c3a25a13259c01ac4c9a35720fecfdd2'/>
<id>urn:sha1:b0eba6a4c3a25a13259c01ac4c9a35720fecfdd2</id>
<content type='text'>
Create a schema object for the chef module and validate this schema in the handle function of the module.

Some of the config keys description, so I tried looking at the code and chef documentation to provide an information to the user. However, I don't know if I have the best description for all fields. For example, for the key show_time I could not find an accurate description of what it did, so I used what was in our code base to infer what it should do.

LP: #1858888</content>
</entry>
<entry>
<title>test: fix all flake8 E126 errors (#425)</title>
<updated>2020-06-10T14:39:29+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-10T14:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f3bd42659efeed4b092ffcdfd5df7f24813f2d3e'/>
<id>urn:sha1:f3bd42659efeed4b092ffcdfd5df7f24813f2d3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move subp into its own module. (#416)</title>
<updated>2020-06-08T16:49:12+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2020-06-08T16:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3c551f6ebc12f7729a2755c89b19b9000e27cc88'/>
<id>urn:sha1:3c551f6ebc12f7729a2755c89b19b9000e27cc88</id>
<content type='text'>
This was painful, but it finishes a TODO from cloudinit/subp.py.

It moves the following from util to subp:
  ProcessExecutionError
  subp
  which
  target_path

I moved subp_blob_in_tempfile into cc_chef, which is its only caller.
That saved us from having to deal with it using write_file
and temp_utils from subp (which does not import any cloudinit things now).

It is arguable that 'target_path' could be moved to a 'path_utils' or
something, but in order to use it from subp and also from utils,
we had to get it out of utils.</content>
</entry>
<entry>
<title>test: fix all flake8 E121 and E123 errors (#404)</title>
<updated>2020-06-02T16:06:07+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-02T16:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d53921ea3396c8301c65cad3abf04b4542d4b7a0'/>
<id>urn:sha1:d53921ea3396c8301c65cad3abf04b4542d4b7a0</id>
<content type='text'>
This fixes issues with closing brackets not matching the opening
bracket's line and continuation line under-idented for hanging indent.</content>
</entry>
<entry>
<title>test: fix all flake8 E741 errors (#401)</title>
<updated>2020-06-01T21:20:39+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-01T21:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1'/>
<id>urn:sha1:4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1</id>
<content type='text'>
This removes the use of variables named ‘l’, ‘O’, or ‘I’. Generally
these are used in list comprehension to read the line of lines.</content>
</entry>
</feed>
