Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to not use references in yaml output #70

Open
wants to merge 371 commits into
base: master
Choose a base branch
from

Conversation

AndrewPickford
Copy link

Patch to optionally stop yaml output from using references, as sometimes it's clearer to explicitly fill in references.

ie go from with reference output:

_cluster_: 
  ntp_client_strata: &id001
  - ntp1.domain.com
  - ntp2.domain.com

ntp:
  client:
    strata: *id001

to filling in the references:

_cluster_: 
  ntp_client_strata:       
  - ntp1.domain.com 
  - ntp2.domain.com

ntp:
  client:  
    strata:       
    - ntp1.domain.com
    - ntp2.domain.com

Current behaviour of outputting using references is retained as the default, with a command line argument ('-r' or '--no-refs') to not use references.

AndrewPickford and others added 28 commits August 8, 2017 14:42
Fix reclass parser to include OPT_IGNORE_CLASS_NOTFOUND
Pass defaults for ingore_class_notfound properly
Martin819 and others added 30 commits October 8, 2018 15:00
Inventory query errors were raising exceptions due to a missed
change of a value.contents() method to a class property
Allow to use '..' as a reference to higher level in class structure
usable yaml_git and mixed storage types
Added unit tests, removed some redundant code,
removed parser from settings -- it was hardcoded, so
no real reason to keep it there, amended logic for
parser application: previosly only default sentinels were
used in parser selection optimization, now a sentinel is
picked from settings.
Settings code deduplicated.
Mostly minor changes to make code more compliant with
proper coding style, also some repetitions are removed.
Reference sentinel was hardcoded in core, replaced it with
proper counting of actual sentinels that are present in
settings.
In the course of refactoring a bug was introduced
which manifested itself in excessive constructions
of parsers and considerable slowdown of reclass.
This patch limits the number of parsers constructed.
Tests for full parser and simplified reference parser
are added. The new tests simultaneously act as documentation
for parsers. Also some mostly cosmetic changes are applied
to parser building functions and Parser() class.
Change-Id: Id8fa33004bbf0e18d7e94c2da9a7d3120bf8a3c4
Change-Id: Id3e474a8bd77bb474ef1fcbc5df327f7b84db894
Fixed typo in settings definitions.
…re_overwritten_missing_reference

Fix ignore_overwritten_missing_reference default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.