Hadron / carthage

Carthage is an Infrastructure as Code (IAC) framework
Other
8 stars 4 forks source link

Split up carthage_main_setup and allow for passing in args #8

Closed kdienes closed 2 years ago

kdienes commented 2 years ago

The goal is to allow utility programs (such as 'devstack') to handle their own argument parsing while still getting the standard logging configuration and configfile parsing.

So we can optionally pass in the args we got from our own argparser (that follows the protocol from add_carthage_arguments).

hartmans commented 2 years ago

I am having trouble understanding what this gives you over the existing setup. Today, you can call carthage_main_argparser, which will return a parser to you. You can then add options to that parser and call carthage_main_setup, pasing in the parser from before. Since carthage_main_setup returns args, you can then parse your own arguments. This appears to create multiple ways of doing approximately the same thing, and I'm trying to understand why we want both methods.

hartmans commented 2 years ago

It looks like the kdienes branch is no longer just this PR. After discussion with Klee it's not clear this change is needed. This can be reopened if we decide we want this change.