builder: move ssl arguments to global options
When the builder is used as a command line argument: move the ssl related options to the global parser so they can be used with status and wait too.
This commit is contained in:
parent
2ca0f3b370
commit
1a5977bad2
2 changed files with 6 additions and 6 deletions
|
|
@ -543,6 +543,10 @@ def main():
|
|||
parser.add_argument("--url", metavar="URL", type=str,
|
||||
default=DEFAULT_COMPOSER_URL,
|
||||
help="The URL of the osbuild composer koji API endpoint")
|
||||
parser.add_argument("--cert", metavar="cert", help='The client SSL certificates to use',
|
||||
type=str)
|
||||
parser.add_argument("--ca", metavar="ca", help='The SSL certificate authority',
|
||||
type=str)
|
||||
parser.set_defaults(cmd=None)
|
||||
sp = parser.add_subparsers(help='commands')
|
||||
|
||||
|
|
@ -559,10 +563,6 @@ def main():
|
|||
action="append", type=str, default=[])
|
||||
subpar.add_argument("--koji", metavar="URL", help='The koji url',
|
||||
default=DEFAULT_KOJIHUB_URL)
|
||||
subpar.add_argument("--cert", metavar="cert", help='The client SSL certificates to use',
|
||||
type=str)
|
||||
subpar.add_argument("--ca", metavar="ca", help='The SSL certificate authority',
|
||||
type=str)
|
||||
subpar.set_defaults(cmd='compose')
|
||||
|
||||
subpar = sp.add_parser("status", help='status of a compose')
|
||||
|
|
|
|||
|
|
@ -640,6 +640,8 @@ class TestBuilderPlugin(PluginTest):
|
|||
|
||||
args = [
|
||||
"plugins/builder/osbuild.py",
|
||||
"--cert", ", ".join(certs),
|
||||
"--ca", "test/data/example-ca.pem",
|
||||
"compose",
|
||||
"Fedora-Cloud-Image",
|
||||
"33",
|
||||
|
|
@ -647,8 +649,6 @@ class TestBuilderPlugin(PluginTest):
|
|||
"fedora-33",
|
||||
"x86_64",
|
||||
"--repo", "http://download.localhost/pub/linux/$arch",
|
||||
"--cert", ", ".join(certs),
|
||||
"--ca", "test/data/example-ca.pem"
|
||||
]
|
||||
|
||||
with unittest.mock.patch.object(sys, 'argv', args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue