From b95037f624e60be4df96f57c49d61d83028296a0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 31 Dec 2019 15:35:49 +0100 Subject: [PATCH] [metadata] allow passing in the port --- scripts/uncloud | 4 ++++ uncloud/metadata/main.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/uncloud b/scripts/uncloud index 5efc2a5..8add1d6 100755 --- a/scripts/uncloud +++ b/scripts/uncloud @@ -41,9 +41,13 @@ if __name__ == '__main__': scheduler_parser = subparsers.add_parser("scheduler", parents=[parent_parser]) + filescanner_parser = subparsers.add_parser("filescanner") imagescanner_parser = subparsers.add_parser("imagescanner") + metadata_parser = subparsers.add_parser("metadata") + metadata_parser.add_argument("--port", "-p") + config_parser = subparsers.add_parser("configure") configure_parser(config_parser) diff --git a/uncloud/metadata/main.py b/uncloud/metadata/main.py index da993ae..389b9a0 100644 --- a/uncloud/metadata/main.py +++ b/uncloud/metadata/main.py @@ -111,8 +111,8 @@ class Root(Resource): api.add_resource(Root, "/") -def main(): - app.run(debug=True, host="::", port="80") +def main(port=None): + app.run(debug=True, host="::", port=port) if __name__ == "__main__":