|
|
|
@ -74,7 +74,7 @@ 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 |
|
|
|
|
When it is used cdist writes warning line. If 'deprecated' marker has content |
|
|
|
|
then this content is printed as a deprecation messages, e.g.: |
|
|
|
|
|
|
|
|
|
.. code-block:: sh |
|
|
|
@ -186,6 +186,31 @@ Example: (e.g. in cdist/conf/type/__nginx_vhost/manifest) |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Deprecated parameters |
|
|
|
|
--------------------- |
|
|
|
|
To deprecate type parameters one can declare a file for each deprecated |
|
|
|
|
parameter under **parameter/deprecated** directory. |
|
|
|
|
|
|
|
|
|
When such parameter is used cdist writes warning line with deprecation message. |
|
|
|
|
If such file has content then this content is printed as deprecation message. |
|
|
|
|
If there is no content then generic parameter deprecation message is printed. |
|
|
|
|
|
|
|
|
|
Example: |
|
|
|
|
|
|
|
|
|
.. code-block:: sh |
|
|
|
|
|
|
|
|
|
$ ls parameter/deprecated/ |
|
|
|
|
eggs spam |
|
|
|
|
$ cat parameter/deprecated/eggs |
|
|
|
|
eggs parameter is deprecated, please use multiple egg parameter. |
|
|
|
|
$ cat parameter/deprecated/spam |
|
|
|
|
$ echo '__foo foo --foo foo --eggs eggs' | ./bin/cdist config -i - 185.203.112.26 |
|
|
|
|
WARNING: 185.203.112.26: eggs parameter of type __foo is deprecated: eggs parameter is deprecated, please use multiple egg parameter. |
|
|
|
|
$ echo '__foo foo --foo foo --eggs eggs --spam spam' | ./bin/cdist config -i - 185.203.112.26 |
|
|
|
|
WARNING: 185.203.112.26: spam parameter of type __foo is deprecated. |
|
|
|
|
WARNING: 185.203.112.26: eggs parameter of type __foo is deprecated: eggs parameter is deprecated, please use multiple egg parameter. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Input from stdin |
|
|
|
|
---------------- |
|
|
|
|
Every type can access what has been written on stdin when it has been called. |
|
|
|
|