Skip to content

Commit

Permalink
Merge pull request #36 from xfmoulet/master
Browse files Browse the repository at this point in the history
Add ability to specify configuration file on command line
  • Loading branch information
JLCoulin authored Dec 14, 2021
2 parents e8d97fa + ce2820d commit 1023687
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/cloudnet/tosca/tosca2cloudnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ def main(argv):
action="store_true",
help="ignore target directory configuration, force it to default values.",
)
parser.add_argument(
"--config-file",
metavar="<config_file.yaml>",
default=configuration.CONFIGURATION_FILE,
help="use provided YAML file as default configuration",
)
(args, extra_args) = parser.parse_known_args(argv)

diagnostics.configure(
Expand All @@ -92,9 +98,10 @@ def main(argv):

# Load configuration.
config = configuration.load(
config_file=args.config_file,
ignored_keys=[processors.Generator.TARGET_DIRECTORY]
if args.ignore_target_config
else []
else [],
)

# Load the TOSCA service template.
Expand Down

0 comments on commit 1023687

Please sign in to comment.