diff --git a/cli/testflinger_cli/__init__.py b/cli/testflinger_cli/__init__.py index 241c8983..d262fe2c 100644 --- a/cli/testflinger_cli/__init__.py +++ b/cli/testflinger_cli/__init__.py @@ -61,6 +61,7 @@ def configure_logging(): def _get_image(images): + """Ask the user to select an image from a list""" image = "" flex_url = "" if images and images[list(images.keys())[0]].startswith("url:"): @@ -110,6 +111,14 @@ def _get_ssh_keys(): return key_list +def _print_queue_message(): + print( + "ATTENTION: This only shows a curated list of queues with " + "descriptions, not ALL queues. If you can't find the queue you want " + "to use, a job can still be submitted for queues not listed here.\n" + ) + + class TestflingerCli: """Class for handling the Testflinger CLI""" @@ -510,6 +519,7 @@ def jobs(self): def list_queues(self): """List the advertised queues on the current Testflinger server""" + _print_queue_message() try: queues = self.client.get_queues() except client.HTTPError as exc: @@ -524,6 +534,7 @@ def list_queues(self): def reserve(self): """Install and reserve a system""" + _print_queue_message() try: queues = self.client.get_queues() except OSError: @@ -580,6 +591,7 @@ def reserve(self): self.do_poll(job_id) def _get_queue(self, queues): + """Ask the user which queue to use from a list""" queue = "" while not queue or queue == "?": queue = input("\nWhich queue do you want to use? ('?' to list) ")