-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is connected to the previous three ones, where the new opera package CLI command has been introduced. The current development process shows clearly that we don't need so complicated behaviour for the package command (e.g. tosca library is just an idea and is not yet implemented in opera) and that reaching its goal (i.e. compressed CSAR) can be simplified. And that is exactly what we did here. "The best things come in small packages." and the same can happen with TOSCA CSARs, containing the blueprint of the application that we wanna orchestrate. The opera package CLI command can be used to create a valid TOSCA CSAR by packaging together the TOSCA service template and all accompanying files. In general, opera package receives a directory (where user's TOSCA templates are located) and produces a compressed CSAR file. The command can create the CSAR if there is at least one TOSCA YAML file in the input folder. If the CSAR structure is already present (if TOSCA-Metadata/TOSCA.meta exists and all other TOSCA CSAR constraints are satisfied) the CSAR is created without an additional temporary directory. And if not, the files are copied to the tempdir, where the CSAR structure is created and at the end the tempdir is compressed. The input folder is the mandatory positional argument, but there are also other command flags that can be used: 1. --service-template/-t is the name of the main TOSCA template from the input folder that will be used as CSAR entrypoint. When not set, the root YAML file from the folder is used. 2. --output/-o is the CSAR file path output that will be created. If not set, the output CSAR file will be named using UUID. 3. --format/-f is the option that specifies the compressed file format. Currently, there are two choices here: 'zip' or 'tar' with 'zip' being the default compression method. 4. --verbose/-v turns on debug mode (currently not implemented). The last thing to mention within this commit is that we added some integration test cases to test the functionality of the new command.
- Loading branch information
1 parent
89b23b1
commit e5f07b5
Showing
6 changed files
with
166 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters