<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/cloud_tests/testcases, branch 20.4</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.4</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/atom?h=20.4'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/'/>
<updated>2020-10-30T20:12:38+00:00</updated>
<entry>
<title>Correct documentation and testcase data for some user-data YAML (#618)</title>
<updated>2020-10-30T20:12:38+00:00</updated>
<author>
<name>dermotbradley</name>
<email>dermot_bradley@yahoo.com</email>
</author>
<published>2020-10-30T20:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=f8c84aeead77b7e508644d94889ee701f20e8d31'/>
<id>urn:sha1:f8c84aeead77b7e508644d94889ee701f20e8d31</id>
<content type='text'>
For cc_users_groups the user setting "expiredate" must be quoted in
order for the relevant flag and value to be then passed to the useradd
command. It its vaiue is not quoted then it is treated as Python type
datetime.date and in `cloudinit/distros/__init__.py` the below "is it a
string" condition fails and so no "--expiredate" parameter is passed to
useradd and therefore it has no effect:

```
if key in useradd_opts and val and isinstance(val, str):
    useradd_cmd.extend([useradd_opts[key], val])
```

For cc_users_groups, the user setting "inactive" does not actually
disable accounts, the useradd "--inactive" option actually defines the
number of days after password expiry that users can still login. So I
have changed the docs to show it taking a quoted value of days (which
works with the current code) rather than a boolean value.  The quotes
are necessary, like expiredate above, so that the value is also passed
to the useradd command.

For cc_power_state_change.py the "delay" setting value needs to have
quotes around it as otherwise its leading plus sign will be stripped
off.</content>
</entry>
<entry>
<title>tox: bump the pylint version to 2.6.0 in the default run (#544)</title>
<updated>2020-08-25T15:21:18+00:00</updated>
<author>
<name>Paride Legovini</name>
<email>paride.legovini@canonical.com</email>
</author>
<published>2020-08-25T15:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=07104504ab5b30efd2d1f7a8c36effe18b8e5fe0'/>
<id>urn:sha1:07104504ab5b30efd2d1f7a8c36effe18b8e5fe0</id>
<content type='text'>
Changes:

tox: bump the pylint version to 2.6.0 in the default run
Fix pylint 2.6.0 W0707 warnings (raise-missing-from)</content>
</entry>
<entry>
<title>cloudinit: remove global disable of pylint W0107 and fix errors (#489)</title>
<updated>2020-07-15T14:26:12+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-07-15T14:26:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=4fe576516d65feda17ba78e9265a8e494a195e7b'/>
<id>urn:sha1:4fe576516d65feda17ba78e9265a8e494a195e7b</id>
<content type='text'>
* cloudinit: remove global disable of pylint W0107 and fix errors

This includes removing a test class which contained no tests but wasn't
detected as empty because of an errant pass statement.

* .pylintrc: update disable comment to match arguments</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/marekm72/vyos-cloud-init.git/commit/?id=f3bd42659efeed4b092ffcdfd5df7f24813f2d3e'/>
<id>urn:sha1:f3bd42659efeed4b092ffcdfd5df7f24813f2d3e</id>
<content type='text'>
</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/marekm72/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>
<entry>
<title>Add schema to apt configure config (#357)</title>
<updated>2020-05-13T20:45:01+00:00</updated>
<author>
<name>lucasmoura</name>
<email>lucas.moura@canonical.com</email>
</author>
<published>2020-05-13T20:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=2e32c40a607250bc9e713c0daf360dc6617f4420'/>
<id>urn:sha1:2e32c40a607250bc9e713c0daf360dc6617f4420</id>
<content type='text'>
Create a schema object for the `apt_configure` module and
validate this schema in the `handle`  function of the module.

There are some considerations regarding this PR:

* The `primary` and `security` keys have the exact same properties. I
  tried to eliminate this redundancy by moving their properties to a
  common place and then just referencing it for both security and
  primary. Similar to what is documented here:
    https://json-schema.org/understanding-json-schema/structuring.html
  under the `Reuse` paragraph.  However, this approach does not work,
  because the `#` pointer goes to the beginning of the file, which is
  a python module instead of a json file, not allowing the pointer to
  find the correct definition. What I did was to create a separate dict
  for the mirror config and reuse it for primary and security, but
  maybe there are better approaches to do that.
* There was no documentation for the config `debconf_selections`. I
  tried to infer what it supposed to do by looking at the code and the
  `debconf-set-selections`  manpage, but my description may not be
  accurate or complete.
* Add a _parse_description function to schema.py to render multi-line
  preformatted content instead of squashing all whitespace

LP: #1858884</content>
</entry>
<entry>
<title>cloudinit: drop dependencies on unittest2 and contextlib2 (#322)</title>
<updated>2020-04-24T13:26:51+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-04-24T13:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=38a7e6e9756fdab31264c0d6e93d20432ed111ac'/>
<id>urn:sha1:38a7e6e9756fdab31264c0d6e93d20432ed111ac</id>
<content type='text'>
These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdlib now. This pull request does the following:

* removes some unneeded compatibility code for the old spelling of `assertRaisesRegex`
* replaces invocations of the Python 2-only `assertItemsEqual` with its new name, `assertCountEqual`
* replaces all usage of `unittest2` with `unittest`
* replaces all usage of `contextlib2` with `contextlib`
* drops `unittest2` and `contextlib2` from requirements files and tox.ini

It also rewrites some `test_azure` helpers to use bare asserts. We were seeing a strange error in xenial builds of this branch which appear to be stemming from the AssertionError that pytest produces being _different_ from the standard AssertionError.  This means that the modified helpers weren't behaving correctly, because they weren't catching AssertionErrors as one would expect. (I believe this is related, in some way, to https://github.com/pytest-dev/pytest/issues/645, but the only version of pytest where we're affected is so far in the past that it's not worth pursuing it any further as we have a workaround.)</content>
</entry>
<entry>
<title>ec2 json validation: fix the reference to the 'merged_cfg' key (#256)</title>
<updated>2020-03-18T17:47:33+00:00</updated>
<author>
<name>Paride Legovini</name>
<email>paride.legovini@canonical.com</email>
</author>
<published>2020-03-18T17:47:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=024bf27b5a3880dac916431296cb871707923562'/>
<id>urn:sha1:024bf27b5a3880dac916431296cb871707923562</id>
<content type='text'>
The 'merged_cfg' key introduced in 71af48d was incorrectly referenced
to as 'ci_cfg' in the json validation test for ec2.</content>
</entry>
<entry>
<title>instance-data: add cloud-init merged_cfg and sys_info keys to json (#214)</title>
<updated>2020-03-10T14:22:22+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2020-03-10T14:22:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=71af48df3514ca831c90b77dc71ba0a121dec401'/>
<id>urn:sha1:71af48df3514ca831c90b77dc71ba0a121dec401</id>
<content type='text'>
Cloud-config userdata provided as jinja templates are now distro,
platform and merged cloud config aware. The cloud-init query command
will also surface this config data.

Now users can selectively render portions of cloud-config based on:
* distro name, version, release
* python version
* merged cloud config values
* machine platform
* kernel

To support template handling of this config, add new top-level
keys to /run/cloud-init/instance-data.json.

The new 'merged_cfg' key represents merged cloud config from
/etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d/*.

The new 'sys_info' key which captures distro and platform
info from cloudinit.util.system_info.

Cloud config userdata templates can render conditional content
based on these additional environmental checks such as the following
simple example:

```
  ## template: jinja
  #cloud-config
   runcmd:
  {% if distro == 'opensuse' %}
    - sh /custom-setup-sles
  {% elif distro == 'centos' %}
    - sh /custom-setup-centos
  {% elif distro == 'debian' %}
    - sh /custom-setup-debian
  {% endif %}
```

To see all values: sudo cloud-init query --all

Any keys added to the standardized v1 keys are guaranteed to not
change or drop on future released of cloud-init. 'v1' keys will be retained
for backward-compatibility even if a new standardized 'v2' set of keys
are introduced

The following standardized v1 keys are added:
* distro, distro_release, distro_version, kernel_version, machine,
python_version, system_platform, variant

LP: #1865969</content>
</entry>
<entry>
<title>ssh_auth_key_fingerprints_disable test: fix capitalization (#165)</title>
<updated>2020-01-10T14:56:03+00:00</updated>
<author>
<name>Paride Legovini</name>
<email>paride.legovini@canonical.com</email>
</author>
<published>2020-01-10T14:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-cloud-init.git/commit/?id=3f6192b39894761e8ddecefa3736ea0abbc35b90'/>
<id>urn:sha1:3f6192b39894761e8ddecefa3736ea0abbc35b90</id>
<content type='text'>
Adapt the test to the new capitalization introduced in
8116493950e7c47af0ce66fc1bb5d799ce5e477a.</content>
</entry>
</feed>
