<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/config/cc_write_files.py, branch sagitta-public-unmaintained</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=sagitta-public-unmaintained</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=sagitta-public-unmaintained'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2022-02-14T19:24:00+00:00</updated>
<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>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>Add Strict Metaschema Validation (#1101)</title>
<updated>2021-12-06T22:27:12+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2021-12-06T22:27:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bedac77e9348e7a54c0ec364fb61df90cd893972'/>
<id>urn:sha1:bedac77e9348e7a54c0ec364fb61df90cd893972</id>
<content type='text'>
Improve schema validation.

This adds strict validation of config module definitions at testing
time, with plumbing included for future runtime validation. This
eliminates a class of bugs resulting from schemas that have definitions
that are incorrect, but get interpreted by jsonschema as
"additionalProperties" that are therefore ignored.

- Add strict meta-schema for jsonschema unit test validation
- Separate schema from module metadata structure
- Improve type annotations for various functions and data types

Cleanup:
- Remove unused jsonschema "required" elements 
- Eliminate manual memoization in schema.py:get_schema(),
        reference module.__doc__ directly</content>
</entry>
<entry>
<title>Add module 'write-files-deferred' executed in stage 'final' (#916)</title>
<updated>2021-10-25T19:31:07+00:00</updated>
<author>
<name>Lucendio</name>
<email>github+dev@lucendio.com</email>
</author>
<published>2021-10-25T19:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a4236c375ddf78258a8f9252c1d79c665aa4f88b'/>
<id>urn:sha1:a4236c375ddf78258a8f9252c1d79c665aa4f88b</id>
<content type='text'>
The main idea is to introduce a second module that takes care of
writing files, but in the 'final' stage.

While the introduction of a second module would allow for choosing
the appropriate place withing the order of modules (and stages),
there is no addition top-level directive being added to the cloud
configuration schema. Instead, 'write-files' schema is being extended
to include a 'defer' attribute used only by the 'write-deffered-files'
modules.

The new module 'write-deferred-files' reuses as much as
possible of the 'write-files' functionality.</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/vyos/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>Add docs about  creating parent folders (#330)</title>
<updated>2020-04-28T15:55:34+00:00</updated>
<author>
<name>Adrian Wilkins</name>
<email>adrian.wilkins@infinityworks.com</email>
</author>
<published>2020-04-28T15:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=b70f11079e6d4264ff9a8c12089945f57d903e28'/>
<id>urn:sha1:b70f11079e6d4264ff9a8c12089945f57d903e28</id>
<content type='text'>
Clarify in documentation that write_files will create parent folders
for paths that do not already exist.

This obfuscates what the problem is when people erroneously create
files in /tmp despite the warnings in the documentation not to do so.
People naturally assume that their file is absent because the parent folder
did not exist for it to be created in, causing them to add a runcmd block
to create the folder, even though execution order means that this will not
occur until after write_files have all finished.</content>
</entry>
<entry>
<title>schema: add json schema for write_files module (#152)</title>
<updated>2020-04-24T20:39:25+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2020-04-24T20:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=61a19249c2010743a467a51f8f0750712c2d92e0'/>
<id>urn:sha1:61a19249c2010743a467a51f8f0750712c2d92e0</id>
<content type='text'>
Add schema definition to cc_write_files.py

Cloud-config containing write_files config directives will now
emit warnings for invalid config keys or values for the write_files
module.

Add an extension to JSON schema's draft4validator to permit either
binary or text values for 'string' objects.

This allows for JSON schema validating the YAML declaration of binary
valiues in cloud-config using YAML's  '!!binary' syntax.

Add the ability to pass a specific module name to
`cloud-init devel schema --docs &lt;module_name&gt;|all` to optionally
limit doc output during development to a single schema doc.</content>
</entry>
<entry>
<title>Drop most of the remaining use of six (#179)</title>
<updated>2020-01-21T23:02:42+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-21T23:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bb71a9d08d25193836eda91c328760305285574e'/>
<id>urn:sha1:bb71a9d08d25193836eda91c328760305285574e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>write_files: add support for appending to files.</title>
<updated>2018-12-06T18:26:32+00:00</updated>
<author>
<name>James Baxter</name>
<email>j.w.baxter@gmail.com</email>
</author>
<published>2018-12-06T18:26:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a4007d063f96b82545aa678ef2cb472ea3b48b1e'/>
<id>urn:sha1:a4007d063f96b82545aa678ef2cb472ea3b48b1e</id>
<content type='text'>
Add 'append: true' to write_files entries to append 'content' to file
specified by 'path' key.  This modifies the file open mode to append.
</content>
</entry>
<entry>
<title>docs: note in rtd about avoiding /tmp when writing files</title>
<updated>2018-07-09T20:13:47+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2018-07-09T20:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=2e62cb8a6406309cbeb5f8d2aa00fb30e72e1cfc'/>
<id>urn:sha1:2e62cb8a6406309cbeb5f8d2aa00fb30e72e1cfc</id>
<content type='text'>
LP: #1727876
</content>
</entry>
</feed>
