Commit Graph

5 Commits

Author SHA1 Message Date
Ahmad Mahmoudi eb0deeb9e5 Pegleg encryption of site secrets
Added secret encryption/decryption to pegleg cli.

Change-Id: I95b993748d99fc4398eee1d1c59e74f382497f74
2018-10-30 16:53:51 +00:00
Felipe Monteiro 18598b671b fix: Stop adding unwanted newlines in multiline strings
This patch set fixes a `pegleg site render` issue in which pyyaml
is adding unwanted (multiple) newlines in multiline strings in the
output. In other words, currently, `pegleg site render` keeps injecting
additional newline characters in multiline certificates, such that
each newline is rendered, in effect, as two newlines.

For example:

  -----BEGIN CERTIFICATE-----
  MIIDSDCCAjCgAwIBAgIUegkh/antB1XyDVHdP5dv+0MZyBcwDQYJKoZIhvcNAQEL
  BQAwKjETMBEGA1UEChMKS3ViZXJuZXRlczETMBEGA1UEAxMKa3ViZXJuZXRlczAe
  <snip>

Currently renders as:

  -----BEGIN CERTIFICATE-----

  MIIDSDCCAjCgAwIBAgIUegkh/antB1XyDVHdP5dv+0MZyBcwDQYJKoZIhvcNAQEL

  BQAwKjETMBEGA1UEChMKS3ViZXJuZXRlczETMBEGA1UEAxMKa3ViZXJuZXRlczAe
  <snip>

This patch set adds code to pegleg.engine.__init__ to use the
solution prescribed in [0] to force pyyaml to ensure that the
rendered output for such multiline strings matches the original
input.

Note that this requires using safe_dump(_all) which should be
used in Pegleg ubiquitously for the same reason as [1]. Using
safe_dump(_all) for all CLI actions will be done in a follow up
change.

[0] https://stackoverflow.com/questions/45004464/yaml-dump-adding-unwanted-newlines-in-multiline-strings
[1] https://review.openstack.org/#/c/578240/

Change-Id: I3d53b310869e5eacf3d7a17b51ff9ae462d64736
2018-10-10 21:52:29 +00:00
Rick Bartra 4172dc94e1 Missing import causing `pegleg type list` to not work
This commit adds a missing import that is needed for `pegleg type list`
to work properly

Change-Id: I625288db45072f99a460778c21f906f30f9adbc5
2018-10-09 16:45:11 -04:00
Felipe Monteiro 372b0a541e Remove Pegleg stub logic from CLI and engine
This patch set removes Pegleg stub logic from the CLI and engine
because:

1) It's currently broken following revisioned repository support
   with https://review.openstack.org/#/c/577886/
2) The functionality isn't used anywhere in Airship, either upstream
   or downstream
3) The functionality is, in any case, obsolete following the
   revision repository change

As such, it is better if we simply remove the stub logic out for
now and revisit the implementation later, once the requirements
for it are fully fleshed out to align with modern Pegleg architecture.

Change-Id: If82b91bcdd39555596f2a4003bfda0167142fddd
2018-09-27 14:27:47 +01:00
Felipe Monteiro 893ea9f4bb Standardize Pegleg directory structure
This patch set standardizes the Pegleg directory
structure because of the following reasons:

1) src/bin/pegleg is not necessary and only makes
building (e.g. documentation building) and running
of tox targets unnecessarily difficult.
2) src/bin/pegleg is a Java-like standard that
bears no relevance to Python.

Change-Id: I37d39d3d6186b92f8fbfe234221c9e44da48cf10
2018-09-23 10:33:40 -04:00