Compare commits
No commits in common. "0.2.0a20" and "main" have entirely different histories.
1990 changed files with 3800 additions and 17035 deletions
150
CHANGELOG.md
150
CHANGELOG.md
|
|
@ -1,153 +1,3 @@
|
||||||
## 0.2.0a20 (2026-05-04)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- multi layers support
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- load indefine if no default value
|
|
||||||
- user-data-ansible can set a personalise source
|
|
||||||
- test if password is set in a forbidden file even if it also in legitimate file
|
|
||||||
|
|
||||||
## 0.2.0a19 (2026-01-21)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a18 (2025-12-30)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- doc
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a17 (2025-12-22)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- user_datas => user_data
|
|
||||||
|
|
||||||
## 0.2.0a16 (2025-11-21)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add 'add_help' option un TiramisuCmdLineParser + -ff => -yf
|
|
||||||
|
|
||||||
## 0.2.0a15 (2025-11-06)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
- unknown variable
|
|
||||||
|
|
||||||
## 0.2.0a14 (2025-10-10)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update test
|
|
||||||
- tests
|
|
||||||
- tests for formatter
|
|
||||||
|
|
||||||
## 0.2.0a13 (2025-09-29)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- default value for a calculated variable with an unknown optional variable
|
|
||||||
- update tests for integer type
|
|
||||||
|
|
||||||
## 0.2.0a12 (2025-09-22)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- dependency
|
|
||||||
|
|
||||||
## 0.2.0a11 (2025-05-26)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- do not load yaml has YAML object
|
|
||||||
|
|
||||||
## 0.2.0a10 (2025-05-14)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- yaml.filename could be the name of a directory
|
|
||||||
|
|
||||||
## 0.2.0a9 (2025-05-12)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- black
|
|
||||||
- update translation
|
|
||||||
- load file with order
|
|
||||||
|
|
||||||
## 0.2.0a8 (2025-05-02)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- do not force use_data usage
|
|
||||||
|
|
||||||
## 0.2.0a7 (2025-04-30)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a6 (2025-04-09)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- version
|
|
||||||
|
|
||||||
## 0.2.0a5 (2025-04-09)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- better error message
|
|
||||||
|
|
||||||
## 0.2.0a4 (2025-04-01)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a3 (2025-03-30)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- i18n
|
|
||||||
|
|
||||||
## 0.2.0a2 (2025-03-30)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
- update tests, some errors are now in warnings level
|
|
||||||
|
|
||||||
## 0.2.0a1 (2025-02-10)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add new parameter yaml.file_with_secrets
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a0 (2024-12-11)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- rename file to yaml
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- prepare ansible user data
|
|
||||||
|
|
||||||
## 0.1.0 (2024-11-06)
|
|
||||||
|
|
||||||
## 0.1.0rc1 (2024-11-06)
|
## 0.1.0rc1 (2024-11-06)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
20
README.fr.md
20
README.fr.md
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
gitea: none
|
|
||||||
include_toc: true
|
|
||||||
---
|
|
||||||
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
|
|
||||||
|
|
||||||
## Charger les données utilisateur à partir d'un fichier YAML
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
>
|
|
||||||
> **Chemin** : yaml\
|
|
||||||
> *`désactivé`*\
|
|
||||||
> **Désactivé** : si yaml n'est pas défini dans "[Sélection pour données utilisateur](#step.user_data)"
|
|
||||||
|
|
||||||
| Variable | Description | Valeur par défaut | Type | Validateur |
|
|
||||||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
||||||
| **<a id="yaml.filename" name="yaml.filename">yaml.filename</a>**<br/>**Ligne de commande** : <br/>-yf, --yaml.filename<br/>**Variable d'environnement** : YAML.FILENAME | Noms de fichiers ou répertoires où sont enregistrés les données utilisateur.<br/>Si un répertoire est défini, tous les fichiers avec l'extension "yml" ou "yaml" seront chargés dans l'ordre alphanumérique. | | [`UNIX filename`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `obligatoire` | `unique`<br/>• le nom de fichier peut être une chemin relatif<br/>• le fichier doit exister<br/>• type de fichier autorisé: "fichier" et "répertoire". |
|
|
||||||
| **<a id="yaml.file_with_secrets" name="yaml.file_with_secrets">yaml.file_with_secrets</a>**<br/>**Ligne de commande** : <br/>--yaml.file_with_secrets<br/>**Variable d'environnement** : YAML.FILE_WITH_SECRETS | Le fichier peut contenir des secrets.<br/>Par défaut, tous les fichiers peuvent contenir des secrets. Il peut être intéressant de définir plus précisément quels fichiers peuvent contenir ces secrets. | all | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | **Choix** : <br/>• all<br/>• first<br/>• last<br/>• none |
|
|
||||||
|
|
||||||
|
|
||||||
20
README.md
20
README.md
|
|
@ -1,20 +1,2 @@
|
||||||
---
|
# rougail-user-data
|
||||||
gitea: none
|
|
||||||
include_toc: true
|
|
||||||
---
|
|
||||||
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
|
|
||||||
|
|
||||||
## Charge user data from YAML file
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
>
|
|
||||||
> **Path**: yaml\
|
|
||||||
> *`disabled`*\
|
|
||||||
> **Disabled**: if yaml is not set in "[Select for user datas](#step.user_data)"
|
|
||||||
|
|
||||||
| Variable | Description | Default value | Type | Validator |
|
|
||||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
||||||
| **<a id="yaml.filename" name="yaml.filename">yaml.filename</a>**<br/>**Command line**: <br/>-yf, --yaml.filename<br/>**Environment variable**: YAML.FILENAME | File or directory names where user data are stored.<br/>If a directory is set, all files with "yml" ou "yaml" extension will be load with alphanum order. | | [`UNIX filename`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `mandatory` | `unique`<br/>• this filename could be a relative path<br/>• this file must exist<br/>• file type allowed: "directory" and "file". |
|
|
||||||
| **<a id="yaml.file_with_secrets" name="yaml.file_with_secrets">yaml.file_with_secrets</a>**<br/>**Command line**: <br/>--yaml.file_with_secrets<br/>**Environment variable**: YAML.FILE_WITH_SECRETS | File that may contain secrets.<br/>By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets. | all | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Choices**: <br/>• all<br/>• first<br/>• last<br/>• none |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR ORGANIZATION
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: \n"
|
|
||||||
"POT-Creation-Date: 2025-12-29 12:15+0100\n"
|
|
||||||
"PO-Revision-Date: 2025-12-29 12:18+0100\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
|
||||||
"X-Generator: Poedit 3.8\n"
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:46
|
|
||||||
msgid "yaml is not set in step.user_data"
|
|
||||||
msgstr "\"yaml\" n'est pas défini dans step.user_data"
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:74
|
|
||||||
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
|
|
||||||
msgstr ""
|
|
||||||
"ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais "
|
|
||||||
"\"{1}\""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:95
|
|
||||||
msgid "the YAML file \"{0}\""
|
|
||||||
msgstr "le fichier YAML \"{0}\""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:127
|
|
||||||
msgid "\"{0}\" in {1} has an unknown value"
|
|
||||||
msgstr "\"{0}\" dans {1} a une valeur inconnue"
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:30
|
|
||||||
msgid "Charge user data from YAML file"
|
|
||||||
msgstr "Charger les données utilisateur à partir d'un fichier YAML"
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:35
|
|
||||||
msgid "if yaml is not set in \"step.user_data\""
|
|
||||||
msgstr "si yaml n'est pas défini dans \"step.user_data\""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:38
|
|
||||||
msgid "File or directory names where user data are stored"
|
|
||||||
msgstr ""
|
|
||||||
"Noms de fichiers ou répertoires où sont enregistrés les données utilisateur"
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:39
|
|
||||||
msgid ""
|
|
||||||
"If a directory is set, all files with \"yml\" ou \"yaml\" extension will be "
|
|
||||||
"load with alphanum order."
|
|
||||||
msgstr ""
|
|
||||||
"Si un répertoire est défini, tous les fichiers avec l'extension \"yml\" ou "
|
|
||||||
"\"yaml\" seront chargés dans l'ordre alphanumérique."
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:48
|
|
||||||
msgid "File that may contain secrets"
|
|
||||||
msgstr "Le fichier peut contenir des secrets"
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:49
|
|
||||||
msgid ""
|
|
||||||
"By default, all files can contain secrets. It might be useful to define more "
|
|
||||||
"precisely which files can contain these secrets."
|
|
||||||
msgstr ""
|
|
||||||
"Par défaut, tous les fichiers peuvent contenir des secrets. Il peut être "
|
|
||||||
"intéressant de définir plus précisément quels fichiers peuvent contenir ces "
|
|
||||||
"secrets."
|
|
||||||
|
|
||||||
#~ msgid "Configuration rougail-user-data-yaml"
|
|
||||||
#~ msgstr "Configuration de rougail-user-data-yaml"
|
|
||||||
|
|
||||||
#~ msgid "Filename"
|
|
||||||
#~ msgstr "Nom du fichier"
|
|
||||||
BIN
locale/fr/LC_MESSAGES/user_data_file.mo
Normal file
BIN
locale/fr/LC_MESSAGES/user_data_file.mo
Normal file
Binary file not shown.
35
locale/fr/LC_MESSAGES/user_data_file.po
Normal file
35
locale/fr/LC_MESSAGES/user_data_file.po
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR ORGANIZATION
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: \n"
|
||||||
|
"POT-Creation-Date: 2024-11-01 12:12+0100\n"
|
||||||
|
"PO-Revision-Date: 2024-11-01 12:13+0100\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
"X-Generator: Poedit 3.5\n"
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:40
|
||||||
|
msgid "file is not set in step.user_data"
|
||||||
|
msgstr "\"file\" n'est pas défini dans step.user_data"
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:58
|
||||||
|
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
|
||||||
|
msgstr ""
|
||||||
|
"ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais "
|
||||||
|
"\"{1}\""
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:66
|
||||||
|
msgid "file ({0})"
|
||||||
|
msgstr "fichier ({0})"
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:88
|
||||||
|
msgid "\"{0}\" in {1} has an unknown value"
|
||||||
|
msgstr "\"{0}\" dans {1} a une valeur inconnue"
|
||||||
33
locale/rougail_user_data_file.pot
Normal file
33
locale/rougail_user_data_file.pot
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR ORGANIZATION
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2024-11-01 12:13+0100\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:40
|
||||||
|
msgid "file is not set in step.user_data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:58
|
||||||
|
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:66
|
||||||
|
msgid "file ({0})"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/user_data_file/__init__.py:88
|
||||||
|
msgid "\"{0}\" in {1} has an unknown value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
|
||||||
# Copyright (C) YEAR ORGANIZATION
|
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
|
||||||
"POT-Creation-Date: 2025-12-29 12:18+0100\n"
|
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
|
||||||
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:46
|
|
||||||
msgid "yaml is not set in step.user_data"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:74
|
|
||||||
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:95
|
|
||||||
msgid "the YAML file \"{0}\""
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/__init__.py:127
|
|
||||||
msgid "\"{0}\" in {1} has an unknown value"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:30
|
|
||||||
msgid "Charge user data from YAML file"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:35
|
|
||||||
msgid "if yaml is not set in \"step.user_data\""
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:38
|
|
||||||
msgid "File or directory names where user data are stored"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:39
|
|
||||||
msgid "If a directory is set, all files with \"yml\" ou \"yaml\" extension will be load with alphanum order."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:48
|
|
||||||
msgid "File that may contain secrets"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/user_data_yaml/config.py:49
|
|
||||||
msgid "By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
|
|
@ -3,20 +3,21 @@ build-backend = "flit_core.buildapi"
|
||||||
requires = ["flit_core >=3.8.0,<4"]
|
requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.user_data_yaml"
|
name = "rougail.user_data_file"
|
||||||
version = "0.2.0a20"
|
version = "0.1.0"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail user_data yaml"
|
description = "Rougail user_data file"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: 3.12",
|
"Programming Language :: Python :: 3.12",
|
||||||
"Programming Language :: Python :: 3.13",
|
|
||||||
"Programming Language :: Python :: 3.14",
|
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
|
|
@ -24,21 +25,16 @@ classifiers = [
|
||||||
|
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rougail-base >= 1.1,<2",
|
"rougail >= 1.1,<2",
|
||||||
"ruamel.yaml ~= 0.18.6",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Home = "https://forge.cloud.silique.fr/stove/rougail-user-data-yaml"
|
Home = "https://forge.cloud.silique.fr/stove/rougail-user-data-file"
|
||||||
|
|
||||||
[tool.commitizen]
|
[tool.commitizen]
|
||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
tag_format = "$version"
|
tag_format = "$version"
|
||||||
version_scheme = "pep440"
|
version_scheme = "pep440"
|
||||||
version_provider = "pep621"
|
version_provider = "pep621"
|
||||||
version_files = [
|
#update_changelog_on_bump = true
|
||||||
"src/rougail/user_data_yaml/__version__.py",
|
|
||||||
"pyproject.toml:version"
|
|
||||||
]
|
|
||||||
update_changelog_on_bump = true
|
|
||||||
changelog_merge_prerelease = true
|
changelog_merge_prerelease = true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"""
|
"""
|
||||||
Silique (https://www.silique.fr)
|
Silique (https://www.silique.fr)
|
||||||
Copyright (C) 2024-2026
|
Copyright (C) 2024
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it
|
This program is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Lesser General Public License as published by the
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
|
@ -16,107 +16,68 @@ You should have received a copy of the GNU Lesser General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from rougail import RougailConfig
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
from pathlib import Path
|
|
||||||
from itertools import chain
|
|
||||||
|
|
||||||
from rougail.error import ExtensionError
|
|
||||||
from tiramisu.error import ValueOptionError, PropertiesOptionError, LeadershipError
|
from tiramisu.error import ValueOptionError, PropertiesOptionError, LeadershipError
|
||||||
from rougail.utils import undefined
|
|
||||||
from tiramisu import MetaConfig
|
|
||||||
|
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
from .__version__ import __version__
|
|
||||||
|
|
||||||
|
|
||||||
class RougailUserDataYaml:
|
class RougailUserDataFile:
|
||||||
has_several_layers = True
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
config,
|
config,
|
||||||
*,
|
*,
|
||||||
rougailconfig=None,
|
rougailconfig=None,
|
||||||
**kwargs,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
if rougailconfig is None:
|
if rougailconfig is None:
|
||||||
from rougail import RougailConfig
|
|
||||||
|
|
||||||
rougailconfig = RougailConfig
|
rougailconfig = RougailConfig
|
||||||
user_data = rougailconfig["step.user_data"]
|
user_data = rougailconfig["step.user_data"]
|
||||||
if "yaml" not in user_data:
|
if "file" not in user_data:
|
||||||
user_data.append("yaml")
|
user_data.append("file")
|
||||||
rougailconfig["step.user_data"] = user_data
|
rougailconfig["step.user_data"] = user_data
|
||||||
user_data = rougailconfig["step.user_data"]
|
user_data = rougailconfig["step.user_data"]
|
||||||
if "yaml" not in user_data:
|
if "file" not in user_data:
|
||||||
raise ExtensionError(_("yaml is not set in step.user_data"))
|
raise Exception(_("file is not set in step.user_data"))
|
||||||
self.rougailconfig = rougailconfig
|
self.rougailconfig = rougailconfig
|
||||||
self.filenames = []
|
self.filenames = self.rougailconfig["file.filename"]
|
||||||
for filename in self.rougailconfig["yaml.filename"]:
|
self.yaml = YAML()
|
||||||
filename = Path(filename)
|
self.config = config
|
||||||
if filename.is_file():
|
|
||||||
self.filenames.append(filename)
|
|
||||||
else:
|
|
||||||
for name in sorted(chain(filename.glob('*.yml'), filename.glob('*.yaml'))):
|
|
||||||
self.filenames.append(name)
|
|
||||||
|
|
||||||
self.file_with_secrets = self.rougailconfig["yaml.file_with_secrets"]
|
|
||||||
self.errors = []
|
self.errors = []
|
||||||
self.warnings = []
|
self.warnings = []
|
||||||
self.source = _('the YAML file "{0}"')
|
|
||||||
|
|
||||||
def count_layers(self):
|
|
||||||
return len(self.filenames)
|
|
||||||
|
|
||||||
def run(
|
def run(
|
||||||
self,
|
self,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.yaml = YAML(typ='safe', pure=True)
|
user_datas = []
|
||||||
user_data = []
|
for filename in self.filenames:
|
||||||
if self.file_with_secrets == "last":
|
with open(filename) as fh_config:
|
||||||
last_filename_idx = len(self.filenames) - 1
|
file_values = self.yaml.load(fh_config)
|
||||||
for idx, filename in enumerate(self.filenames):
|
|
||||||
file_values = self.open(filename)
|
|
||||||
if not file_values:
|
if not file_values:
|
||||||
continue
|
continue
|
||||||
values = {}
|
|
||||||
if not isinstance(file_values, dict):
|
if not isinstance(file_values, dict):
|
||||||
self.errors.append(
|
self.errors.append(
|
||||||
_(
|
_(
|
||||||
'cannot load "{0}", the root value is not a dict but "{1}"'
|
'cannot load "{0}", the root value is not a dict but "{1}"'
|
||||||
).format(filename, file_values)
|
).format(filename, file_values)
|
||||||
)
|
)
|
||||||
else:
|
continue
|
||||||
self.parse(
|
values = {}
|
||||||
values,
|
self.parse(
|
||||||
"",
|
values,
|
||||||
file_values,
|
"",
|
||||||
filename,
|
file_values,
|
||||||
)
|
filename,
|
||||||
if self.file_with_secrets == "none":
|
)
|
||||||
allow_secrets_variables = False
|
user_datas.append(
|
||||||
elif self.file_with_secrets == "first":
|
|
||||||
allow_secrets_variables = idx == 0
|
|
||||||
elif self.file_with_secrets == "last":
|
|
||||||
allow_secrets_variables = idx == last_filename_idx
|
|
||||||
else:
|
|
||||||
allow_secrets_variables = True
|
|
||||||
user_data.append(
|
|
||||||
{
|
{
|
||||||
"source": self.source.format(filename),
|
"source": _("file ({0})").format(filename),
|
||||||
"errors": self.errors,
|
"errors": self.errors,
|
||||||
"warnings": self.warnings,
|
"warnings": self.warnings,
|
||||||
"values": values,
|
"values": values,
|
||||||
"options": {
|
|
||||||
"allow_secrets_variables": allow_secrets_variables,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return user_data
|
return user_datas
|
||||||
|
|
||||||
def open(self, filename: str) -> dict:
|
|
||||||
with filename.open() as fh_config:
|
|
||||||
return self.yaml.load(fh_config)
|
|
||||||
|
|
||||||
def parse(
|
def parse(
|
||||||
self,
|
self,
|
||||||
|
|
@ -131,7 +92,7 @@ class RougailUserDataYaml:
|
||||||
self.parse(values, path + ".", value, filename)
|
self.parse(values, path + ".", value, filename)
|
||||||
elif isinstance(value, list) and value and isinstance(value[0], dict):
|
elif isinstance(value, list) and value and isinstance(value[0], dict):
|
||||||
# it's a leadership
|
# it's a leadership
|
||||||
keys = []
|
keys = set()
|
||||||
for val in value:
|
for val in value:
|
||||||
if not isinstance(val, dict):
|
if not isinstance(val, dict):
|
||||||
self.errors.append(
|
self.errors.append(
|
||||||
|
|
@ -140,21 +101,19 @@ class RougailUserDataYaml:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
for v in val:
|
keys |= set(val)
|
||||||
if v not in keys:
|
|
||||||
keys.append(v)
|
|
||||||
else:
|
else:
|
||||||
for val in value:
|
for val in value:
|
||||||
for key in keys:
|
for key in keys:
|
||||||
values.setdefault(path + "." + key, []).append(
|
values.setdefault(path + "." + key, []).append(
|
||||||
val.get(key, undefined)
|
val.get(key, None)
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
values[path] = value
|
values[path] = value
|
||||||
|
|
||||||
|
|
||||||
RougailUserData = RougailUserDataYaml
|
RougailUserData = RougailUserDataFile
|
||||||
|
|
||||||
|
|
||||||
__all__ = ("RougailUserDataYaml",)
|
__all__ = ("RougailUserDataFile",)
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
"""
|
"""
|
||||||
Config yaml for Rougail-user-data
|
Config file for Rougail-user-data
|
||||||
|
|
||||||
Silique (https://www.silique.fr)
|
Silique (https://www.silique.fr)
|
||||||
Copyright (C) 2024-2026
|
Copyright (C) 2024
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it
|
This program is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Lesser General Public License as published by the
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
|
@ -18,44 +18,33 @@ You should have received a copy of the GNU Lesser General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .i18n import _
|
|
||||||
|
|
||||||
|
|
||||||
def get_rougail_config(
|
def get_rougail_config(
|
||||||
*,
|
*,
|
||||||
backward_compatibility=True,
|
backward_compatibility=True,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
options = f"""
|
options = """
|
||||||
yaml:
|
file:
|
||||||
description: {_("Charge user data from YAML file")}
|
description: Configuration rougail-user-data-file
|
||||||
disabled:
|
disabled:
|
||||||
jinja: >-
|
type: jinja
|
||||||
{{{{ step.user_data is propertyerror or 'yaml' not in step.user_data }}}}
|
jinja: |
|
||||||
return_type: boolean
|
{% if 'file' not in step.user_data %}
|
||||||
description: {_('if yaml is not set in "step.user_data"')}
|
disabled
|
||||||
|
{% endif %}
|
||||||
filename:
|
filename:
|
||||||
description: {_("File or directory names where user data are stored")}
|
description: Filename with user data
|
||||||
help: {_('If a directory is set, all files with "yml" ou "yaml" extension will be load with alphanum order.')}
|
alternative_name: ff
|
||||||
alternative_name: yf
|
|
||||||
type: unix_filename
|
type: unix_filename
|
||||||
multi: true
|
multi: true
|
||||||
params:
|
params:
|
||||||
allow_relative: True
|
allow_relative: True
|
||||||
test_existence: True
|
test_existence: True
|
||||||
|
types:
|
||||||
file_with_secrets:
|
- file
|
||||||
description: {_("File that may contain secrets")}
|
|
||||||
help: {_('By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets.')}
|
|
||||||
default: all
|
|
||||||
choices:
|
|
||||||
- all
|
|
||||||
- first
|
|
||||||
- last
|
|
||||||
- none
|
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
"name": "yaml",
|
"name": "file",
|
||||||
"process": "user data",
|
"process": "user data",
|
||||||
"options": options,
|
"options": options,
|
||||||
"level": 50,
|
"level": 50,
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"""Internationalisation utilities
|
"""Internationalisation utilities
|
||||||
Silique (https://www.silique.fr)
|
Silique (https://www.silique.fr)
|
||||||
Copyright (C) 2024-2026
|
Copyright (C) 2024
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it
|
This program is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Lesser General Public License as published by the
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
|
@ -20,7 +20,7 @@ from gettext import translation
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
t = translation(
|
t = translation(
|
||||||
"rougail_user_data_yaml", str(Path(__file__).parent / "locale"), fallback=True
|
"rougail_user_data_file", str(Path(__file__).parent / "locale"), fallback=True
|
||||||
)
|
)
|
||||||
|
|
||||||
_ = t.gettext
|
_ = t.gettext
|
||||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
||||||
__version__ = "0.2.0a20"
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"variable1": "value1",
|
|
||||||
"variable2": "value2",
|
|
||||||
"variable3": null
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
variable1:
|
|
||||||
mandatory: false
|
|
||||||
|
|
||||||
variable2:
|
|
||||||
mandatory: false
|
|
||||||
|
|
||||||
variable3:
|
|
||||||
mandatory: false
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
variable3: value3
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
variable2: value2
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
variable1: value1
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"dynVal1": {
|
|
||||||
"var": "string1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
version: '1.1'
|
|
||||||
|
|
||||||
var: [] # A suffix variable
|
|
||||||
|
|
||||||
"dyn{{ identifier }}":
|
|
||||||
description: A dynamic family
|
|
||||||
dynamic:
|
|
||||||
variable: _.var
|
|
||||||
var: # A dynamic variable
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"dynVal1": {
|
|
||||||
"var": "string1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
version: '1.1'
|
|
||||||
|
|
||||||
var: #A suffix variable
|
|
||||||
mandatory: false
|
|
||||||
default: []
|
|
||||||
|
|
||||||
"dyn{{ identifier }}":
|
|
||||||
description: A dynamic family
|
|
||||||
dynamic:
|
|
||||||
variable: _.var
|
|
||||||
var: # A dynamic variable
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
"variable or family \"unknown\" does not exist so cannot load \"unknown\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/00_unknown_variable.yaml\""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"family \"family_disabled\" has property disabled, so cannot access to \"variable1\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"",
|
|
||||||
"family_disabled.variable1",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"family \"family_disabled\" has property disabled, so cannot access to \"variable2\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"",
|
|
||||||
"family_disabled.variable2",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable has property disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_variable.yaml\"",
|
|
||||||
"variable_disabled",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"test\" is an invalid integer, it's not an integer, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_wrong_type.yaml\"",
|
|
||||||
"variable_int",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"family \"family_disabled_hidden\" has property disabled and hidden, so cannot access to \"variable1\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/02_disabled_hidden_family.yaml\"",
|
|
||||||
"family_disabled_hidden.variable1",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"**********\" is an invalid password, at least 10 characters are required, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/04_value_secret.yaml\"",
|
|
||||||
"secret",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"it's a family so we cannot set the value \"test\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/05_value_family.yaml\"",
|
|
||||||
"family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
"variable or family \"dyn_unknown\" does not exist so cannot load \"dyn_unknown.variable\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/06_dynamic_unknown.yaml\""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable \"follower_disabled\" at index \"0\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
|
|
||||||
"leadership.follower_disabled",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable \"follower_disabled\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
|
|
||||||
"leadership.follower_disabled",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable \"follower_disabled\" at index \"2\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
|
|
||||||
"leadership.follower_disabled",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable \"follower_disabled_at_index\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
|
|
||||||
"leadership.follower_disabled_at_index",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable or family \"unknwon\" does not exist so cannot load \"leadership.unknwon\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_unknown.yaml\"",
|
|
||||||
"leadership",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
variable:
|
|
||||||
|
|
||||||
secret:
|
|
||||||
type: secret
|
|
||||||
params:
|
|
||||||
min_len: 10
|
|
||||||
|
|
||||||
variable_disabled:
|
|
||||||
disabled: true
|
|
||||||
|
|
||||||
variable_disabled_hidden:
|
|
||||||
disabled: true
|
|
||||||
hidden: true
|
|
||||||
|
|
||||||
variable_int:
|
|
||||||
type: number
|
|
||||||
|
|
||||||
family:
|
|
||||||
|
|
||||||
variable:
|
|
||||||
|
|
||||||
family_disabled:
|
|
||||||
disabled: true
|
|
||||||
|
|
||||||
variable1:
|
|
||||||
|
|
||||||
variable2:
|
|
||||||
|
|
||||||
family_disabled_hidden:
|
|
||||||
disabled: true
|
|
||||||
hidden: true
|
|
||||||
|
|
||||||
variable1:
|
|
||||||
|
|
||||||
variable2:
|
|
||||||
|
|
||||||
dyn_{{ identifier }}:
|
|
||||||
dynamic:
|
|
||||||
- var1
|
|
||||||
- var2
|
|
||||||
|
|
||||||
variable:
|
|
||||||
|
|
||||||
leadership:
|
|
||||||
type: leadership
|
|
||||||
|
|
||||||
leader:
|
|
||||||
|
|
||||||
follower:
|
|
||||||
|
|
||||||
follower_disabled:
|
|
||||||
disabled: true
|
|
||||||
|
|
||||||
follower_disabled_at_index:
|
|
||||||
disabled:
|
|
||||||
jinja: >-
|
|
||||||
{% if index == 1 %}
|
|
||||||
true
|
|
||||||
{% else %}
|
|
||||||
{% endif %}
|
|
||||||
params:
|
|
||||||
index:
|
|
||||||
type: index
|
|
||||||
...
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
unknown: 1
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
family_disabled:
|
|
||||||
variable1: test
|
|
||||||
variable2: test
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
variable_disabled: test
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
variable_int: test
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
family_disabled_hidden:
|
|
||||||
variable1: test
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
secret: a
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
family: test
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
dyn_unknown:
|
|
||||||
variable: test
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
leadership:
|
|
||||||
- leader: test1
|
|
||||||
follower: test1
|
|
||||||
follower_disabled: test1
|
|
||||||
follower_disabled_at_index: test1
|
|
||||||
- leader: test2
|
|
||||||
follower: test2
|
|
||||||
follower_disabled: test2
|
|
||||||
follower_disabled_at_index: test2
|
|
||||||
- leader: test3
|
|
||||||
follower: test3
|
|
||||||
follower_disabled: test3
|
|
||||||
follower_disabled_at_index: test3
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
leadership:
|
|
||||||
- leader: test
|
|
||||||
unknwon: test
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
leadership:
|
|
||||||
- leader: test
|
|
||||||
follower: test1
|
|
||||||
- follower: test1
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
a_family:
|
|
||||||
a_boolean: oups
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
a_str:
|
|
||||||
- ly
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
a_family: oups
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
a_leadership:
|
|
||||||
- a_leader: val1
|
|
||||||
a_follower: 1
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
a_multi: oups
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
a_family:
|
|
||||||
|
|
||||||
a_boolean:
|
|
||||||
- true
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid boolean, invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"it's a family so we cannot set the value \"oups\", it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"it's a family so we cannot set the value \"oups\", it has been loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"it's a family so we cannot set the value \"oups\", it has been loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"it's a family so we cannot set the value \"oups\", it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid boolean, invalid value, it has been loading from the YAML file \"tests/invalid/invalid/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid boolean, invalid value, it has been loading from the YAML file \"tests/invalid/invalid/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"1\" is an invalid string, it's not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
|
|
||||||
"a_leadership.a_follower",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"1\" is an invalid string, it's not a string, it has been loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
|
|
||||||
"a_leadership.a_follower",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"1\" is an invalid string, it's not a string, it has been loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
|
|
||||||
"a_leadership.a_follower",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"1\" is an invalid string, it's not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
|
|
||||||
"a_leadership.a_follower",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid string, it must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
|
|
||||||
"a_multi",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"True\" is an invalid boolean, it must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"True\" is an invalid boolean, it must not be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"True\" is an invalid boolean, it must not be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"True\" is an invalid boolean, it must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid string, it must be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
|
|
||||||
"a_multi",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid string, it must be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
|
|
||||||
"a_multi",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid string, it must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
|
|
||||||
"a_multi",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"oups\" is an invalid boolean, invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"",
|
|
||||||
"a_family.a_boolean",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable or family \"unknown\" does not exist so cannot load \"a_family.unknown\", it will be ignored when loading from the YAML file \"tests/invalid/unknown/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
"variable or family \"an_unkown_family\" does not exist so cannot load \"an_unkown_family.unknown\", it will be ignored when loading from the YAML file \"tests/invalid/unknown2/00.yml\""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
"variable or family \"an_unkown_family\" does not exist so cannot load \"an_unkown_family.unknown\", it will be ignored when loading from the YAML file \"tests/invalid/unknown2/00.yml\""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
"variable or family \"an_unkown_family\" does not exist so cannot load \"an_unkown_family.unknown\", it has been loading from the YAML file \"tests/invalid/unknown2/00.yml\""
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
"variable or family \"an_unkown_family\" does not exist so cannot load \"an_unkown_family.unknown\", it has been loading from the YAML file \"tests/invalid/unknown2/00.yml\""
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable or family \"unknown\" does not exist so cannot load \"a_family.unknown\", it will be ignored when loading from the YAML file \"tests/invalid/unknown/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable or family \"unknown\" does not exist so cannot load \"a_family.unknown\", it has been loading from the YAML file \"tests/invalid/unknown/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"variable or family \"unknown\" does not exist so cannot load \"a_family.unknown\", it has been loading from the YAML file \"tests/invalid/unknown/00.yml\"",
|
|
||||||
"a_family",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
a_multi: [] # A multi
|
|
||||||
|
|
||||||
a_leadership:
|
|
||||||
description: A leadership
|
|
||||||
type: leadership
|
|
||||||
|
|
||||||
a_leader: # A leader
|
|
||||||
|
|
||||||
a_follower: # A follower
|
|
||||||
|
|
||||||
a_str: # A str
|
|
||||||
- val1
|
|
||||||
|
|
||||||
a_family: # A family
|
|
||||||
|
|
||||||
a_boolean: true # A boolean
|
|
||||||
|
|
||||||
a_fami{{ identifier }}: # A dynamic family
|
|
||||||
...
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
a_family:
|
|
||||||
unknown: oups
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
an_unkown_family:
|
|
||||||
unknown: oups
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"mandatory variable but has no value",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"mandatory variable but has no value",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "No proxy"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "No proxy"
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"mandatory variable but has no value",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"mandatory variable but has no value",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"the value \"1\" is an invalid string, it's not a string, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/001/config/03/config.yml\"",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"mandatory variable but has no value",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"mandatory variable but has no value",
|
|
||||||
"proxy_mode",
|
|
||||||
null
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "No proxy"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "No proxy"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "foo"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "foo"
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"errors": [],
|
|
||||||
"warnings": []
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"proxy_mode": "No proxy"
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue