Closed anzoman closed 2 years ago
@sstanovnik would this feature be helpful for xOpera SaaS?
I couldn't use it because SaaS only uses the python API, not the CLI.
The commands that don't have -o/--output
switch are the ones that actually do some orchestration actions (e.g., deploy, undeploy) and changing them to catch their output and save it to a file would mean that we'd have to also deal with updating our thread output printer, which might not be trivial. All in all the user can always do opera deploy service.yaml > output.txt
and save the output.
I'm closing this now and we can reopen if we ever need to.
Description
The
opera deploy
andopera undeploy
CLI commands print out the orchestration results during the process. Some users might want to use these later on or would want to save them locally in a file which can be then used by other tools or they just don't want to receive the output in their shell but rather in some text file. Therefore, I suggest that we add a new flag (--output/-o
) to these CLI commands so that the outputs can be used like this:As you can see this addition applies for the following CLI commands
opera validate
opera deploy
opera undeploy
opera update
opera notify
Steps
Add the CLI flag which we already have in
opera diff
,opera info
,opera outputs
andopera package
. For saving outputssave_outputs
helper fromsrc/opera/utils.py
can be used.Current behaviour
Results of some CLI commands cannot be stored to directly a file.
Expected results
To be able to store orchestration results to a file by using a new CLI flag.
Note
This issue is almost similar to #151.