Commit Graph

11 Commits

Author SHA1 Message Date
Bryan Strassner 667a538330 Support clearing collections of configdocs
Adds an option to create configdocs as an empty colleciton. This is done
as an explicit flag (--empty-collection) on the command as opposed to
using empty files to prevent accidental emtpy file loads leading to
frustration.

Since this introduced a new flag value for the CLI, the CLIs using flag
values were updated to use the standard is_flag=True instead of the
flag_value=True or some other value when a boolean flag is expected.

Minor updates to CLI tests due to moving to responses 0.10.2

Depends-On: https://review.openstack.org/#/c/614421/

Change-Id: I489b0e1183335cbfbaa2014c1458a84dadf6bb0b
2018-11-30 13:36:14 -06:00
anthony.bellino 407cdc76d0 Ensure SY gets redacted rendered documents
- Introduced query parameter 'cleartext-secrets' yields
  cleartext secrets in encrypted documents if true, else
  the values are redacted.
- Introduced CLI flag '--cleartext-secrets' yields cleartext
  secrets in encrypted documents.

Change-Id: I8a950c8bded3550f4aab8e6dc662ea330c2fb73f
2018-11-14 18:32:37 +00:00
Aaron Sheffield d62f15123d Expects Redacted Raw Documents
- Adds a query parameter 'cleartext-secrets' to get full raw documents.
- Adds CLI flag to get full raw documents.

Change-Id: If38974c8433c8360cc47ae1273720ad76e87a6fd
2018-10-23 11:12:56 -05:00
Bryan Strassner 5a9abc73dd Modify note access methods
While iterating on the next steps of using notes, it became clear that
several changes to the output and access methods for notes needed
enhancements. This change introduces a new way to access a note's URL
information via a new API/CLI, while removing the resolution of URLs
from the existing note output. This supports the concept of "builddata"
coming back with sizes of 800kb or more - which really can never work
out inline in other data, especially in cases where there is
multiplicity of the information across many items.

New API: GET /notedetails/{id}
CLI: shipyard get notedetails/{id} and/or shipyard get notedetails {id}
Returns the resolution of the URL for a note, outputting the raw info as
the response (not structured in a JSON response).
The CLI will attempt to minimally format the response if it has inline
\n characters by replacing them will real newlines in the output (if the
output-format is set to either cli or format.  Raw format will be
returned as-is.

The existing notes responses are changed to not include the resolution
of the URL information inline, but rather provide the text:

  Details at notedetails/{id}

The CLI will interpret this and present:

  - Info available with 'describe notedetails/09876543210987654321098765'

This is an attempt to inform the user to access the note details that
way - luckily the API and CLI align on the term notedetails, as the word
details works well enough in the singular form presented by the CLI and
the plural form used by the API.
The ID returned is the unique id of the note (ULID format).

Notes that have no URL will return a 404 response from the API (and
an appropriately formatted value from the CLI).

This approach solves an issue beyond the large inline values from URLs;
providing a means to NOT resolve the URLs except in a one-at-a-time way.
Long lists of notes will no longer have the risk of long waits nor
needing of parallelization of retrieval of URLs for notes.

This change introduces an API-side sorting of notes by timestamp,
providing a chronological presentation of the information that may or
may not match the ULID or insertion ordering of the notes.

Additional feedback from peers about the output of noted indicated that
the CLI formatting of notes in general was in need of visual tuning. As
such, this change introduces changes to the formatting of the output
of notes from the CLI:

-  Notes for describing an item will be presented with a more specific
   header, e.g.: Action Notes: or Step Notes: instead of simply Notes.

-  Tables with notes will change the header from "Notes" to "Footnotes"
   give the user a better marker that the notes follow the current
   table.

-  Table footnotes will be presented in a table format similar to
   the following, with headings matching the kind of note being
   produced.

   Step Footnotes    Note
   (1)               > blah blah blah
                     > yakkity yakkity
   (2)               > stuff stuff stuff stuff stuff stuff stuff
                     stuff stuff stuff
                       - Info available with 'describe notedetails/...
                     > things things things

Change-Id: I1680505d5c555b2293419179ade995b0e8484e6d
2018-10-16 07:45:02 -05:00
Roman Gorshunov 7fa3136470 Fix: various documentation and URL fixes
1) UCP -> Airship
2) readthedocs.org -> readthedocs.io (there is redirect)
3) http -> https
4) attcomdev -> airshipit (repo on quay.io)
5) att-comdev -> openstack/airship-* (repo on github/openstack git)
6) many URLs have been verified and adjusted to be current
7) no need for 'en/latest/' path in URL of the RTD
8) added more info to some setup.cfg and setup.py files
9) ucp-integration docs are now in airship-in-a-bottle
10) various other minor fixes

