Commit Graph

33 Commits

Author SHA1 Message Date
Brian C. Lane 932ff5812c composer-cli: Update diff support for customizations and repos.git
composer-cli will now output information about changes to customizations
entries and the repos.git entries.
2019-06-13 14:16:48 -07:00
Brian C. Lane c017300ad6 Revert "Rename composer-cli to composer"
This reverts commit c9be91c879.

It conflicts with the PHP dependency manager project named 'composer'
2018-10-08 09:23:47 -07:00
Lars Karlitski c9be91c879 Rename composer-cli to composer 2018-09-20 12:02:03 +03:00
Brian C. Lane 57674c9a1a Fix composer-cli blueprints changes to get correct total
blueprints/changes is different, each blueprint has it's own total,
limited by the call's limit. So it needs to find the max total of all
the requested blueprints.
2018-08-27 11:08:04 -07:00
Brian C. Lane 0a76d635ca Add a function to get_url_json_unlimited to retrieve the total
The blueprints/changes API is a bit different from the others, the total
that it includes is for each blueprint, not one total for all of them,
since there will be a different number of commits for each.

The function is passed the dict, and it can be used to select the total
to use for retrieving all of the results. If it isn't included it will
use data["total"] which works fine in most cases.
2018-08-27 11:03:59 -07:00
Brian C. Lane 86d556e87c Use urllib.parse instead of urlparse
python3 moved this to a new module.
2018-08-21 16:49:41 -07:00
David Shea ee98d87cea In composer-cli, request all results
Add a limit argument to all potentially paginated results, equal to
whatever the composer backend is the total number of results. This still
has the potential to provide truncated data if the number of results
increases between the two HTTP requests.

Resolves: #404
2018-08-21 16:43:44 -07:00
Brian C. Lane 844ff9998b composer-cli should not log to a file by default
The user can pass --log /path/to/logfile.log if they want logging
enabled.
2018-08-21 11:49:28 -07:00
Chris Lumens 47d3a72014 Fix a little bug in running "modules list".
(cherry picked from commit 5dddef6f49)
2018-08-10 12:00:23 -04:00
Chris Lumens 473ee99eb9 Update composer-cli for the new error return types.
(cherry picked from commit bc96f75992)
2018-08-09 16:20:17 -04:00
Brian C. Lane 316a829ff7 Add job_* timestamp support to compose status 2018-08-07 15:21:10 -07:00
Will Woods 439a894947 composer-cli: clean up "list" commands
This patch does two things:

1) Add "compose list", which lists compose UUIDs and other basic info,
2) Fix up "blueprints list", "modules list", "sources list", and
   "compose types" so their output is just a plain list of identifiers
2018-08-07 13:00:56 -04:00
Brian C. Lane 0c19c3304e composer-cli: Add support for Group to blueprints diff
(cherry picked from commit 2edd7a995b)
2018-08-06 16:53:39 -07:00
Brian C. Lane 08fb780bb9 Update status.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 642f117d54)
2018-08-06 16:53:07 -07:00
Brian C. Lane db587afb16 Update sources.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 3205e47a13)
2018-08-06 16:53:02 -07:00
Brian C. Lane f0dd50fbae Update projects.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 77767cd93a)
2018-08-06 16:52:56 -07:00
Brian C. Lane 42ad6ad0cc Update modules.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit b55b86d0b3)
2018-08-06 16:52:51 -07:00
Brian C. Lane 4e3044de20 Update compose.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 760aeb61a7)
2018-08-06 16:52:43 -07:00
Brian C. Lane b40c3b2ce3 Update blueprints.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit c1c5536ec8)
2018-08-06 16:52:37 -07:00
Brian C. Lane 08c2965fab Modify handle_api_result so it can be used in more places
Some results have errors and no status, others have status and errors.
Update the function to return the final rc to exit with, and a bool
indicating whether or not to continue processing the other fields.

Add a bunch of tests for the new function to make sure I have the logic
correct.

(cherry picked from commit 35fa067219)
2018-08-06 16:52:28 -07:00
Chris Lumens 2d5f434b12 Fix help output on the compose subcommand.
(cherry picked from commit a3572c9fdd)
2018-07-26 10:43:01 -04:00
Chris Lumens 2251c540c8 Add timestamps to "compose-cli compose status" output.
(cherry picked from commit 7bcb61849d)
2018-07-26 10:42:57 -04:00
Chris Lumens 01582e227d And then add real output to the status command.
(cherry picked from commit eb0939d967)
2018-07-26 10:42:08 -04:00
Chris Lumens 80e2e8e6db Add the beginnings of a new status subcommand.
(cherry picked from commit 9eafc60fa0)
2018-07-26 10:42:04 -04:00
Brian C. Lane 18521cec1a composer-cli: Fix non-zero epoch in projets info
The json value is an int, so convert it to a str.
2018-07-25 11:35:03 -07:00
Brian C. Lane 83680d92b0 Check /projects responses for null values.
Some values can be null/None so check for that instead of crashing.

(cherry picked from commit f916e41d00)
2018-07-18 16:01:18 -07:00
Chris Lumens bb8fdcb854 Add help output to each subcommand.
This is the same as the output at the top level, just trimmed down to
only the options for a single subcommand.  It's trigged by providing
"help" or "--help" as a subcommand option.

(cherry picked from commit 954f330ace)
2018-07-18 11:58:56 -07:00
Chris Lumens eba5658a71 Split the help output into its own module.
This means I can reuse it for help output for individual subcommands.

(cherry picked from commit 70e4211ad1)
2018-07-18 11:57:45 -07:00
Chris Lumens 3c6478e179 If the help subcommand is given, print the help output.
This isn't a real subcommand like the others.  The option processing
just intercepts it and prints the output.  Given that we're subcommand
based, it makes sense to support this in addition to --help.

(cherry picked from commit 3743d6d208)
2018-07-18 11:49:16 -07:00
Brian C. Lane 6f6ce410c0 Add support for sources to composer-cli
This adds the sources command which can be used to list, add, change,
and delete sources using the TOML formatted source file.
2018-06-04 15:45:36 -07:00
Brian C. Lane c726f19434 Update the generated html docs 2018-05-14 13:00:15 -07:00
Brian C. Lane db67c1267a Move lorax-composer and composer-cli argument parsing into modules
This allows sphinx-argparse to document them automatically.
2018-05-14 13:00:15 -07:00
Brian C. Lane 825d1931e4 Add composer-cli and tests 2018-05-14 13:00:15 -07:00