skekre98 commented on a change in pull request #91:
URL: https://github.com/apache/kibble/pull/91#discussion_r523441728
##########
File path: kibble/cli/setup_command.py
##########
@@ -212,69 +157,46 @@ def create_es_index(
print("Account created!")
-def get_user_input(msg: str, secure: bool = False):
- value = None
- while not value:
- value = getpass(msg) if secure else input(msg)
- return value
-
-
-def print_configuration(args):
- print(
- "Configuring Apache Kibble elasticsearch instance with the following
arguments:"
- )
- print(f"- conn_uri: {args.conn_uri}")
- print(f"- dbname: {args.dbname}")
- print(f"- shards: {int(args.shards)}")
- print(f"- replicas: {int(args.replicas)}")
- print()
-
-
-def main():
- """
- The main Kibble setup logic. Using users input we create:
- - Elasticsearch indexes used by Apache Kibble app
- - Configuration yaml file
- """
- parser = get_parser()
- args = parser.parse_args()
-
- print("Welcome to the Apache Kibble setup script!")
- print_configuration(args)
+def do_setup(
+ uri: str,
+ dbname: str,
+ shards: str,
+ replicas: str,
+ mailhost: str,
+ autoadmin: bool,
+ skiponexist: bool,
+):
+ click.echo("Welcome to the Apache Kibble setup script!")
admin_name = "admin@kibble"
admin_pass = "kibbleAdmin"
- if not args.autoadmin:
+ if not autoadmin:
admin_name = get_user_input(
- "Enter an email address for the administrator account:"
+ "Enter an email address for the administrator account: "
Review comment:
Oh good catch. Will move it over 👍
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]