Change-Id: I4b8cc6ddf491e35d600a83f5f82d7717108e31dd
2018-09-24 12:53:27 +02:00
Rick Bartra 2edd8e6531 Update Shipyard API docs and shipyard_api_client
The Shipyard API docs and shipyard_api_client incorrectly reference
the wrong API endpoints for some APIs. This commit updates the API
docs to reference the correct API endpoints for:

- getting action validation details
- triggering a control action against an activity

The following is updated in the shipyard_api_client.py:

- API endpoint for getting action validation details

Change-Id: I04b770acfd64f331efce6f83f51cb41d0818a6b2
2018-08-23 19:48:14 +00:00
Smruti Soumitra Khuntia f4c724fbf1 A new Shipyard site statuses API and CLI
A new Shipyard site statuses API and CLI supporting nodes
provisoning status and node power state. This API
can be further developed to support new status
requirements by expanding the filters option.

Change-Id: I620aefd82d4a17b616f3f253265605e519506257
2018-07-31 09:16:36 +00:00
Anthony Lin afc2ea501d Update Configdoc Status
Allows comparison between Deckhand revisions with valid revision tags,
i.e. buffer, committed, last-site-action and successful-site-action.

This patch set updates the relevant Shipyard API, API client, CLI as
well as document.

Change-Id: Ia9a519d82fe8bf80f89945e678a0b02f6ec43baa
2018-05-08 15:08:55 +00:00
Anthony Lin c0f8fc4359 Add 'last-site-action' & 'successful-site-action' Option
Shipyard retrieval of configdocs and renderedconfigdocs to
support two new revisions, i.e. 'last-site-action' and
'successful-site-action'.

1) --last-site-action for the documents associated with the last
   'successful or failed site action

2) --successful-site-action for the documents associated with the
   last successful site action

This patch set updates the relevant Shipyard API, API client, CLI
as well as document for the new options.

Change-Id: I60fefa25147ad8e367bc3d1c8d45d4d08a5ee3f1
2018-05-02 15:22:14 +00:00
Anthony Lin d3d3a0ecb7 Add 'allow-intermediate-commits' option for Site Action
Shipyard Create Action will stop user from executing a site
action when the current committed revision of documents has
other prior commits that have not been used as part of a
site action, e.g. update_site.

We can re-run the action with the 'allow-intermediate-commits'
option if we are aware of these other commits and if they are
intended.

This patch set updates the relevant Shipyard API, API client,
CLI as well as document for this new option.

It also made some small updates to the 'commit configdocs'
documentation.

Change-Id: I94a4cad313a69dd6fbc626ab923c6eae5cf3db7a
2018-04-28 00:05:25 +00:00
Bryan Strassner 769d0ded47 Refactor shipyard to UCP target layout
Refactor Shipyard to be better able to leverage common
packages and conform with the target UCP standard layout.

This change supports the same tox entrypoints at
the root level, but the preferred approach is to use make
targets defined in the Makefile such as 'make tests' and
'make lint'

The previous tox.ini has moved and been
tailored to the specifics of each subproject at
src/bin/*/tox.ini

Autotmatic generation of the policy and configuration
files has been removed from the sphinx build for now
but these files will be automatically generated locally
into the docs source by using a 'make docs' command.
This may need to be revisited later to re-enable the
automatic generation of these files such that readthedocs
would still support the project layout.

Change-Id: Ifdc1cd4cf35fb3c5923414c677b781a60a9bae42
2018-04-24 16:47:13 -05:00