Commit Graph

11 Commits

Author SHA1 Message Date
Ian Pittwood d44dfd7526 Implements PBR for packaging
Spyglass will soon have its plugins separated from its main repo. Many
other OpenStack repositories that utilize plugins have implemented
Python Build Reasonableness to manage their entry points for plugins.
As Spyglass will be managing plugins, it makes sense to stay uniform
with other projects and implement PBR.

Implements PBR using setup.py and setup.cfg files.

Changes README to correct file extension.

Freezes PIP requirements file.

Moves YAPF configuration into setup.cfg file.

Change-Id: I48ac5aeb3e544d3da7ce25bd9b827d8fd9c4e108
2019-05-10 18:49:54 +00:00
Ian Pittwood c46e15385c Refactors CLI to match style of Airship CLIs
The original CLI is based on click, but includes all options stacked on
one main method. This is in contrast to other Airship CLIs such as
Pegleg which utilizes click's nesting features to organize its CLI into
multiple groups and commands that each have their own options.

This change separates the Spyglass CLI into three different commands:
generate intermediary, generate manifests, and generate manifests from
intermediary.

Adds a 'verbose' flag on Spyglass.

Defaults plugin to 'tugboat'.

Adds validation for options that apply specifically to tugboat or
formation.

Related docs change: https://review.opendev.org/#/c/650137/

Change-Id: I92e5f040d5205c3ab36ec1d46ecd57bc97849cef
2019-05-06 16:04:02 -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 3bf68e464a PEP-8 code styling and linting
As a newer project, Spyglass is still a work in progress in terms of its
styling. This change is meant to help improve readability and compliance
of Spyglass source code.

To match other Airship projects, this change implements YAPF into tox so
linting is automatically ran. This will hopefully keep formatting grey
areas styled consistently.

PEP-8: https://www.python.org/dev/peps/pep-0008/

OpenStack Style Guidelines:
https://docs.openstack.org/hacking/latest/user/hacking.html

PEP Index: https://www.python.org/dev/peps/

Depends on https://review.openstack.org/#/c/648764.

Change-Id: I45b19cc8a7932fd7823dcb69f64a0a1bf19fc434
2019-04-22 18:46:48 +00:00
Ian Pittwood 8dd891aced Remove flask YAML web editor from Spyglass
Spyglass was originally built with a web-based YAML editor.
Unfortunately, the presence of the editor has caused some problems. It
can cause the Docker container to freeze before creating the
intermediary YAML file. The execution of the flask app is also the
root cause for the Bandit B104 errors and B605 error.

Since the target audience for Spyglass is developers, it can be
assumed that they will have access to an editor with support for YAML
files. Having a web-based version of the YAML editor is unnecessary and
will just result in more code to maintain in the future.

Removes the editor script from utils.

Removes the yaml-editor entry point from the package.

Removes references to the yaml-editor from the CLI and engine.

Resolves all known Bandit errors.

In the future, a pause in execution could be provided to allow users to
make quick edits. Log messages could also notify users when a
placeholder value is inserted in the intermediary so they can fix it.

Change-Id: Ibc37e61f93b33904ea839e12fe5a8d586985e0b1
2019-04-15 18:11:51 +00: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
Pawan Singh Pal c82debd18a Update build settings and documentation 2018-11-29 23:29:17 +05:30
gpsingh-1991 89a0a3c487
Merge pull request #4 from pawansingh126/master
Add yaml-editor to utils for editing yaml-files on the go
2018-11-29 18:34:50 +05:30
Purnendu Ghosh c60c0e8b53 Added entry point for tugboat plugin and minor fixes 2018-11-29 18:05:57 +05:30
Pawan Singh Pal 12e25206f3 Add yaml-editor to utils for editing yaml-files on the go
Add setup changes to install yaml-editor with spyglass
2018-11-29 17:25:10 +05:30
Hemanth Nakkina 296705a0a5 Base code for spyglass
- Spyglass skelton with engine, site processor
- Spyglass data extractor with formation plugin
- Docker files and scripts to run spyglass
2018-11-28 15:19:43 +05:30