Commit Graph

10 Commits

Author SHA1 Message Date
Ryan Schroder 386d7c0e57 Allow rules to be input by user
New tag -r added so that a rules yaml file can be input.
Rules file outlines rules for data manipulation in the engine.
Preexisting rules left in as the default.

Change-Id: Ide8af31b018b4f888486ae6d48ffb441bf9634a7
2020-01-16 16:48:48 +00:00
Zuul ca9756de09 Merge "Use data objects for document generation" 2019-07-01 13:51:37 +00:00
Ian H Pittwood 746d7ca2ec Add site_config.yaml back into examples
Spyglass uses additional configuration files to add in any information
not included by a data source. This configuration file should be usable
independent of the data source used. This change adds the
site_config.yaml example file back into the examples folder after it was
initially removed in the project separation of spyglass-plugin-xls.

Change-Id: I9be76c89076327b8ff928aa3da6c91cca0397cc2
2019-06-26 14:58:54 -05:00
Ian H. Pittwood efe24d8a5f Use data objects for document generation
This is a follow-up change to [0] which further implements data objects
to be used in the generation of documents in Jinja2. The following
additions and changes are made:

- Adds helper functions to data objects to filter hosts and networks for
ease of use in Jinja2 templates
- Adds SiteDocumentData factory function to convert intermediary yaml
dictionaries into a SiteDocumentData object with all associated objects
- Updates Jinja2 templates to use data objects
- Cleans up overly complex looping in Jinja2
- Adds tests for new code in models.py

[0] https://review.opendev.org/#/c/662092/

Change-Id: I66ebfeaf5d6ca76b6dee5a2285a74bad8b06b720
2019-06-26 12:03:40 -05:00
Ian H. Pittwood 4747222641 Implements data object models
This change implements data object models from [0] in data extraction
and parsing. The change results in minor modifications to the outputted
intermediary, which can be seen between these two example intermeidary
files [1].

This fully implements the data objects from models.py in data extraction
and parsing. A follow-up change will implement use of the data objects
in Jinja2. Temporarily, all objects will be converted to dictionaries
for generating documents from templates.

[0] https://review.opendev.org/#/c/658917/
[1] https://www.diffchecker.com/NnjjJrb2

Change-Id: Ifd867787aab541be5dabecf9f6026faa2ec7049e
2019-06-21 15:00:46 -05:00
Ian Pittwood a002e4203d Separate plugins from Spyglass
This change removes plugins from Spyglass and places them in separate
repositories. Formation, a proprietary plugin, will be removed by this
change and Tugboat will become its own OpenDev maintained repo,
spyglass-plugin-xls. By creating more streamlined plugin management,
end users should be able to more easily create their own plugins for
different data sources.

Related change https://review.opendev.org/#/c/659116/

Depends-On: Ib2f75878b1a29e835cb8e2323aebe9d431c479e7

Change-Id: Ie0eb2e5aefe6bb764e1aa608e53371adaabb9a17
2019-05-29 10:30:14 -05:00
Ian Pittwood 69f0975dec Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I1a933b8794c97244b95b6782033b52cbca74b0b6
2019-05-03 13:48:27 -05:00
Alexander Hughes 03a058bfcf Various fixes to Spyglass to resolve tox errors
The tox configuration needs to be updated in order for it to be helpful
for Zuul. This change makes some minor modifications to the tox config
to improve its usability and uniformity with other Open Stack configs.

Makes bare minimum changes for pep8 tests compliance.

Adds gate scripts for white space linting.

In the future, additional changes will need to be made to add tests to
Spyglass. These changes will need to enable the 'py36' and 'cover' tox
env and set coverage levels. Additional linting should also be
performed to improve Spyglass code readability and organization.

Change-Id: I73f946619786e661d02c69bd8e197453f049e0c7
2019-04-16 12:22:53 -05:00
Hemanth Nakkina 303fce156b Fix: remove references to previous repo
Remove references to att-comdev/spyglass repo

Change-Id: Ie07a5ae6062e61c2705a056713a9fb50ad2361fe
2018-12-04 18:51:57 +05:30
Purnendu Ghosh 4a8e2720e1 Base Code for Tugboat Plugin and Addition of config files, templates 2018-11-29 02:20:31 +05:30