doc: datas => data
This commit is contained in:
parent
efcdc496ec
commit
64d0bfa802
14 changed files with 52 additions and 52 deletions
|
|
@ -27,7 +27,7 @@ Why another configuration manager?
|
|||
|
||||
Using Rougail tansforms end user consumer defined consistency rules into highly consistent business objects.
|
||||
It's a configuration language designed to simplify and unify the way you define,
|
||||
validate and generate configuration datas.
|
||||
validate and generate configuration data.
|
||||
|
||||
In other word, making it easier to manage complex configurations across multiple environments.
|
||||
|
||||
|
|
@ -78,13 +78,13 @@ User data
|
|||
|
||||
user data
|
||||
|
||||
User datas, as opposed to structured data, are datas that only concern the assignment of values
|
||||
User data, as opposed to structured data, are data that only concern the assignment of values
|
||||
and not the consistency of the variables between them.
|
||||
|
||||
The variable's values are also called **user values**.
|
||||
|
||||
The consistency field is outside of the user data scope.
|
||||
The consistency is handled in the :term:`structured datas <structured data>`\ 's scope.
|
||||
The consistency is handled in the :term:`structured data <structured data>`\ 's scope.
|
||||
|
||||
Here a some user data examples:
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ But instead of coding in the end user developer way, the opterator will prefer u
|
|||
.. image:: ../images/QuestionaryChoice.png
|
||||
|
||||
|
||||
The Rougail CLI can output a rather complete view of the dataset:
|
||||
The Rougail CLI can output a rather complete view of the dataet:
|
||||
|
||||
.. image:: ../images/UserDataOutput.png
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ The Rougail CLI can output a rather complete view of the dataset:
|
|||
:titlesonly:
|
||||
:caption: Use library
|
||||
|
||||
user_datas
|
||||
user_data
|
||||
output
|
||||
parse
|
||||
tags
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Display the result
|
||||
==================
|
||||
|
||||
After construct a configuration, loads user datas, you can choose this configuration in different output format.
|
||||
After construct a configuration, loads user data, you can choose this configuration in different output format.
|
||||
|
||||
First of create, let's create a structural file like this:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
Load user datas
|
||||
Load user data
|
||||
===============
|
||||
|
||||
User datas are values setup by user for configuration variables.
|
||||
User data are values setup by user for configuration variables.
|
||||
|
||||
There is differents types of user datas for differents sources types.
|
||||
There is differents types of user data for differents sources types.
|
||||
|
||||
We can cumulate user datas loader.
|
||||
We can cumulate user data loader.
|
||||
|
||||
For this section, we will use :file:`dict/00-base.yml` a structure file:
|
||||
|
||||
|
|
@ -81,8 +81,8 @@ Here is the script which is load user data from the YAML file:
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataYaml(config).run()
|
||||
rougail.user_datas(user_datas)
|
||||
user_data = RougailUserDataYaml(config).run()
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py`:
|
||||
|
|
@ -114,10 +114,10 @@ This is why the `yaml.file_with_secrets` parameter allows you to define whether
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataYaml(
|
||||
user_data = RougailUserDataYaml(
|
||||
config,
|
||||
).run()
|
||||
rougail.user_datas(user_datas)
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py`:
|
||||
|
|
@ -155,8 +155,8 @@ Here is the script:
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_datas(user_datas)
|
||||
user_data = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py`:
|
||||
|
|
@ -181,8 +181,8 @@ We can redefine the prefix with `environment.default_environment_name` (prefix i
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_datas(user_datas)
|
||||
user_data = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py`:
|
||||
|
|
@ -206,8 +206,8 @@ If you define a `main_namespace` or `extra_namespaces`, the `environment.default
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_datas(user_datas)
|
||||
user_data = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py`:
|
||||
|
|
@ -233,8 +233,8 @@ This is why the `environment.with_secrets` parameter allows you to reject secret
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_datas(user_datas)
|
||||
user_data = RougailUserDataEnvironment(config).run()
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py`:
|
||||
|
|
@ -261,10 +261,10 @@ Value can be define directly with command line arguments:
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataCommandline(
|
||||
user_data = RougailUserDataCommandline(
|
||||
config,
|
||||
).run()
|
||||
rougail.user_datas(user_datas)
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py` to display help:
|
||||
|
|
@ -299,10 +299,10 @@ Boolean variable has a special behavour. To set False you need to add --no-VARIA
|
|||
|
||||
.. ansible,bitwarden,questionary
|
||||
|
||||
Combine user datas
|
||||
Combine user data
|
||||
------------------
|
||||
|
||||
You can combine user datas, for example if you want to load datas from environment and/or command line argument:
|
||||
You can combine user data, for example if you want to load data from environment and/or command line argument:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: the :file:`script.py` file content
|
||||
|
|
@ -317,14 +317,14 @@ You can combine user datas, for example if you want to load datas from environme
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = []
|
||||
user_datas.extend(RougailUserDataEnvironment(
|
||||
user_data = []
|
||||
user_data.extend(RougailUserDataEnvironment(
|
||||
config,
|
||||
).run())
|
||||
user_datas.extend(RougailUserDataCommandline(
|
||||
user_data.extend(RougailUserDataCommandline(
|
||||
config,
|
||||
).run())
|
||||
rougail.user_datas(user_datas)
|
||||
rougail.user_data(user_data)
|
||||
print(config.value.get())
|
||||
|
||||
Let's execute `script.py` with environment variable and commandline arguments:
|
||||
|
|
@ -344,7 +344,7 @@ If the value of a variable is define with an environment variable and commandlin
|
|||
Manage errors and warnings
|
||||
--------------------------
|
||||
|
||||
Recreate a script with environnement variable support which is display the return of user_datas function:
|
||||
Recreate a script with environnement variable support which is display the return of user_data function:
|
||||
|
||||
.. code-block:: python
|
||||
:caption: the :file:`script.py` file content
|
||||
|
|
@ -359,10 +359,10 @@ Recreate a script with environnement variable support which is display the retur
|
|||
rougail = Rougail()
|
||||
config = rougail.run()
|
||||
|
||||
user_datas = RougailUserDataEnvironment(
|
||||
user_data = RougailUserDataEnvironment(
|
||||
config,
|
||||
).run()
|
||||
print(rougail.user_datas(user_datas))
|
||||
print(rougail.user_data(user_data))
|
||||
|
||||
Try to load the value an unknown variable:
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The read-write mode
|
|||
|
||||
When you are in the design phase, your are designing the structure file or
|
||||
setting values is some user data files, you have the role of :term:`integrator`
|
||||
or :term:`operator`. Then you need to have access to all the datas, even
|
||||
or :term:`operator`. Then you need to have access to all the data, even
|
||||
those which are :term:`hidden` or :term:`disabled`\ .
|
||||
|
||||
In this phase, the configuration shall be in `RW` mode.
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ We have an output like this one:
|
|||
`No proxy` is an available variable's value. We say that the `proxy_mode` variable is *constrained*
|
||||
by the possibilities of the `choice` parameter.
|
||||
|
||||
.. type-along:: Let's add some user datas to this structure
|
||||
.. type-along:: Let's add some user data to this structure
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_010/config/03/config.yml
|
||||
:linenos:
|
||||
|
|
@ -89,7 +89,7 @@ by the possibilities of the `choice` parameter.
|
|||
|
||||
:tutorial:`Download this file from the rougail-tutorials git repository <src/tag/v1.1_010/config/03/config.yml>`
|
||||
|
||||
If we run the Rougail CLI with this user datas:
|
||||
If we run the Rougail CLI with this user data:
|
||||
|
||||
.. raw:: html
|
||||
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_010/config/03/cmd_ro.txt
|
||||
|
|
@ -142,7 +142,7 @@ We have the list of the possible (authorized) values:
|
|||
|
||||
:tutorial:`Download this file from the rougail-tutorials git repository <src/tag/v1.1_010/config/04/config.yml>`
|
||||
|
||||
If we run the Rougail CLI with this user datas:
|
||||
If we run the Rougail CLI with this user data:
|
||||
|
||||
.. raw:: html
|
||||
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_010/config/04/cmd_ro.txt
|
||||
|
|
@ -165,14 +165,14 @@ something is going wrong, maybe you need some kind of a strict mode.
|
|||
|
||||
Indeed, this warning can be transformed into an error.
|
||||
|
||||
If we run the Rougail CLI with this `--cli.invalid_user_datas_error` parameter:
|
||||
If we run the Rougail CLI with this `--cli.invalid_user_data_error` parameter:
|
||||
|
||||
.. raw:: html
|
||||
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_010/config/04/cmd_invalid.txt
|
||||
:class: terminal
|
||||
|
||||
..
|
||||
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_datas_error
|
||||
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_data_error
|
||||
|
||||
Then we have an `error` output instead of a `warning` output:
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ then the `manual` family **is enabled**:
|
|||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_051/config/02/config.yml
|
||||
:linenos:
|
||||
:language: yaml
|
||||
:caption: The `proxy_mode`'s manual setting in the :file:`config/02/config.yaml` user datas file
|
||||
:caption: The `proxy_mode`'s manual setting in the :file:`config/02/config.yaml` user data file
|
||||
|
||||
..
|
||||
---
|
||||
|
|
@ -687,7 +687,7 @@ Here is an example with different user values for handling HTTP and HTTPS:
|
|||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_053/config/01/config.yml
|
||||
:linenos:
|
||||
:language: yaml
|
||||
:caption: User datas in the user data file :file:`config/01/config.yml` with `use_for_https` as false
|
||||
:caption: User data in the user data file :file:`config/01/config.yml` with `use_for_https` as false
|
||||
|
||||
..
|
||||
---
|
||||
|
|
@ -747,7 +747,7 @@ Here is an example with identical HTTP and HTTPS proxy configuration:
|
|||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_053/config/02/config.yml
|
||||
:linenos:
|
||||
:language: yaml
|
||||
:caption: User datas in the user data file :file:`config/02/config.yml` with `use_for_https` as true
|
||||
:caption: User data in the user data file :file:`config/02/config.yml` with `use_for_https` as true
|
||||
|
||||
..
|
||||
---
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ The value is obviously not a domain name, then when we will launch the Rougail C
|
|||
:class: terminal
|
||||
|
||||
..
|
||||
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_datas_error
|
||||
rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_data_error
|
||||
|
||||
we then have this output:
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ we will see a little problem:
|
|||
:class: terminal
|
||||
|
||||
..
|
||||
rougail -m firefox/ -u yaml -yf config/02/config.yml --cli.invalid_user_datas_error
|
||||
rougail -m firefox/ -u yaml -yf config/02/config.yml --cli.invalid_user_data_error
|
||||
|
||||
we then have this output:
|
||||
|
||||
|
|
@ -356,7 +356,7 @@ Again, we launch the Rougail CLI:
|
|||
:class: terminal
|
||||
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_032/config/03/cmd_invalid.txt
|
||||
|
||||
.. rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_datas_error
|
||||
.. rougail -m firefox/ -u yaml -yf config/03/config.yml --cli.invalid_user_data_error
|
||||
|
||||
And we have this output:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Load user datas from Bitwarden server
|
||||
Load user data from Bitwarden server
|
||||
=====================================
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Load user datas from commandline parser
|
||||
Load user data from commandline parser
|
||||
=======================================
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Load user datas from a environment variable
|
||||
Load user data from a environment variable
|
||||
===========================================
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ User data description
|
|||
|
||||
Rougail is a collections of subproject in order to adjust functionalities to your needs.
|
||||
|
||||
User datas is one of category of subjects. The goal is to setup variable with value defined by the user.
|
||||
User data is one of category of subjects. The goal is to setup variable with value defined by the user.
|
||||
|
||||
There are different user datas types:
|
||||
There are different user data types:
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Load user datas from a command line interface
|
||||
Load user data from a command line interface
|
||||
=============================================
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Charge user data from YAML file
|
|||
|
||||
| **Path**: yaml
|
||||
| `*disabled*`
|
||||
| **Disabled**: if yaml is not set in "select for user datas" (step.user_data).
|
||||
| **Disabled**: if yaml is not set in "select for user data" (step.user_data).
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue