forked from ungleich-public/cdist
Add type deprecation support.
This commit is contained in:
parent
ea291efbf6
commit
4949af894e
6 changed files with 58 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ next:
|
|||
* Type __consul: Add version 1.5.0 (Nico Schottelius)
|
||||
* Type __consul_agent: Add alpine support (Nico Schottelius)
|
||||
* New helper script: cdist-new-type (Steven Armstrong, Darko Poljak)
|
||||
* Core: Add support for deprecated type marker (Darko Poljak)
|
||||
|
||||
5.0.2: 2019-05-17
|
||||
* Type __package_apk: Fix @repo handling in explorer (Nico Schottelius)
|
||||
|
|
|
|||
|
|
@ -71,6 +71,31 @@ when using -j option. Example of such a type is __package_dpkg type where dpkg i
|
|||
prevents to be run in more than one instance.
|
||||
|
||||
|
||||
Deprecated types
|
||||
-----------------
|
||||
If a type is flagged with 'deprecated' marker then it is considered deprecated.
|
||||
Upon it's usage cdist writes warning line. If 'deprecated' marker has content
|
||||
then this content is printed as a deprecation messages, e.g.:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ ls -l deprecated
|
||||
-rw-r--r-- 1 darko darko 71 May 20 18:30 deprecated
|
||||
$ cat deprecated
|
||||
This type is deprecated. It will be removed in the next minor release.
|
||||
$ echo '__foo foo' | ./bin/cdist config -i - 185.203.112.26
|
||||
WARNING: 185.203.112.26: Type __foo is deprecated: This type is deprecated. It will be removed in the next minor release.
|
||||
|
||||
If 'deprecated' marker has no content then general message is printed, e.g.:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ ls -l deprecated
|
||||
-rw-r--r-- 1 darko darko 0 May 20 18:36 deprecated
|
||||
$ echo '__bar foo' | ./bin/cdist config -i - 185.203.112.26
|
||||
WARNING: 185.203.112.26: Type __bar is deprecated.
|
||||
|
||||
|
||||
How to write a new type
|
||||
-----------------------
|
||||
A type consists of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue