<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/tests/unittests/config/test_schema.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>2022-03-25T19:42:00+00:00</updated>
<entry>
<title>T2117: Cloud-init updated to 22.1</title>
<updated>2022-03-25T19:42:00+00:00</updated>
<author>
<name>zsdc</name>
<email>taras@vyos.io</email>
</author>
<published>2022-03-25T18:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=31448cccedd8f841fb3ac7d0f2e3cdefe08a53ba'/>
<id>urn:sha1:31448cccedd8f841fb3ac7d0f2e3cdefe08a53ba</id>
<content type='text'>
Merged with 22.1 tag from the upstream Cloud-init repository.

Our modules were slightly modified for compatibility with the new
version.
</content>
</entry>
<entry>
<title>use PEP 589 syntax for TypeDict (#1253)</title>
<updated>2022-02-14T19:24:00+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2022-02-14T19:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=50195ec8d1052d2b7a80f47a3709ebc4e74d6764'/>
<id>urn:sha1:50195ec8d1052d2b7a80f47a3709ebc4e74d6764</id>
<content type='text'>
Use PEP 589 syntax for TypeDict annotation.

Also fixes previously broken typing MetaSchema typing implementation.</content>
</entry>
<entry>
<title>Schema a d (#1211)</title>
<updated>2022-02-01T03:45:29+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2022-02-01T03:45:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=af7eb1deab12c7208853c5d18b55228e0ba29c4d'/>
<id>urn:sha1:af7eb1deab12c7208853c5d18b55228e0ba29c4d</id>
<content type='text'>
Migrate from legacy schema or define new schema in
cloud-init-schema.json, adding extensive schema tests for:
- cc_apt_configure
- cc_bootcmd
- cc_byobu
- cc_ca_certs
- cc_chef
- cc_debug
- cc_disable_ec2_metadata
- cc_disk_setup

Deprecate config hyphenated schema keys in favor of underscores:
  - ca_certs and ca_certs.remove_defaults instead of
    ca-certs and ca-certs.remove-defaults

- Continue to honor deprecated config keys but emit DEPRECATION
  warnings in logs for continued use of the deprecated keys:
  - apt_sources key
  - any apt v1 or v2 keys
  - use or ca-certs or ca_certs.remove-defaults

- Extend apt_configure schema
   - Define more strict schema below object opaque keys using
     patternProperties
  -  create common $def apt_configure.mirror for reuse in 'primary'
     and 'security' schema definitions within cc_apt_configure

 Co-Authored-by: James Falcon &lt;james.falcon@canonical.com&gt;</content>
</entry>
<entry>
<title>tests: focal caplog has whitespace indentation for multi-line logs (#1201)</title>
<updated>2022-01-20T01:32:08+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2022-01-20T01:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=78079374ac2b9cb8ae74975c2009fd21d59c130a'/>
<id>urn:sha1:78079374ac2b9cb8ae74975c2009fd21d59c130a</id>
<content type='text'>
Avoid series-specific log formatting in tests by using
caplog.record_tuples.

Added benefit, we can easily check log-level WARNING too.

Fixes unit tests from Focal Package builds at:
https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/\
  +build/23076508</content>
</entry>
<entry>
<title>Single JSON schema validation in early boot (#1175)</title>
<updated>2022-01-18T17:05:29+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2022-01-18T17:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=4ba6fd283674df1ef25300d91c6d2061910744be'/>
<id>urn:sha1:4ba6fd283674df1ef25300d91c6d2061910744be</id>
<content type='text'>
Package a single JSON schema file for user-data validation at
cloudinit/config/cloud-init-schema.json.

Perform validate_cloudconfig_schema call to just after the
user-data is consumed. This will allow single validation of all
user-data against the full schema instead of
repetitive validatation calls against each cloud-config module
(cloudinit.config.cc_*) sub-schemas.

This branch defines the simple apt_pipelining schema and
migrates existing cc_apk_configure into cloud-init-schema.json.

The expectation will be additional branches to migrate from legacy
"schema" attributes inside each cloud-config module toward unique
cc_&lt;module_name&gt; definitions in the global shema file under "$defs"
of cloud-init-schema-X.Y..json.

Before legacy sub-schema definitions are migrated the following
funcs grew support to read sub-schemas from both static
cloud-init-schema.json and the individual cloud-config module
"schema" attributes:

- get_schema: source base schema file from cloud-init-schema.json
  and supplement with all legacy cloud-config module "schema" defs
- get_meta_doc: optional schema param so cloud-config modules
  no longer provide the own local sub-schemas
- _get_property_doc: render only documentation of sub-schema based
  on meta['id'] provided
- validate_cloudconfig_schema: allow optional schema param


Additionally, fix two minor bugs in _schemapath_for_cloudconfig:
- `cloud-init devel schema --annotate` which results in a Traceback
  if two keys at the same indent level have invalid types.
- exit early on empty cloud-config to avoid a Traceback on the CLI</content>
</entry>
<entry>
<title>Add new config module to set keyboard layout (#1176)</title>
<updated>2022-01-12T14:37:32+00:00</updated>
<author>
<name>maxnet</name>
<email>bos@je-eigen-domein.nl</email>
</author>
<published>2022-01-12T14:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=5147e8d4764e368ab8ccea7433b02e4ff9d6c901'/>
<id>urn:sha1:5147e8d4764e368ab8ccea7433b02e4ff9d6c901</id>
<content type='text'>
Adds a new module to allow setting keyboard layout,
for use-cases in which cloud-init is used to configure
OS images meant for physical computers instead
of the cloud.

This initial release only implements support
for Linux distributions that allow layout to be
set through systemd's localectl.

LP: #1951593</content>
</entry>
<entry>
<title>Don't throw exceptions for empty cloud config (#1130)</title>
<updated>2022-01-06T22:33:18+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2022-01-06T22:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=3e64acda13c826074a502d37b9e11e07d4238bc6'/>
<id>urn:sha1:3e64acda13c826074a502d37b9e11e07d4238bc6</id>
<content type='text'>
Warn during boot when an empty config is provided. Likewise,
`cloud-init devel schema --annotate` should not throw exception, return
something meaningful instead.</content>
</entry>
<entry>
<title>Adopt Black and isort (SC-700) (#1157)</title>
<updated>2021-12-16T02:16:38+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-16T02:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf'/>
<id>urn:sha1:bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf</id>
<content type='text'>
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
</content>
</entry>
<entry>
<title>Schema processing changes (SC-676) (#1144)</title>
<updated>2021-12-14T00:14:50+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-14T00:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=9a6e65a2a575055aadc1802004dbe3f343a54b89'/>
<id>urn:sha1:9a6e65a2a575055aadc1802004dbe3f343a54b89</id>
<content type='text'>
* Use proper logging
* Add parsing for patternProperties
* Add label to annotate patternProperties
* Log warning if schema parsing fails during metaschema processing
* Some schema test fixes</content>
</entry>
<entry>
<title>factor out function for getting top level directory of cloudinit (#1136)</title>
<updated>2021-12-08T21:27:37+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2021-12-08T21:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=65c2cfd7f21758746444c8c79444994a4638d563'/>
<id>urn:sha1:65c2cfd7f21758746444c8c79444994a4638d563</id>
<content type='text'>
Add a test helper to get top level directory

Many tests need to get the location of files &amp; dirs within the cloud-init
project directory.

Tests implement this in various different ways, and often those ways
depend on the current working directory of the pytest invocation.
Create helper functions (and tests) that gets the path of the top
directory or any sub directory under the top directory. This function
does not depend on the environment.</content>
</entry>
</feed>
